Dukascopy
 
 
Wiki JStore Search Login

Condition error
 Post subject: Condition error Post rating: 0   New post Posted: Thu 18 Jul, 2013, 07:51 
User avatar

User rating: 11
Joined: Tue 05 Feb, 2013, 10:39
Posts: 104
Location: Romania, Iasi
I have a problem with my strategy. (attached file) It makes some stupid trade decisions that shouldn't happen. My strategy should only trade when the conditions in the strategy are met, but it trades anyway whenever it wants. Can someone look at the code and tell me what is wrong ?
The logic should be:
- indicators used SMA(12), EMA(12), TVS1(12)(shift 0), TVS2(12)(shift 2).
- trade conditions: - IF SMA > EMA , TVS1>0 , TVS2>0 , TVS1>TVS2 --> Sell
- IF SMA < EMA , TVS1<0 , TVS2<0 , TVS1<TVS2 --> Buy
Only if all conditions are met, the strategy should trade.
If anyone can help I would really appreciate it.
Thank you.

Cheers


Attachments:
LittleBotVFX.vfs [31.66 KiB]
Downloaded 349 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: Condition error Post rating: 0   New post Posted: Thu 18 Jul, 2013, 10:50 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
I'v made some corrections. Take a look.
download/file.php?mode=view&id=4095

It opened 4 positions every time because after Multiple Action block, there were 4 flows ending at the same point.


Attachments:
LittleBotVFX-2.vfs [30.72 KiB]
Downloaded 407 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: Condition error Post rating: 0   New post Posted: Thu 18 Jul, 2013, 11:38 
User avatar

User rating: 11
Joined: Tue 05 Feb, 2013, 10:39
Posts: 104
Location: Romania, Iasi
I did that the first time I made the strategy, about 3 weeks ago. It didn't work well then.
I'll check it when I get home and see how it works now.
I can't run it at work under Win XP cuz' I can't run the Visul-JForex-demo.jnlp file. Dunno why...
Thank you for the prompt answer anyway. I'll get back to you with a feedback later on.

Cheers.


 
 Post subject: Re: Condition error Post rating: 0   New post Posted: Thu 18 Jul, 2013, 12:15 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Visual Processor should run OK on XP.
Try to uninstall all versions of JAVA and install the latest one.
If problem stays please come back with details.


 
 Post subject: Re: Condition error Post rating: 0   New post Posted: Thu 18 Jul, 2013, 15:26 
User avatar

User rating: 11
Joined: Tue 05 Feb, 2013, 10:39
Posts: 104
Location: Romania, Iasi
Hi ,

I'll try re-installing tomorrow at work.
Now back to the issue at hand:
I attached a historical test to show what I meant with the first post.

Image

As you can see in the image, TVS1 and TVS2 are bellow 0, but TVS1 is higher than TVS2, and SMA is lower than EMA and the strategy chose SELL command.
It doesn't make any sense. This test was made with the modifications you made.
I'm starting to think the strategy is fine and the problem is either server side or with Visual JForex...
I don't know anymore.
Maybe someone who programmed the software can help ?
Thank you.

Cheers


Edit: I just noticed the graph is Hourly and my strategy is in 10 min bars... The output of the historical tester is wrong. Now I changed the graph to 10min and all I see are some small lines as attached. Some conditions are good but some are not.

Image


Attachments:
Example2.jpg [385.97 KiB]
Downloaded 462 times
Example.jpg [372.47 KiB]
Downloaded 459 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