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.

discrepencies between IIndicators and what's shown on chart
 Post subject: discrepencies between IIndicators and what's shown on chart Post rating: 0   New post Posted: Fri 23 Apr, 2010, 01:27 

User rating: 1
Joined: Fri 26 Mar, 2010, 19:19
Posts: 116
Location: Canada
I am finding that the returned values of
indicators.ema(instrument, period, OfferSide.BID, IIndicators.AppliedPrice.MEDIAN_PRICE, 200, 1)

to be more than 30 pips different than what I am seeing on the chart (SMA at 200) when running the historical tester. I also tried EMA but the problem is the same.

Is there any reason for the huge offset between an IIndicators method and what's shown on the chart?


 
 Post subject: Re: discrepencies between IIndicators and what's shown on chart Post rating: 0   New post Posted: Sat 24 Apr, 2010, 03:38 

User rating: 1
Joined: Fri 26 Mar, 2010, 19:19
Posts: 116
Location: Canada
There appears to be round-off error in the moving average indicators.sma/ema. The longer the period, the bigger the error. Anyone else noticed this problem?


 
 Post subject: Re: discrepencies between IIndicators and what's shown on chart Post rating: 0   New post Posted: Sat 24 Apr, 2010, 11:19 

User rating: 0
Joined: Fri 16 Apr, 2010, 10:09
Posts: 3
Hello quantisan

This may be caused by different Flat Filters.

Calculating the indicator like you do, means: NO_FILTER
If you have in the preferences of the platform selected WEEKENDS or ALL_FLAT
then the values of the indicator will be different.

Do these differences still appear if you have choosen NO_FILTER on your platform?
Or is this proposal only 'old cheese' for you?

Best Regards
NextTry


 
 Post subject: Re: discrepencies between IIndicators and what's shown on chart Post rating: 0   New post Posted: Sat 24 Apr, 2010, 13:49 

User rating: 1
Joined: Fri 26 Mar, 2010, 19:19
Posts: 116
Location: Canada
That seems to have been the problem! Although it is still off by a few pips. But it's good enough for me. Thanks a lot, NextTry!


 

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