If you can specify a currency instrument in the Ordersend() function, then I understand that this operation binds it to this instrument and we can run tests on other currency pairs and get the same result, or not?
What exactly should I add in the Ordersend() operator instead of Symbol() for it to work only on the specified currency pair, regardless of the currency I'm testing, can you please tell me.
laveosa: Or maybe there is a way to test the combination of several criteria for different currencies and get a complete result?
It has already been explained to you that the tester in MT4 only works with the data of the chart instrument to which the EA is attached. You need enough experience to foresee without optimisation the results of the program! I will not take up this task for a long time yet! Maybe only when MT4 will disappear and I will have to master MT5, which I do not believe!
laveosa: If you can specify a currency instrument in the Ordersend() function, then I understand that this operation binds it to this instrument and we can run tests on other currency pairs and get the same result, or not?
You have already been told 5 times. Use your head a little bit. It's not a logical question, it's quite primitive. NULL - works on any instrument, and if you specify a pair "Instrument", on a specific instrument...
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.
Or maybe there is a way to test the combination of several criteria for different currencies and get a complete result?
It has already been explained to you that the tester in MT4 only works with the data of the chart instrument to which the EA is attached. You need enough experience to foresee without optimisation the results of the program! I will not take up this task for a long time yet! Maybe only when MT4 will disappear and I will have to master MT5, which I do not believe!
If you can specify a currency instrument in the Ordersend() function, then I understand that this operation binds it to this instrument and we can run tests on other currency pairs and get the same result, or not?
You have already been told 5 times. Use your head a little bit. It's not a logical question, it's quite primitive. NULL - works on any instrument, and if you specify a pair "Instrument", on a specific instrument...
All right, thanks, guys.
Gentlemen, please tell me how to code (probably in a conditional statement) a simple idea
-if a trade was closed at a stop loss
-open another trade at the stop loss price
Thank you
Gentlemen, please tell me how to code (probably in a conditional statement) a simple idea
-if a trade was closed at a stop loss
-open another trade at the stop loss price
Thank you
Exactly at the price of stop-loss you can not open, but to put the condition to open in the same or reverse direction is possible!
Here's a function call from Kim's "Useful Functions" that you can put in a condition:
isCloseLastPosByStop - Returns flag to close last position by stop
if(isCloseLastPosByStop() == 0) or ... == 1) and whatever you want ......
You can find the function here: https://www.mql5.com/ru/forum/131859
And put it outside the start!
And I beg you! You may do all this by yourself, with diligence, accuracy and patience, otherwise you will not learn anything from hints!
Knowledge is gained only with adequate effort on your part! Get into daily inquisitive work! Good luck!