If I am looking at the hourly chart and I want to assess conditions on two different currency pairs(eurusd and usdchf for example)...can I code a common indicator (MACD for example) to get values from two different currencies within one EA? Is this possible:
double H2,H1;//high for eurusd
double L2,L1;//high for usdchf
H2 = iHigh(Symbol(),60,2);
H1 = iHigh(Symbol(),60,1);
I am wondering if I have to set a global variable if certain conditions are met and then call that within the EA? Any help or insight would be greatly appreciated!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
If I am looking at the hourly chart and I want to assess conditions on two different currency pairs(eurusd and usdchf for example)...can I code a common indicator (MACD for example) to get values from two different currencies within one EA? Is this possible:
double H2,H1;//high for eurusd
double L2,L1;//high for usdchf
H2 = iHigh(Symbol(),60,2);
H1 = iHigh(Symbol(),60,1);
I am wondering if I have to set a global variable if certain conditions are met and then call that within the EA? Any help or insight would be greatly appreciated!
Dan