How to catch the Algo Trading Button click event?

 

Anyone know how to catch the 'Algo Trading Button' click event in an EA? If it is turned on or off I need to run some logic.

TIA

 
Warren2010:

Anyone know how to catch the 'Algo Trading Button' click event in an EA? If it is turned on or off I need to run some logic.

TIA

TerminalInfoXXX() will give you what you need.

There is no event being triggered, we can watch.
You need to watch the state of trading allowed/enabled to notice if the switch has changed state.
 
Warren2010:

Anyone know how to catch the 'Algo Trading Button' click event in an EA? If it is turned on or off I need to run some logic.

TIA

if you mean the settings in the options then check TERMINAL_TRADE_ALLOWED

 
So basically in OnTick or OnTimer just check to see if it's enabled?
 
Warren2010 #:
So basically in OnTick or OnTimer just check to see if it's enabled?
Basically yes.