How to make EA work on specific timeframe only within specific chart

 

Hello.

I am looking for a code that will make an expert advisor work within a specific timeframe e.g. M_15 and also I need a code to make it work on only the chart I drop the EA.

Currently, when I drop my EA (or scripts) on any chart in my MT4, it always attaches to AUDCAD.

This happens even when the AUDCAD is not opened.

I would appreciate any help I get. Thank you. 

PS; I am new at MQL4 coding so please make your explanations as simple as possible or give me the working code if you want to help.

 
Adenekan Ogungbola: I am looking for a code that will make an expert advisor work within a specific timeframe e.g. M_15 and also I need a code to make it work on only the chart I drop the EA. Currently, when I drop my EA (or scripts) on any chart in my MT4, it always attaches to AUDCAD. This happens even when the AUDCAD is not opened. I would appreciate any help I get. Thank you. PS; I am new at MQL4 coding so please make your explanations as simple as possible or give me the working code if you want to help.

If your EA is only trading on AUDCAD, then that is because the trade symbol is hard coded into the EA.

It will need to be modified to use the current symbol of the chart instead.

Since you have not provided your code, it is difficult to give any specific advice.
Reason: