Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

MagicNumber MT4 simulair to getLabel IOrder?
 Post subject: MagicNumber MT4 simulair to getLabel IOrder? Post rating: 0   Post Posted: Mon 22 Aug, 2011, 14:33 

User rating: -
I have a question regarding the identifier which uniquely defines an order.
In MetaTrader 4 I used the MagicNumber of the order to identify to source of the order, so, I could see the order was placed by that particular Bot.

In Dukascopy I have noticed there is a label in each order which can be retrieved by the getLabel method of the order.
This label must be unfortunately unique for each order. In MetaTrader 4 you could have the same MagicNumber for all orders placed by the Bot.

So, to write a equivalent functionality as the MagicNumber, I must write a function which parses this label for a particular value (splitting timestamp for example)?


 
 Post subject: Re: MagicNumber MT4 simulair to getLabel IOrder? Post rating: 0   Post Posted: Tue 23 Aug, 2011, 07:35 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
MykelSilver wrote:
So, to write a equivalent functionality as the MagicNumber, I must write a function which parses this label for a particular value (splitting timestamp for example)?
It is the case if you want to keep that data directly in the order. Also you might consider keeping this data in comment which can get added to an order on its submission and the retrieved by IOrder.getComment().
If strategy is working with its own orders then you might as well map each order to its MagicNumber, i.e. Map<IOrder, String> magicNumbers.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com