Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Condition error
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=141&t=49639
Page 1 of 1

Author:  Heruar [ Thu 18 Jul, 2013, 07:51 ]
Post subject:  Condition error

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

Author:  vadim_berezhnoj [ Thu 18 Jul, 2013, 10:50 ]
Post subject:  Re: Condition error

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 409 times

Author:  Heruar [ Thu 18 Jul, 2013, 11:38 ]
Post subject:  Re: Condition error

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.

Author:  vadim_berezhnoj [ Thu 18 Jul, 2013, 12:15 ]
Post subject:  Re: Condition error

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.

Author:  Heruar [ Thu 18 Jul, 2013, 15:26 ]
Post subject:  Re: Condition error

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 462 times

  Page 1 of 1