Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

SL Block Side Setting
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=140&t=57158
Page 1 of 1

Author:  roger_taum [ Fri 20 Sep, 2019, 13:33 ]
Post subject:  SL Block Side Setting

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.

Author:  vadim_berezhnoj [ Wed 25 Sep, 2019, 17:10 ]
Post subject:  Re: SL Block Side Setting

Please clearly explain step-by-step what function do you need.

Kind regards, Support Team.

Author:  roger_taum [ Thu 03 Oct, 2019, 09:01 ]
Post subject:  Re: SL Block Side Setting

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!

Author:  vadim_berezhnoj [ Thu 03 Oct, 2019, 14:51 ]
Post subject:  Re: SL Block Side Setting

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.

Author:  roger_taum [ Fri 11 Oct, 2019, 15:39 ]
Post subject:  Re: SL Block Side Setting

Thank you for the clarification. I hope it is implemented soon:)

Author:  frangonve [ Wed 16 Oct, 2019, 22:20 ]
Post subject:  Re: SL Block Side Setting

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)

Author:  vadim_berezhnoj [ Tue 12 Nov, 2019, 10:56 ]
Post subject:  Re: SL Block Side Setting

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.

Author:  roger_taum [ Tue 19 Nov, 2019, 10:09 ]
Post subject:  Re: SL Block Side Setting

Dear Admin,

Just checking if the "side" setting of the Set Stop Loss block is already working. Thanks.

  Page 1 of 1