planetman:
Hello guys,
I use the standard
Why is that happening?
Edit your post. Use the code button to post code.
Do not repost, edit your existing post.

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
Hello guys,
I use the standard
for(int i = OrdersTotal() - 1; i >= 0; i--)
{
if(OrderSelect(i, SELECT_BY_POS))
{
if(Symbol() == OrderSymbol() && magicNumber == OrderMagicNumber())
.........
to pass every order from the last opened to the first opened but if I want to do the opposite, for example to see what was the first lot opened for a specific pair or to add the profit of the first 3 orders, I write:
for (int i = 0; i <= OrdersTotal() - 1; i++)
{
if (OrderSelect(i, SELECT_BY_POS))
{
if (Symbol() == OrderSymbol() && magicNumber == OrderMagicNumber())
{
.......
But I think that some orders are not calculated or it jumps some of them.
Why is that happening?