So I'm looking for a NinjaScript variable that indicates whether it currently runs on real time or backtest data?
It appears NT is missing such an indicator.
My idea, at the moment is to set a variable, realTimeFlag, in OnMarketData() to true since OnMarketData() never gets called on backtest data.
The idea is to use that variable elsewhere in the strategy to correctly set the order size if running in real time?
Is there a better way? Is this idea risky?
Sincerely,
Wayne
Comment