Is there any way to tell from within a script if the strategy is being backtested or traded live?

Author