Qty(1),
Length(18),
RangeLimit(3.37),
TrailingStart1(110),
TrailingStart2(250),
TrailingStop1(135),
TrailingStop2(120),
StopLossSet(185),
StopLimit(10),
StopStartBar(48),
Sslippage(0);//
variables:
MinPoint(0),
AAPV(0),
AAPVMA(0),
BuyCon(False),
SellCon(False),
SellShortCon(False),
BuyToCoverCon(False),
MyEntryPrice(0),
MyExitPrice(0),
HighestAfterEntry(0),
LowestAfterEntry(0),
HL(0),
VolMA(0),
VolMA2(0),
UpCon(False),
LongStop(0),
ShortStop(0),
HighestBarNo(0),
LowestBarNo(0),
HighestCloseAfterEntry(0),
LowestCloseAfterEntry(0);
MinPoint=MinMove*PriceScale;
MyEntryPrice=avgentryprice;
VolMA=AverageFC(volume,Length);
VolMA2=AverageFC(VolMA,Length);
UpCon=VolMA[1] > VolMA2[1] And VolMA > VolMA2;
HL=AverageFC((High - Low),Length);
AAPV =open[1]*0.1375+open*0.1375+close[1]*0.1125+close*0.1125+high[1]*0.125+high*0.125+low[1]*0.125+low*0.125;
BuyCon = ( Close[3]>=AAPV[3] and Close[2]>=AAPV[2] and Close[1]>=AAPV[1] and Close>=AAPV) And UpCon;
SellShortCon = (Close<=AAPV and Close[3]<=AAPV[3] and Close[2]<=AAPV[2] and Close[1]<=AAPV[1]) And UpCon;
if(BuyCon And Close > Open And Close[1] > Open[1] and marketposition <=0) then //
buy next bar at Open;
if(SellShortCon And Close < Open And Close[1] < Open[1] and marketposition >=0) then //
sellshort next bar at Open;