Dukascopy
 
 
Wiki JStore Search Login

simple SMA strategy help
 Post subject: simple SMA strategy help Post rating: 0   New post Posted: Wed 28 Jan, 2015, 19:02 
User avatar

User rating: 0
Joined: Wed 28 Jan, 2015, 17:15
Posts: 5
Location: Morocco, Agadir
hi :)
im asking for some help if its possible ;) im new and iv been playing around with visual jforex for a couple of days, and viewed quite many strategies, but couldn't find what i need yet.

my question is:
is it possible to make a strategy based on one SMA direction change?
if trend (become) up = place order:buy
if trend (become) down= place order:sell and close previous order
and so on..

thanks ;)


 
 Post subject: Re: simple SMA strategy help Post rating: 0   New post Posted: Thu 29 Jan, 2015, 13:25 
Visual JForex expert at Dukascopy
User avatar

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

Welcome to VJF forum. I'm attaching an example that meet your requirements.

Feel free to raise any question

Cheers !


Attachments:
Webinar5_11.vfs [40.39 KiB]
Downloaded 98 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: simple SMA strategy help Post rating: 0   New post Posted: Thu 29 Jan, 2015, 20:35 
User avatar

User rating: 0
Joined: Wed 28 Jan, 2015, 17:15
Posts: 5
Location: Morocco, Agadir
thanks a lot!

this is quite close to what i need, tested it on visualjforex worked well, but when i tried it on jforex it didn't :roll: it shows this error: java.lang.NullPointerException @ com.dukascopy.visualforex.redaxis.Webinar5_11.CloseandCancelPosition_block_31(Webinar5_11.java:502)

could you solve this for me? and if possible replace the EMA indicator with SMA? would be greatly appreciated

thanks a lot for your help :)


 
 Post subject: Re: simple SMA strategy help Post rating: 0   New post Posted: Fri 17 Jul, 2015, 15:29 
Visual JForex expert at Dukascopy
User avatar

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

Your post was lost in the crowd sorry for that ! :)

Here is a quick fix for this error including a .java file format.


Attachments:
Webinar7_11.java [24.1 KiB]
Downloaded 143 times
Webinar7_11.vfs [46.01 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.
 

Jump to:  

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