palashcr:
Loop through all the open Orders, check their MagicNumber() and count the ones that match.
Please help me to use OrdersTotal() function to calculate specific trade by specific magic number
OrdersTotal() function usually retrieve total numbers of trade either those are executed by different EA or manual
I want to get numbers of trade executed by specific ea with specific magic number.
Thanks in advance
RaptorUK:
Loop through all the open Orders, check their MagicNumber() and count the ones that match.
Loop through all the open Orders, check their MagicNumber() and count the ones that match.
Thanks RaptorUK for the Idea I tried with following but it also Get total trade running I only want specific magic number's trade.
double TotalOrder(int magic) { double GetTotalOrder = 0; for(int cnt = 0; cnt < OrdersTotal(); cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber() == magic) { GetTotalOrder += (OrdersTotal()); } } return(GetTotalOrder); }
palashcr:
Thanks RaptorUK for the Idea I tried with following but it also Get total trade running I only want specific magic number's trade.
Thanks RaptorUK for the Idea I tried with following but it also Get total trade running I only want specific magic number's trade.
Yes it will, why are you doing this ?
GetTotalOrder += (OrdersTotal());
why not this ?
GetTotalOrder += 1;
Thanks WHRoeder for the link i got here many useful codes but I m not getting such which count trade for only specific magic. e.g i m using 2 ea for same pair in 2 chart i just count open trade which magic number is 12345
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
Please help me to use OrdersTotal() function to calculate specific trade by specific magic number
OrdersTotal() function usually retrieve total numbers of trade either those are executed by different EA or manual
I want to get numbers of trade executed by specific ea with specific magic number.
Thanks in advance