Dukascopy
 
 
Wiki JStore Search Login

Stop Loss problem
 Post subject: Stop Loss problem Post rating: 0   New post Posted: Wed 02 Sep, 2015, 11:46 
User avatar

User rating: 0
Joined: Mon 07 May, 2012, 07:24
Posts: 69
Location: CroatiaCroatia
Hello,
I have a problem with the attached strategy that closes the trade when profits reach 200 pips. It is anticipated that the strategy in the first step to move the stop loss to 25 pips in profit when it reaches 100 pips and it works. The problem arises in the second step. It is anticipated that when the trade reaches 200 pips, the stop loss should go up for another 80 pips, but the strategy of closing the position. Since I was unable to find a logical reason, maybe you can help me with this problem.

PS: the date of the historical test is August 19th 2016.

regards


Image
Image
Image


Attachments:
PICT2.png [369.08 KiB]
Downloaded 353 times
PICT3.png [351.84 KiB]
Downloaded 289 times
PICT1.png [148.95 KiB]
Downloaded 284 times
mEUAUv21.vfs [53.15 KiB]
Downloaded 115 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: Stop Loss problem Post rating: 0   New post Posted: Wed 02 Sep, 2015, 15:58 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Thanks for the clear description!
Actually your 2nd SL works well and the stop is moved straight afterward to the second level but it is executed immediately as the market price reached it.
You can test this by reducing the SL level to 10 and 20 pips for instance (for testing purpose) and you can see that the order moved after the second price condition is met.
Moreover, you are using a trailing step but the trailing is not working as the flow is blocked by your variable incr1 =0 after the first SL order move. I would use a simple "Set SL" block if you don't need a trailing step but in case you need it, you may need to change the conditions so that the trailing can be done.

Cheers !


 
 Post subject: Re: Stop Loss problem Post rating: 0   New post Posted: Thu 03 Sep, 2015, 13:46 
User avatar

User rating: 0
Joined: Mon 07 May, 2012, 07:24
Posts: 69
Location: CroatiaCroatia
Hello Amine, and thanks for the quick response.

On your suggestion I changed blocks to the stop loss except that I have to enter a negative value if I want to move the stop loss to a profit (for example, to move 25 pips in profit must enter -25).
Furthermore, though I have found a mistake in the previous version of the strategy. In its speed I have chosen the wrong variable in the assign block (see picture).

Image
Computers do not make mistakes - people make mistakes! :lol:
Now both versions work the way I imagined.

Thanks again for the help!

regards


Attachments:
pict4.png [63.05 KiB]
Downloaded 332 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.
 

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