I want to inform you that I am trying to add active and inactive period of my strategy.
The issue is that somehow the strategy does not respond to the basic drawing tool at cetain time.
if (ToTime(Time[0]) == StartingTime) { DrawText("StartingTime" + CurrentBar, "StartingTime", 0, High[0] + 5 * TickSize, Color.LimeGreen); DrawVerticalLine("StartingTime", 0, Color.LimeGreen, DashStyle.DashDot, 2); } if (ToTime(Time[0]) == EndingTime) { DrawText("EndingTime" + CurrentBar, " EndingTime", 0, High[0] + 5 * TickSize, Color.OrangeRed); DrawVerticalLine("EndingTime", 0, Color.Red, DashStyle.DashDot, 2); } if (ToTime(Time[0]) == BeforeNews) { DrawText("BeforeNews" + CurrentBar, " EndingTime", 0, High[0] + 5 * TickSize, Color.OrangeRed); DrawVerticalLine("BeforeNews", 0, Color.Red, DashStyle.DashDot, 2); }
I tried onlytwo lines. just starting time and ending time. it gave the same results it draws only one vertical line with its text. and ignore the second one.
I tried to change StartingTime with the number 130000 and EndingTime with 225000
didn't work & gave same result (1 part executed)
I actually tried to call to use intervals with bools activetradingtime =true/false;
the issue is that the strategy doesn't draw more than one simple line at a specific time. and totally does not execute the intervals logic
Summary : I need to draw 4 lines and create two intervals. Starting/beforeNews, AfterNews/Ending
Please, tell me what went wrong with my logic. I think I will be able to debug it myself if I understand the real issue here.
Thank you.
Comment