I have some actions that I want to happen in my strategy if I'm AutoTrading but that I don't want to get executed if I'm running a backtest (alerts, sharedVar, extra logging, etc).
Is there a way to detect whether the signal is being run live vs as a backtest?
For instance:
Code: Select all
If isAutoTrading = True Then
BEGIN
// Stuff to only do on live / auto trading, but not when backtesting
END;