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.

Newbie needs help with first strategy
 Post subject: Newbie needs help with first strategy Post rating: 0   New post Posted: Tue 16 Apr, 2013, 14:01 
User avatar

User rating: 0
Joined: Tue 16 Apr, 2013, 13:56
Posts: 4
Location: Ukraine, Kremenchug
I try to write my first strategy.
Use a fan of the three SMA (3,9,72).
In the strategy tester, following problem ...

The strategy runs for a period of 20 ticks.

In the handler OnBar calculated the necessary SMA (3,9,72) are defined
terms of opening / closing the order. To verify that the strategy in the
visualization window, manually added the appropriate indicators.

Here is the problem!!!

Manually added indicators show the same picture. Below are highlighted
in red, output computed values of the indicators.

They are different!!!

In what could be the problem? In the wrong use of the tester, in the
wrong method is called the indicator calculation. Using tick period?

Please, help understand!!!
Image
Image
Image


Attachments:
SMA_veer.java [5.51 KiB]
Downloaded 349 times
tester-window-manualSMA.jpg [554.41 KiB]
Downloaded 447 times
tester-window-manualSMA-settings.jpg [46.07 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.
 
 Post subject: Re: Newbie needs help with first strategy Post rating: 0   New post Posted: Wed 17 Apr, 2013, 14:59 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Indicator calculation results differ, because the strategy works with time aggregation candles, but chart with tick bars
for indicator calcualtion on feed see:
https://www.dukascopy.com/wiki/#Indicator_Calculation/Calculate_on_price_feed_by_candle_interval
for work with feeds see:
https://www.dukascopy.com/wiki/#Chart_feeds
for indicator value chart-to-strategy comparisons see:
https://www.dukascopy.com/wiki/#Add_indicators_on_chart/Include_in_OHLC


 
 Post subject: Re: Newbie needs help with first strategy Post rating: 0   New post Posted: Wed 17 Apr, 2013, 16:24 
User avatar

User rating: 0
Joined: Tue 16 Apr, 2013, 13:56
Posts: 4
Location: Ukraine, Kremenchug
Thank you so much!

The second and third links directed to the right path. The cause of errors - superficial reading of the documentation ... it has now become clear that it should be organized!


 

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