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

How to not add TP and SL orders?
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=146&t=51825
Page 1 of 1

Author:  nine99 [ Fri 31 Oct, 2014, 15:44 ]
Post subject:  How to not add TP and SL orders?

Greetings,

i have an annoing issue with Visual Jforex, or maybe rather Jforex.

If You make strategy in Visual Jforex, any kind of strategy which open some positions, You can, in Visual Jforex 'default variables', leave in 'default stop loss' and 'default take profit' an empty string. I don't mean placing '0' there, i mean leaving those values empty.

When You do it, and when You test run Your strategy through 'Visual Jforex/Compiler/Run',
than Your strategy is working in Jforex and orders are 'adding' without TP and SL.

But, when You compile the exactly same file and run in through 'jforex/strategies', You just can't use the strategy without Stop Loss and Take Profit adding to every single order, both pending and market.

When You're starting Your strategy through 'jforex/strategies' a window pops up - and in this window there are, again, 'Defaultstoploss' and 'defaultTakeProfit' values, but You just CAN'T leave them empty. Those strings are filling themselves automatically when You try to clear them with 'backspace'. And when You place '0' in them, they just placing stop loss and take profit at 'order entry' price which means that they are executed immediately.

Please, support, take a look into it.

You can see, that:

- when You run some strategy which open pending orders through 'Visual Jforex/Compiler/Run', there is ONE order per position added to 'orders' tab.
- when You run exactly same compiled strategy through 'jforex/strategies', there are always THREE orders per one position, because of stop loss and take profit.

What does it mean?
Am i really forced to run any 'visual jforex' strategies with 'stop loss'/'take profit' any single time?
How can i bypass it?

It's not a problem when i'm using jforex manually. In Jforex, like You surely know, adding TP or SL is an option, not something that You can't avoid.


Thank You for Your explanation,

kind regards,
nine99

Author:  amine_chourou [ Fri 31 Oct, 2014, 16:49 ]
Post subject:  Re: How to not add TP and SL orders?

Hi,

Running a strategy without any SL or TP is indeed possible in Visual Jforex and also in Jforex. This depends on how you define your default variables. As you may know, default variables are set to popup each time when the strategy is launched for 'on the fly' editing and you can set as many as you want of them.
To define your global variable sin Jforex please check the following screenshot:

Image

Once any default variable is set to "False" in the the Global variables from VJF interface it disappear from the historical testing parameters and your strategy will run accordingly.

Thanks

Attachments:
DefaultVar.png [108.03 KiB]
Downloaded 373 times

Author:  schweizerkatz [ Wed 03 Dec, 2014, 01:45 ]
Post subject:  Re: How to not add TP and SL orders?

If you want to open positions without SL or TP, solution is to leave SL and TP fields in the position opening blocks empty. Simply delete any variables that are there. If you also want not to be asked for SL and TP during strategy start, make SL and TP in "default variables" private, as shown on previous post.

  Page 1 of 1