PositionGetInteger(POSITION_MAGIC) ?
Thnx 14 hours later this is how it works:
int cnt;
int total;
long order_magic;
total=PositionsTotal();
for(cnt=0 ;cnt < total; cnt++)
{
if((ticket = PositionGetTicket(cnt))>0 && PositionGetString(POSITION_SYMBOL) == _Symbol)
{
order_magic = PositionGetInteger(POSITION_MAGIC);
if(order_magic == 123456789) ...do some code ;
}
}
int total;
long order_magic;
total=PositionsTotal();
for(cnt=0 ;cnt < total; cnt++)
{
if((ticket = PositionGetTicket(cnt))>0 && PositionGetString(POSITION_SYMBOL) == _Symbol)
{
order_magic = PositionGetInteger(POSITION_MAGIC);
if(order_magic == 123456789) ...do some code ;
}
}
Now i wonder: is this the right way to do it ...?
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
Im freaking out to check if Magicnumber XXXXXX[1-9] exist.
How can i search in heding mode for magicnumbers of actual symbol.
(I remember the way it is codet in MT4 but i can not find out how to fine it in MT5)
ist there something like:
//Loop with cnt=++
if (Search Positions (Magicnumber = myMagicnumber[cnt]) ) ...do some Code...
THANK U ;-)