Many thanks Dear Khaled and sorry for hanging you a lot on this. I am new in this software , I normally back test in Metrader4 (but not professional software form back testing). Totally agree with you that lower time frame will be earlier catch for the trade. I am trying differ scenario. My manual back test good. I entered as well in demo for 3 weeks , so far good results (apart form 1:1 R to reward). (I normally trade live with diff. system)
I tried to modify the code in such way that once condition in TF daily and 1 hr met to open the trade once the closed of candle above EMA 10 in time frame 1 H (as per defied condition) but I got sell and buy trades (which is very strange to me). Which means in daily time frame if conditions met , then looking for 1 H and should conditions met as per 1 h conditions and also to execuate the trade after meeting 1 h criteria . In particular closing 1h candle above/below 10 EM.(b elow case for sell , should be below)
DEFPARAM CUMULATEORDERS = FALSE
TIMEFRAME(daily)
c1=0
c2=0
c3=0
indicator1= MACDline [21,89,8]((High+Low)/2)
indicator2= MACDSignal[21,89,8]((High+Low)/2)
indictaor3= exponentialaverage[50](close)
indictaor4= exponentialaverage[20](close)
xClose = (open + close + high + low) / 4
c1=(MACDline [21,89,8]((High+Low)/2) < MACDSignal[21,89,8]((High+Low)/2))
c2= (xClose[1] < exponentialaverage[50](close))
c3= (xClose[1] < exponentialaverage[20](close))
TIMEFRAME(4 hour )
c4=0
indicator5= MACDline [21,89,8](High+Low)/2
indicator6= MACDSignal[21,89,8](High+Low)/2
ATR = AverageTrueRange[14](close)
c4=(MACDline [21,89,8](High+Low)/2 < MACDSignal[21,89,8](High+Low)/2)
TIMEFRAME(1 hour)
c5=0
c6=0
indicator7= MACDline [21,89,8]((High+Low)/2)
indicator8= MACDSignal[21,89,8]((High+Low)/2)
indictaor9=exponentialaverage[10](close[2])
c5=(MACDline [21,89,8](High+Low)/2 < MACDSignal[21,89,8](High+Low)/2)
c6=(xClose[1] < exponentialaverage[10](close[2]))
//xClose = (open + close + high + low) / 4
TIMEFRAME(1 hour ,updateonclose)
IF c1 and c2 and c3 and c6 THEN // c4 and
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
SET STOP PLOSS (1.5 * ATR)
SET TARGET PPROFIT (1.5 * ATR)