Hi , was some years since i trade and programing, need som help if possible ,
with a code for backtesting/auto trade .
Thanx alot
Longtrade…
•Close over MA 100 (daily)
•Open in between yesterdays lowest and Highest
•Open UNDER yesterdays close
•Entry 10.00 a clock
•Stop (x value) point
•Target (xvalue) point
•Timeexit 17.00 a clock
There you go:
Timeframe(Daily,UpdateOnClose)
Sma100 = average[100,0](close)
Timeframe(default)
l1 = close > Sma100
l2 = (Dopen(0) >= Dlow(1)) AND (Dopen(0) <= Dhigh(1))
l3 = Dopen(0) < Dclose(1)
IF (Time = 100000) OR ((Time > 100000) AND (Time[1] < 100000)) then
BUY 1 Contract AT Market
SET Stop pLoss 300
SET Target pProfit 300
ENDIF
IF (Time = 170000) OR ((Time > 170000) AND (Time[1] < 170000)) AND LongOnMarket then
SELL at Market
ENDIF
//graphonprice Dopen(0) coloured(0,0,255,85)
//graphonprice Dopen(1) coloured(0,0,255,255)
//graphonprice Dhigh(1) coloured(0,255,0,200)
//graphonprice Dlow(1) coloured(255,0,0,255)
//graphonprice Dclose(1) coloured(0,0,255,80)
//graphonprice Sma100
Thank you so much for your time to help me..