sir7williams:
I coded this function to get the total lot size for my buy positions but it gives 0.00 all the time. Can I get assistance please
double totalBuyVolume(int Magic) { double result = 0; ulong order_ticket; int total=0; for(int i=0;i<PositionsTotal();i++) { if((order_ticket=PositionGetTicket(i))>0) if(PositionGetInteger(POSITION_MAGIC)==Magic && PositionGetString(POSITION_SYMBOL)==_Symbol && PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY) result+=PositionGetDouble(POSITION_VOLUME); } return(result); }
Thank U Sir, You provide a complete solution!!
Nikolay Georgiev:
Thank you so much sir

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
I coded this function to get the total lot size for my buy positions but it gives 0.00 all the time. Can I get assistance please