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.

SL, TP and Entry Lines Listener in JForex-SDK and JForex
 Post subject: SL, TP and Entry Lines Listener in JForex-SDK and JForex Post rating: 0   New post Posted: Fri 15 Nov, 2013, 18:09 
User avatar

User rating: 7
Joined: Fri 13 Jan, 2012, 20:49
Posts: 94
Location: Poland, Warsaw
Hello,

Could you please add lines listener to JForex SDK and JForex with three methods: onStopLossSelection(IOrder),onTakeProfitSelection(IOrder), onEntrySelection(IOrder).

Best regards,
Kurak


 
 Post subject: Re: SL, TP and Entry Lines Listener in JForex-SDK and JForex Post rating: 0   New post Posted: Fri 15 Nov, 2013, 20:03 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi,

Could you explain, when do you want to fire these functions? What do you mean with an onStopLossSelection?
I am just wondering, as there might be workarounds available.


 
 Post subject: Re: SL, TP and Entry Lines Listener in JForex-SDK and JForex Post rating: 0   New post Posted: Sat 16 Nov, 2013, 20:32 
User avatar

User rating: 7
Joined: Fri 13 Jan, 2012, 20:49
Posts: 94
Location: Poland, Warsaw
By stopLossSelection I mean double click on Stop Loss line of given IOrder. I would like to fire the functions when a trader double clicks on one of the lines. I tried to detect the lines by IChart#getAll() to add listeners to them but they seem to be invisible for the method.

Best regards,
Kurak


 
 Post subject: Re: SL, TP and Entry Lines Listener in JForex-SDK and JForex Post rating: 0   New post Posted: Tue 19 Nov, 2013, 11:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Platform order lines are not part of the API, you can, however, override this behaviour with your own business logic.
Consider disabling the entry order display on chart:
And then in the onMessage method add a price marker whenever an order gets opened. Bind the price marker with the order by adding a listener to it, such that whenever the line gets moved - you adjust the order's open price.


 
 Post subject: Re: SL, TP and Entry Lines Listener in JForex-SDK and JForex Post rating: 0   New post Posted: Tue 19 Nov, 2013, 20:10 
User avatar

User rating: 7
Joined: Fri 13 Jan, 2012, 20:49
Posts: 94
Location: Poland, Warsaw
Thank your for the idea. I think it is good solution. Please close the topic.

Best regards,
Kurak


 

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