SetTradeDelays(0,0,0,0);
BuyPrice = C;
SellPrice = C;
ShortPrice = C;
CoverPrice = C;
Hello,
I have tried to block trades on Friday after 5.30pm. But it seems to
block all trades on friday, and all trades at 5.30pm. I also want to
force an exit on Friday at 5.30pm (if a position is open). The code
below is wrong??? Can anyone help, please!!!
ConditionA = (DayOfWeek() != 5 AND TimeNum()!=173000);
ConditionB = (DayOfWeek() == 5 AND TimeNum()==173000);
Buy = Cross(TimeFrameExpand(SumRsi,2*in15Minute),TimeFrameExpand(RSICMA,2*in15Minute))
AND ConditionA;
Sell = Cross(TimeFrameExpand(RSICMA,2*in15Minute),TimeFrameExpand(SumRsi,2*in15Minute))
OR ConditionB;
Short = Cross(TimeFrameExpand(RSICMA,2*in15Minute),TimeFrameExpand(SumRsi,2*in15Minute))
AND ConditionA;
Cover = Cross(TimeFrameExpand(SumRsi,2*in15Minute),TimeFrameExpand(RSICMA,2*in15Minute))
OR ConditionB;