so what's your issue
Pak Hong Poon:
so what's your issue
so what's your issue
// Currently have 20 instruments selected in the market. but shows as 0 always :p
Trying to get SymbolName
You forgot about PositionGetTicket

Documentation on MQL5: Trade Functions / PositionGetTicket
- www.mql5.com
PositionGetTicket - Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Hello Vladimir;
I used %s instead of %G - working fine now.
For example like this: position selection via PositionGetSymbol
int count_positions=PositionsTotal(); // number of open positions for(int i=count_positions-1;i>=0;i--) { ResetLastError(); //--- returns the symbol of the corresponding open position and automatically selects the position for further work with it string name=PositionGetSymbol(i); if(name==NULL) { Print("PositionGetSymbol Error# ",GetLastError()); return; } double position_lot=PositionGetDouble(POSITION_VOLUME); // get the position volume *** }

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
Hi There;
I have the following on my EA / OnTick()