Determine whether EA is in tester mode.

 

How can I tell if my EA is running in the Strategy Tester or in realtime data? When I run it for real my EA adds lines on the chart and activates individual windows when trades look propitious - I think it would be inefficient for it to do this if I run it in the tester. To prevent this I'd like to know if I'm in the Tester environment or not. Can this be done?

And yes, before someone says, I have done a search and I found nothing.

 
Looks like I've found it - IsTesting()
 

A couple other bools to be aware of are the IsOptimization() and IsVisualMode() bools.