I'm trying to reference multiple time frames in a strategy. What I would like to do is trade in a 5 minute time frame, but I would like to check a daily time frame to see if a condition is met by an indicator, and if so I want to cease trading (ie. if the market is doing something that has proven to make my 5 minute strategy ineffective, I would like to stop trading until normalcy returns).
My issue is that my code stops running the instant I add the line for the new period
protected override void Initialize() { Add(PeriodType.Day, 1); }
Synopsis:
I am running back tests off of imported data. The strategy will run in both 5 minute or daily time frame separately just fine. As soon as code is added for new time period it all stops working.
Can someone give me any idea what I might be missing that is causing this to kill my script?
Thanks in advance
Comment