Paul,
just look at the MACD sample that comes with Metatrader. It looks through all orders and sets the limits based on the order type. To see the last one you'll need to go through the loop and look for the index with the latest order date.
Markus
just look at the MACD sample that comes with Metatrader. It looks through all orders and sets the limits based on the order type. To see the last one you'll need to go through the loop and look for the index with the latest order date.
Markus
Paul,
just look at the MACD sample that comes with Metatrader. It looks through all orders and sets the limits based on the order type. To see the last one you'll need to go through the loop and look for the index with the latest order date.
Markus
Yes, but does it look at the historical Positions? or the positions currently open?
It looks at the open ones. But if you change OrderTotal() to HistoryTotal() and use change MODE_TRADE to MODE_HISTORY in the OrderSelect() statement you can go through the historic ones as well.
Markus
Markus
It looks at the open ones. But if you change OrderTotal() to HistoryTotal() and use change MODE_TRADE to MODE_HISTORY in the OrderSelect() statement you can go through the historic ones as well.
Markus
This doesnt doit, i tried the first case, and it workes, but histrical id doesnt
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How can I write into the EA, an instruction for the program to "see" the type of the last position.
for example, if i load the EA into MT and the last position in the account was long then do one thing(A), if the last position was short then do another(B)