for(i=0; i<=1; i++)
{
OrderSelect(i,SELECT_BY_POS);
Print("Order Open Price for ",OrderTicket()," is ",OrderOpenPrice());
//.....or something else with these values
}
FXtrader2008:
for(i=0; i<=1; i++)
[...]
Isn't that going to return the prices of the two oldest positions, not the two most recent ones? In addition, it's not necessarily taking account of (a) pending orders, and (b) orders placed by other EAs.
Depending on whether "opened" means "filled" or just "placed", then a fuller answer is going to be something like the opposite of 'Selecting Order from 2 same symbols'.
Thanks for all your help guys! :)
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
thanks!