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

To close open position
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=146&t=54430
Page 1 of 1

Author:  kostakis [ Tue 18 Oct, 2016, 14:57 ]
Post subject:  To close open position

Hi,

Could you please tell me how to have the open position closed, after the three candles, one by one, going the opposite direction? Please take a look at the picture below?

Thank you in advance.

Image

Author:  amine_chourou [ Tue 18 Oct, 2016, 16:24 ]
Post subject:  Re: To close open position

Hi,


Here is an example that closed a long position if 3 RED candles in a row happens. You can reverse the logic to build your short logic.
This is an idea within others, it is also possible to work with "Trade Event" start point.

Attachments:
CloseIF3redInARow.vfs [46.7 KiB]
Downloaded 193 times

Author:  kostakis [ Wed 19 Oct, 2016, 20:32 ]
Post subject:  Re: To close open position

amine_chourou wrote:
Hi,


Here is an example that closed a long position if 3 RED candles in a row happens. You can reverse the logic to build your short logic.
This is an idea within others, it is also possible to work with "Trade Event" start point.


Thank you for the prompt answer. I implemented the example given in my strategy. Unfortunately, it closes the positions NOT if 3 RED candles in a row happens but RANDOMLY. Sometimes it closes after 5 candles and sometimes after 9 candles. I suppose that something is wrong with the counter. Could you, please, give me any advise?
Thanks again.

Author:  kostakis [ Wed 19 Oct, 2016, 21:16 ]
Post subject:  Re: To close open position

Hi,

It's again me. Sorry, for the disturbing. I made a mistake. Your example works nice. Thank you for the great job.

Kind regards,
kostakis

  Page 1 of 1