Dukascopy
 
 
Wiki JStore Search Login

How to close a position and immediately open a new one in the opposite direction?
 Post subject: How to close a position and immediately open a new one in the opposite direction? Post rating: 1   New post Posted: Tue 10 Dec, 2013, 19:10 

User rating: 2
Joined: Mon 25 Nov, 2013, 13:42
Posts: 2
Location: Czech Republic,
Hi everybody,

The strategy is based on the cross of price with EMA 200. When the close of current candle is below EMA (the previous candle close was above) you go short. The same vice versa for long.

Now, lets say I go short. The exit signal of the strategy comes with the close of the current candle above EMA and the position is closed. What I want is to open immediately a new position in the opposite direction in this case long. So actually the exit signal of the older position is the open signal for the current position.

In my attempt in Visual Jforex there is always a delay in opening the new position. It closes the previous position, and the open of the new one comes one candle later. I want it to be with the same candle close as the exit.


Attachments:
emacross.vfs [43.87 KiB]
Downloaded 190 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: How to close a position and immediately open a new one in the opposite direction? Post rating: 1   New post Posted: Wed 11 Dec, 2013, 12:03 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Greetings.

Try that example:
download/file.php?mode=view&id=5258


Attachments:
SMA_TEST_1.vfs [33.56 KiB]
Downloaded 356 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: How to close a position and immediately open a new one in the opposite direction? Post rating: 1   New post Posted: Thu 12 Dec, 2013, 11:16 

User rating: 2
Joined: Mon 25 Nov, 2013, 13:42
Posts: 2
Location: Czech Republic,
Vadim, I got the logic you suggested and it works now. Thank you. Keep doing great job!


 

Jump to:  

  © 1998-2025 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