- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- Discussion of article "MQL5 Wizard: How to Teach an EA to Open Pending Orders at Any Price"
Instead of using High[] and Low[], use iHigh() and iLow() . . . then you can set the symbol that you want the high and low for . . .
To be able to use any symbol and not just the symbol of the chart use a variable that holds the chosen Symbol name . . .
extern string ChosenSymbol = "EURJPY"; // set the correct symbol name for this variable
. . . you use this variable in your iHigh, iLow and iBands unction calls, for example . . .
if ( iHigh(ChosenSymbol, 0, 1) > (iBands(ChosenSymbol, 0, cnt, 2, 0, PRICE_CLOSE, MODE_MAIN, 1) + ((iBands(ChosenSymbol, 0, cnt, 2, 0, PRICE_CLOSE,MODE_UPPER,1) - iBands(ChosenSymbol, 0, cnt, 2, 0, PRICE_CLOSE, MODE_MAIN, 1)) * BB2multiplier)))
yes I know but it is very hard because I do not speak English :-)
I can imagine that would make it harder . . . but Forex is impossible anyway, so you are just making the Impossible a little harder ;-)
You might see if you can find a Forum in your own language that covers Forex and has a coding section, that way you will be able to get help in your own language . . of course you are always welcome here too. :-)
Ah I see . . . no, it may be but it also may not be.
Close[15] on M1 is the close value of the bar that happened 15 bars to the left from the current bar, so if the current time is now 14:33 and we have a M1 bar for every minute, then Close[15] is for the bar that opened at 14:18 and closed just before 14:19
Close[1] on M15 is for the bar that happened one bar to the left, if the current time is 14:33 one bar to the left is the bar that opened at 14:15 and closed just before 14:30 . . . .
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use