help needed

#1
Bh=High>MA(H,4);
bl=High<MA(H,4);
sh=Close>MA(L,4);
Sl=Close<MA(L,4);
AddTextColumn(WriteIf(Bh,"Buy",WriteIf(bl,"Sell","")),"4 H",colorDefault,-1);
AddTextColumn(WriteIf(sh,"Buy",WriteIf(sl,"Sell","")),"4 L",colorDefault,-1);

the signal are not found as per condition pls correct where am i wrong
it is giving correct result for current date
but wrong results for n=5
 
Last edited:

Similar threads