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.

Order submits in separate threads question
 Post subject: Order submits in separate threads question Post rating: 0   New post Posted: Mon 18 Jan, 2010, 17:41 

User rating: 0
Joined: Mon 11 Jan, 2010, 16:13
Posts: 4
I have custom "OrderNew" classes which are executing "engine order submits" via executeTask. this works fine.

My question is I have one registered ISystemStrategy class...will the "OnMessage" events that come back as a result of the "engine submit" within executeTask be lost (hitting OnMessage in an ISystemStrategy I can't see) or will all of these messages pipe back through my OnMessage in my singular ISystemStrategy class? IF they do pipe through my singular ISystemStrategy is that thread safe?

If they all pipe through the same OnMessage I supposed I better synchronize it.

Any insights would be helpful.. thank you. bob


 
 Post subject: Re: Order submits in separate threads question Post rating: 0   New post Posted: Tue 19 Jan, 2010, 08:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
There is no ISystemStrategy class in our API. Do you mean ISystemListener?

ISystemListener is the class that receives events about the strategy and the system, general events like strategy started or system disconnected

IStrategy is the class that defines strategy methods. All methods defined in IStrategy are called in one strategy thread. There is no need to synchronize access to the variables that are accessed only from IStrategy defined methods


 

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