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.

IEngine.broadcast() - strategy can send a message to itself.
 Post subject: IEngine.broadcast() - strategy can send a message to itself. Post rating: 0   New post Posted: Fri 03 Feb, 2012, 22:54 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
Hello support,

I found out the possibility to send a broadcast message (https://www.dukascopy.com/wiki/index.php ... st_message).
Unfortunately a strategy cannot send a broadcast message to itself, only to other strategies.
I think, if this would be possible anyway (e.g. with an additional option for IEngine.broadcast method), this would be also a possible solution for the problem described above.
(create a broadcast message inside an ActionListener of a graphical object and process this message inside onMessage event)

Can you please consider to extend the broadcast method with this feature ?


 
 Post subject: Re: Why "incorrect thread"? Post rating: 0   New post Posted: Fri 24 Feb, 2012, 22:48 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
Hello support,

I want to ask you again to consider the enhancement of IEngine.broadcast() method with an additional option so that a strategy can send a message to itself.

Regards
AbsoluteReturner


 
 Post subject: Re: IEngine.broadcast() - trategy can send a message to itself. Post rating: 0   New post Posted: Mon 27 Feb, 2012, 15:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please elaborate why do you need such functionality. It sounds pretty strange - "send a message to itself".


 
 Post subject: Re: IEngine.broadcast() - strategy can send a message to itself. Post rating: 0   New post Posted: Tue 28 Feb, 2012, 13:29 

User rating: 1
Joined: Tue 12 Jul, 2011, 20:43
Posts: 51
Location: Germany,
I already posted the original reason of this request detailed in the following thread (my posts from january 2012): viewtopic.php?f=65&t=45527

Someone created this new feature request topic and moved my last posts from "incorrect thread" topic to here, therefore the context was lost.

I think, a broadcast message from a strategy to itself is a possible simple solution to avoid the runtime error described in "incorrect thread" topic.
For example, I can send a broadcast message when a custom button in a bottom tab was clicked, and then pocessing this event inside onMessage() function of the same strategy.
The advantage is that I can process user interface actions immediately, without waiting until the next tick is arrived. This is very important for scalping !

Regards
AbsoluteReturner


 
 Post subject: Re: IEngine.broadcast() - strategy can send a message to itself. Post rating: 0   New post Posted: Fri 02 Mar, 2012, 13:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please take a look at the attached example: how to submit an order without broadcasting.


Attachments:
CustomThreadStrategy.java [6.39 KiB]
Downloaded 287 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

  © 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