Dukascopy
 
 
Wiki JStore Search Login

SL Block Side Setting
 Post subject: SL Block Side Setting Post rating: 1   New post Posted: Fri 20 Sep, 2019, 13:33 

User rating: 1
Joined: Tue 06 Nov, 2018, 12:44
Posts: 9
Location: BulgariaBulgaria
Dear Vadim,

You locked my previous thread with the same name for some reason but I still need an example in order to understand how to do it as your explanation was not very clear and I could not find the answer in the manual. Can you please upload vfs file? Thanks.


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Wed 25 Sep, 2019, 17:10 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 533
Location: Ukraine, Kiev
Please clearly explain step-by-step what function do you need.

Kind regards, Support Team.


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Thu 03 Oct, 2019, 09:01 

User rating: 1
Joined: Tue 06 Nov, 2018, 12:44
Posts: 9
Location: BulgariaBulgaria
Dear Support Team,

I need a function which allows me to change the stop loss "side".

I will give an example: when you set a pending long order with a predefined stop loss, by default the platform sets the stop loss at bid. I would like to have the stop loss set at ask.

When I use the Stop Loss block of the Visual JF and change the side setting to "opposite side", it still sets the stop loss at bid, and not at ask as I would like it to be.

My request is if you can upload a vfs file showing how I can change the stop loss side from bid to ask as I tried everything and it always sets the SL at bid. Thank you very much in advance!


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Thu 03 Oct, 2019, 14:51 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 533
Location: Ukraine, Kiev
Unfortunately the function of choosing trigger side is not working in Set Stop Loss block.
By now it is impossible to set trigger side in stop loss orders from Visual.
We are working on the fix of the issue.

Kind regards, Support Team.


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Fri 11 Oct, 2019, 15:39 

User rating: 1
Joined: Tue 06 Nov, 2018, 12:44
Posts: 9
Location: BulgariaBulgaria
Thank you for the clarification. I hope it is implemented soon:)


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Wed 16 Oct, 2019, 22:20 
User avatar

User rating: 1
Joined: Fri 27 Jul, 2012, 07:04
Posts: 71
Location: Spain, Paracuellos de Jarama
roger_taum wrote:
Thank you for the clarification. I hope it is implemented soon:)


When you have your strategy Visual JForex ready, if you want you can hack the generated java code using the editor in jforex platform very carefully:

This explanation won't be enough if you have no experience coding but the essential is this:

Find the the stop loss block(s) that you want to change in the code and there you'll see something similar to this:

argument_1.setStopLossPrice(stopLoss);

Then you can modify the line to set the BID or ASK side as you wish modifying like this:

argument_1.setStopLossPrice(stopLoss, OfferSide.BID);

Or like this:

argument_1.setStopLossPrice(stopLoss, OfferSide.ASK);

Then you have to compile the code and test it very carefully with the backtest module and use a demo account to confirm that works properly.

Remember, use this information at your own risk!
Cheers
Francisco

(Edited for correction)


 
 Post subject: Re: SL Block Side Setting Post rating: 0   New post Posted: Tue 12 Nov, 2019, 10:56 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 533
Location: Ukraine, Kiev
Interventions in code generated by Visual JForex are not approved.
All changes are done at your own discretion and would not get help from Support Team.


 

Jump to:  

cron
  © 1998-2011 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