I changed the AFL, But still not giving the result.. experts your kind advice is needed..
------
_SECTION_BEGIN("System");
SetChartOptions(0, chartShowArrows | chartShowDates);
Plot(Close, "Close", ParamColor("Color", colorBlack), styleNoTitle | ParamStyle("Style") | GetPriceStyle());
// Define Time Parameter.
FirstTradeTime = 090000;
LastTradeTime = 140000;
ExitAllPositionsTime = 152500;
H_1 = TimeFrameGetPrice("H", inDaily, -1);
L_1 = TimeFrameGetPrice("L", inDaily, -1);
C_1 = TimeFrameGetPrice("C", inDaily, -1);
O = TimeFrameGetPrice("O", inDaily); // current day's open
// To calculate the Pivot Levels
R = H_1 - L_1; // Range
r1 = 0;
PP = Null;
ulb = L_1 + (R * 1.618);
uls = L_1 + (R * 1.382);
mlb = L_1 + (R * 0.618);
mls = H_1 - (R * 0.618);
llb = H_1 - (R * 1.382);
lls = H_1 - (R * 1.618);
rl = mlb - mls;
r4 = Null;
s4 = Null;
q1 = int(4350 / R);
SetPositionSize(q1, 4); // Total position size keeping app. 1000 rs as stoploss
Buy = ((High > ulb AND Low < ulb) OR(High > mlb AND Low < mlb) OR(High > llb AND Low < llb)) AND TimeNum() <= 150000;
Short = ((Low < uls AND High > uls) OR(Low < mls AND High > mls) OR(Low < lls AND High > lls)) AND TimeNum() <= 150000;
Sell = ((Low < uls AND High > uls) OR(Low < mls AND High > mls) OR(Low < lls AND High > lls)) OR TimeNum() >= ExitAllPositionsTime;
Cover = ((High > ulb AND Low < ulb) OR(High > mlb AND Low < mlb) OR(High > llb AND Low < llb)) OR TimeNum() >= ExitAllPositionsTime;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Short = ExRem(Short, Cover);
Cover = ExRem(Cover, Short);
pbuyprice = BuyPrice;
BuyPrice = IIf((High > ulb AND Low < ulb), ulb, IIf((High > mlb AND Low < mlb), mlb, IIf((High > llb AND Low < llb), llb, pbuyprice)));
psellprice = SellPrice;
SellPrice = IIf((High > uls AND Low < uls), uls, IIf((High > mls AND Low < mls), mls, IIf((High > lls AND Low < lls), lls, psellprice)));
pcoverprice = CoverPrice;
CoverPrice = IIf((High > ulb AND Low < ulb), ulb, IIf((High > mlb AND Low < mlb), mlb, IIf((High > llb AND Low < llb), llb, pcoverprice)));
pshortprice = ShortPrice;
ShortPrice = IIf((High > uls AND Low < uls), uls, IIf((High > mls AND Low < mls), mls, IIf((High > lls AND Low < lls), lls, pshortprice)));
slamt = int(R * 0.23); // stoploss amount
slamt1 = BuyPrice + slamt; // stoploss value in case of Buy
slamt2 = shortPrice - slamt; // stoploss value in case of Short
High1 = highestsince(Buy, High, 1); // Highest High since last buy
Low1 = Lowestsince(Short, Low, 1); // Lowest Low since last Low
slamtby = IIf((High1 >= slamt1), 0, slamt);
slamtst = IIFf(Low1 <= slamt2, 0, slamt);
slamtf = IIF(Buy, slamtby, iif(Short, slamtst, slamt));
ApplyStop(0, 2, slamtf, 1);
_SECTION_END();
-----