Dukascopy
 
 
Wiki JStore Search Login

SMA My strategy opens position but I can't close it
 Post subject: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Fri 17 Jul, 2015, 10:04 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
When Fast SMA10/smaSmall diving and crosses down the Slow SMA30/smaBig – signal „SELL” is generated and short position is opened at the moment (smaSmallCurrent<smaBigCurrent AND smaSmallPrev>smaBigPrev). Now, I need to close this position, when Fast SMA10/smaSmall starts climbing, crossing up and above Slow SMA30/smaBig – (smaSmallCurrent>smaBigCurrent AND smaSmallPrev<smaBigPrev), but it doesn’t work.
I can’t find the way how to close this oppened position… Where is the mistake? Which blocks or which variables are wrong attached/pasted? Need your help: how to close opened position?


Attachments:
Draft4Viewer10304h.vfs [34.42 KiB]
Downloaded 116 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: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Fri 17 Jul, 2015, 10:17 
Visual JForex expert at Dukascopy
User avatar

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

The answer to your question is in the attached strategy which is opening and closing long/short positions as per the EMA crosses.
Please review it and implement the same workflow in your strategy

Cheers


Attachments:
Webinar5_11.vfs [42.31 KiB]
Downloaded 174 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: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Fri 17 Jul, 2015, 10:40 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
Hi,

I didn't awaited so quick response. Thans so much, now I am starting to work on it.

Have a nice day


 
 Post subject: Re: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Fri 17 Jul, 2015, 15:31 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
You're welcome !
I've just made a quick modification to avoid an error when the strategy is tested in Jforex platform.
Attached ...


Attachments:
Webinar7_11.vfs [46.01 KiB]
Downloaded 119 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: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Sat 18 Jul, 2015, 08:26 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
Hello again,

Thanks a lot. I try to use this new version with SMA. If you have any suggestions, what can be important, when we use SMA instead of EMA and ticks instead of candles, let me know, please. I am discovering this strategy builder, so - it is easy to predict - even small dificulties can be like a wall for me.
Have a nice weekend


 
 Post subject: Re: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Sat 18 Jul, 2015, 09:09 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
But... the simplest way you can be helpful is ready to use strategy, like California Plums - Juicy-Sweet-And Ready To Eat.
I tried with 7_11 version and only one position has been oppened and didn't closed until end of the day. Look at this in my attachment.
Sorry for my next enquiry, but I am sure, you will forgive me


Attachments:
Sma0423_7_11.vfs [48.6 KiB]
Downloaded 119 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: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Mon 20 Jul, 2015, 17:59 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
Hi there,

As last week - Webinar7_11.vfs works properly and my solution with SMA doesn't work. Wnere is error?
Kind regards, Christoph


Attachments:
Sma0423_7_11.vfs [49.64 KiB]
Downloaded 114 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: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Wed 22 Jul, 2015, 12:41 
Visual JForex expert at Dukascopy
User avatar

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

Well the main idea behind such platform is to provide a user-friendly solution to build automated strategies for users. The best way to learn (and then to implement any idea you want) is definitely not " like California Plums" but more like we give you the ingredients and the recipe so that you become a "Chef" :)

Where were you stuck in the strategy ? did you verified your Boolean variables and the way they are reset ?
can you provide some evidence regarding the inconsistencies of your strategy ?

Cheers


 
 Post subject: Re: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Thu 23 Jul, 2015, 14:24 
User avatar

User rating: 0
Joined: Thu 16 Jul, 2015, 14:55
Posts: 17
Location: PolandPoland
Hi,

I slowly becoming to be a CHEF - colecting ingredients, but I am hungry now:)

OK, thanks for your help, my strategy finaly started to work. My new questions:
1. Why strategies prepared to work in realtime after pushing Run have been stopped after few sec? Will be similiar on LIVE acc?
2. Will be possible to run and monitor live strategies on Visual JForex instead of transfering them to JForex, where I have problem to start strategy?

Kind regards,
Christoph


 
 Post subject: Re: SMA My strategy opens position but I can't close it Post rating: 0   New post Posted: Thu 23 Jul, 2015, 15:14 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,
Good to hear that ..

Quote:
1. Why strategies prepared to work in real-time after pushing Run have been stopped after few sec? Will be similar on LIVE acc?

Unless you have a serious error the strategy shouldn't stop. Can you activate Java console as described in the below link and check if any message saying "Stopped by engine" in populated ?

https://www.java.com/en/download/help/javaconsole.xml

Quote:
2. Will be possible to run and monitor live strategies on Visual JForex instead of transferring them to JForex, where I have problem to start strategy?


For the time being only direct Live run to a Demo account is possible but it will be possible to do so for Live account in the near future. Currently linking VJF processor to live accounts is not available.


 

Jump to:  

cron
  © 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