Dukascopy
 
 
Wiki JStore Search Login

TRAILING STOP AND BREAK EVEN
 Post subject: TRAILING STOP AND BREAK EVEN Post rating: 0   New post Posted: Sat 24 Jan, 2015, 16:04 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
Hello Community!

Is there a way in strategy to make active a break even function and a trailing stop function?

In fact I test some strat (i.e. FractalLines.java in JSTORE called "Fractal Break Out") and when you set a stop at 10 pips, a Break even trigger at 10pips positivs with stop move at 0, and a trailing stop trigger at 30pips, only the break even works.

I expected that after 10 pips positiv, the stop will move at 0 (open order level) for the break even.
And when I 'm 30pips positiv, my stop should move at 20 pips positiv with the trailing stop.

In fact, if I set the BE at trigger=0 and shift(or pips saved) =0 , the trailing stop does the job as expected.
If I set the BE, the trailing stop doesn't work.

Is there an error in the code or is it impossible to add BE and Stop trailing actives in the same strategy??

Thanks a lot for any help.
Math


Attachments:
FractalLines.java [12.13 KiB]
Downloaded 113 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.
 
 Post subject: Re: TRAILING STOP AND BREAK EVEN Post rating: 0   New post Posted: Tue 27 Jan, 2015, 23:38 
User avatar

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

There are probably bugs in the code. BE and trailing SL could work next to each other. Why should it not work?


 
 Post subject: Re: TRAILING STOP AND BREAK EVEN Post rating: 0   New post Posted: Wed 28 Jan, 2015, 20:43 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
Hi, thanks for answer, and happy to know that there can't be any conflict between a B.E. and a S.T. used in the same trade(I had some doubts...!)

To answer to your question, I had a bad experience in a strategy where the stop moved to break even and the traling stop was blinking behind the price without suppression of the break even.
So when the trade reverse, the stop trailing didn't do the job and the trade was finally closed on break even (which stayed at the "same place").

In the FractalLine strategy it is an other probleme but can't find where is the error in the code...

cheers,
MATH


 

Jump to:  

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