Dukascopy
 
 
Wiki JStore Search Login

Problem trying to close a position
 Post subject: Problem trying to close a position Post rating: 0   New post Posted: Tue 15 Apr, 2014, 05:13 
User avatar

User rating: 0
Joined: Mon 11 Mar, 2013, 00:00
Posts: 47
Location: Colombia, manizales
Hi, I am building a strategy, but I haven´t been able to close a position when parameters are accomplished.

Here is an image that explains my problem:
Image

The strategy code is attached.

I will appreciate if you can help me with this.

Thanks.


Attachments:
problemwithstrategy.vfs [32.18 KiB]
Downloaded 115 times
Chart_EUR_USD_15 Mins_snapshot.png [30.18 KiB]
Downloaded 276 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: Problem trying to close a position Post rating: 1   New post Posted: Thu 24 Apr, 2014, 11:41 
Visual JForex expert at Dukascopy
User avatar

User rating: 27
Joined: Fri 03 May, 2013, 18:25
Posts: 366
Location: GermanyGermany
Well, I think it does not close at all, right?

Your condition is in the second block: If Open Positions.Position Amount = 0 (Positiones1) then Buy (under certain conditions).
In the next flow you have 1 open position but the variable Positiones1 stays at 0... That is why no close of positions is obtained.


 

Jump to:  

  © 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