Programatically determine chart has changed in an EA?

 

Hello all,

Let's say I have an EA running on the EURUSD M15 chart... and I mistakenly change the Period, or the Currency (by dragging a pair or clicking a new timeframe button)... is there a way to do any of the following?

1. Trap the fact that the currency has changed (for the EA running using a static var?)

2. Cancel/reject/(don't allow) the change to occur once trapped

3. Disable the ability of Period and/or Currency changes in an EA (without hard-coding the EA to a specific pair or timeframe)

4. ???

Thank you for your replies!

-charliev