Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

ATEMPLATE STRATEGY BUG?
 Post subject: ATEMPLATE STRATEGY BUG? Post rating: 0   New post Posted: Thu 08 Mar, 2012, 15:36 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
Hello Support,

I try your strategy called "ATEMPLATESIGNALSTRATEGY"(in post https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=45657) wich use MACD and STOCHASTIC indicators.
Unfortunately, the result in back test seems strange.
So I have separated macd and stochastic signals and problem comes from stochastic.
It should open a buy order if K(current) >D(current) && K(previous) is<=D(previous) and open sell order if K(current) <D(current) && K(previous) is>=D(previous). Sometimes, it does what is expected, sometimes, completely not. Is it the ontick method wich open wrong order or something else? What must be corrected to have corrects orders?
I have attached strat ATemplateSignalsSTOCHONLY and a snapshot. If you want to check, you can use the parameters in the strategy, they are the same used for the snapshot.
Thanks in advance for your help
Cheers,
Math


Attachments:
TemplateSignalsSTOCHONLY.java [9.8 KiB]
Downloaded 268 times
Chart_EUR_USD_30 Mins_snapshot.png [45.09 KiB]
Downloaded 298 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: ATEMPLATE STRATEGY BUG? Post rating: 0   New post Posted: Thu 08 Mar, 2012, 16:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider logging all the necessary values to see why the strategy makes the trade and why it does not:
https://www.dukascopy.com/wiki/#IConsole/Logging_values


 
 Post subject: Re: ATEMPLATE STRATEGY BUG? Post rating: 0   New post Posted: Fri 09 Mar, 2012, 16:07 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
Hello Support,
Thanks for answer.
I spend much time to back test this strategy and as you can see on the snapshot attached, it trades.
I don't know how to use the logging values strat in the link. The code you provide (conditions for buy/sell) in the strat seems ok.
But as you can see, it trades (open buy or sell) whereas the conditions (stoch cross) are not met.
Do you think stochastic is only a visual indicator and can't be traded in an automated strategy?
Do you think (in a another way) that it opens a trade before the current bar is closed?
Im sorry but I learn more and more in the forum and in the wiki, but there is a lot of knowledge and it takes long time :roll:
Thanks to consider my request,
cheers,
Math


 
 Post subject: Re: ATEMPLATE STRATEGY BUG? Post rating: 0   New post Posted: Mon 12 Mar, 2012, 11:16 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We added a couple of logging statements. Please test and add new statements in a similar fashion, if necesary.


Attachments:
TemplateSignalsSTOCHONLY_log.java [10.56 KiB]
Downloaded 279 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:  

  © 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