Dukascopy
 
 
Wiki JStore Search Login

Position Viewer
 Post subject: Position Viewer Post rating: 0   New post Posted: Thu 29 Dec, 2016, 16:59 
User avatar

User rating: 0
Joined: Fri 19 Sep, 2014, 12:05
Posts: 61
Location: Italy, montopoli di sabina
Good evening : )

Can someone know the reason of this message log in the strategy Cannot compare the _cyclePosition.Position is Long variable, it has 'No Value' in IF block

The if block is asking if (there is a buy/sell position opened) the candle close is less/greater than 2 candle low/High should close and cancel the position.

The strategy should open a buy position if the candle close is greater than the Bollinger UB and if the candle close is greater than the previous 10 candle. The exit when the candle close is less than two candle previous low.


Attachments:
Position_viewer.vfs [62.08 KiB]
Downloaded 158 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: Position Viewer Post rating: 0   New post Posted: Thu 29 Dec, 2016, 17:35 
Visual JForex expert at Dukascopy
User avatar

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

The reason is that the part dealing with position closing is executed before even any position is opened which doesn't make sense for the system.
Please take a look into the user guide available under Help menu. There is a section at the end dedicated to such errors.

Thanks


 
 Post subject: Re: Position Viewer Post rating: 0   New post Posted: Thu 05 Jan, 2017, 11:03 
User avatar

User rating: 0
Joined: Fri 19 Sep, 2014, 12:05
Posts: 61
Location: Italy, montopoli di sabina
Thanks,
tried to improve the strategy. It seems solved the "Cannot compare the _cyclePosition.Position is Long variable, it has 'No Value' in IF block" as you suggest to consult the User Guide.
The message log indicates a new mistakes. Cannot close order in CREATED, CLOSED or CANCELED state, current state - [CLOSED].
I tried to solve that with a filter on the Open Position Amount but do not seems so intelligent.


Attachments:
Position_viewer_2.vfs [83.35 KiB]
Downloaded 165 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: Position Viewer Post rating: 0   New post Posted: Wed 11 Jan, 2017, 23:10 
Visual JForex expert at Dukascopy
User avatar

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

Could you please test the attached version and let me know ...

Thanks


Attachments:
Position_viewer_4.vfs [44.5 KiB]
Downloaded 217 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: Position Viewer Post rating: 0   New post Posted: Mon 16 Jan, 2017, 16:54 
User avatar

User rating: 0
Joined: Fri 19 Sep, 2014, 12:05
Posts: 61
Location: Italy, montopoli di sabina
Good evening Amine,
yes with your implementations the position viewer can close the trade.
Do not really understand why if the indicators are in 1H period, the strategy have a period filter of 10 min (where the connection with the position viewer is with the unequal output).

Thanks for the suggestion

:D


 

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