If there is open position gives the closing price of the previous one.
If there is no open position, gives the closing price of the latter.
In any case, and taking advantage to improve my code, if you use an counter, you can get the closing price of the position that interests you: from the end of history, the first closed, the second, the fourth ...
There is a small error to run well in multi-currency ... Can you guess it?.
I leave that as an exercise
Well... thanks a lot !
I tried to find the small error. I didn't find it. Perhaps is too small or more sure because I am at the beginning (as I said earlier)
I tried to find the small error. I didn't find it. Perhaps is too small or more sure because I am at the beginning (as I said earlier)
Open and close in the terminal several positions of two different pairs: EURUSD and USDJPY for example.
Ask for the closing price of the third position of EURUSD from the end. You'll see that you get the price of the third position of the history but not of the symbol.
The counter only must add with the specified symbol..
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 there is no open position, gives the closing price of the latter.
In any case, and taking advantage to improve my code, if you use an counter, you can get the closing price of the position that interests you: from the end of history, the first closed, the second, the fourth ...
There is a small error to run well in multi-currency ... Can you guess it?.
I leave that as an exercise
Well... thanks a lot !
I tried to find the small error. I didn't find it. Perhaps is too small or more sure because I am at the beginning (as I said earlier)
Well... thanks a lot !
I tried to find the small error. I didn't find it. Perhaps is too small or more sure because I am at the beginning (as I said earlier)
Open and close in the terminal several positions of two different pairs: EURUSD and USDJPY for example.
Ask for the closing price of the third position of EURUSD from the end. You'll see that you get the price of the third position of the history but not of the symbol.
The counter only must add with the specified symbol..