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.

Calculated Indicator value does not match Indicator on chart
 Post subject: Calculated Indicator value does not match Indicator on chart Post rating: 0   New post Posted: Thu 28 Nov, 2013, 10:17 
User avatar

User rating: 0
Joined: Sun 22 Sep, 2013, 22:29
Posts: 18
Location: RomaniaRomania
Hi, I use this to calculate my SMA:

indicators.sma(instrument,Period.DAILY, OfferSide.BID, IIndicators.AppliedPrice.OPEN, MAPeriod, 0)


The MAPeriod is 14 (on EUR/USD)

On the backtest chart, however, I use a SMA of the same period and Open price.

For instance, 15 nov 2012, calculated is 1.27718, on-chart is 1.27992 and so on...

What do I do wrong ?


 
 Post subject: Re: Calculated Indicator value does not match Indicator on chart Post rating: 0   New post Posted: Thu 28 Nov, 2013, 12:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The chances are that it is due to different filters, see:
https://www.dukascopy.com/wiki/#Indicato ... _checklist
Note that calculation by shift uses the Filter.NO_FILTER, see:
https://www.dukascopy.com/wiki/#Indicator_Calculation/Candlestick_price_feed


 
 Post subject: Re: Calculated Indicator value does not match Indicator on chart Post rating: 0   New post Posted: Thu 28 Nov, 2013, 22:00 
User avatar

User rating: 0
Joined: Sun 22 Sep, 2013, 22:29
Posts: 18
Location: RomaniaRomania
This is the setting on chart:

Image

how do I bring that and my code to get the same result ?


P.S. Can you explain what the Period.DAILY_SKIP_SUNDAY and Period.DAILY_SUNDAY_IN_MONDAY are supposed to mean ?


 
 Post subject: Re: Calculated Indicator value does not match Indicator on chart Post rating: 0   New post Posted: Fri 29 Nov, 2013, 08:57 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
fxeconomist wrote:
Did you have a look at the first point in the link that we provided?
fxeconomist wrote:
P.S. Can you explain what the Period.DAILY_SKIP_SUNDAY and Period.DAILY_SUNDAY_IN_MONDAY are supposed to mean ?
It corresponds the settings in the platform in Tools -> Preferences -> Charts -> Sunday Daily Candles Filtration. Make sure the period you use matches the platform setting.


 
 Post subject: Re: Calculated Indicator value does not match Indicator on chart Post rating: 0   New post Posted: Wed 04 Dec, 2013, 21:08 
User avatar

User rating: 0
Joined: Sun 22 Sep, 2013, 22:29
Posts: 18
Location: RomaniaRomania
API Support wrote:
fxeconomist wrote:
Did you have a look at the first point in the link that we provided?
fxeconomist wrote:
P.S. Can you explain what the Period.DAILY_SKIP_SUNDAY and Period.DAILY_SUNDAY_IN_MONDAY are supposed to mean ?
It corresponds the settings in the platform in Tools -> Preferences -> Charts -> Sunday Daily Candles Filtration. Make sure the period you use matches the platform setting.


Yes, thanks! That did it.


 

Jump to:  

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