[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 206

 
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!

 
OK thanks guys for the clarity and let's keep conjuring up good luck and good luck tomorrow :)))))))
 
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...
 
Okay, thanks guys.
 
laveosa:
All right, thanks, guys.
And tomorrow, with a clear head, you'll be able to 'wiggle your brain'!
 
:))))) It's come to me,guys............ It's been a tough day, you're right...... but thanks anyway.
 

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

 
solnce600:

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!

Reason: