I copy a simply code of an indicator I wrote, with a part of code that fail with the error: Error on requesting bars series: 'From-date (12/1/2099 12:00:00 AM) must to be smaller than to-date (1/1/1800 12:00:00 AM)',
I identify the failure to be due to the call to StdDev with an input of the MACD in OnStateChange State.Configure:
case State.Configure: MACD0 = MACD(Input, MomFastPeriod, MomSlowPeriod, MomSmothPeriod); SDBB1 = StdDev(MACD0, MomSmothPeriod); //.. break;

Comment