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.

problem with ema indicator
 Post subject: problem with ema indicator Post rating: 0   New post Posted: Wed 26 Jan, 2011, 21:41 

User rating: 0
Joined: Wed 26 May, 2010, 18:57
Posts: 11
Hello
I use ema indicator in my strategy. I noticed that the data from ema indicator printed in a chart are different from data from IIndicator interface in my strategy: (double ema200 = indicators.ema(instrument, period, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 200, 1);)
I noticed it on Monday morning. I suppose that in one case ema indicator takes into account bars from sunday and in the secound case does not take into account bars from sunday. And other days it's ok.
Support, Could you solve this problem?


 
 Post subject: Re: problem with ema indicator Post rating: 0   New post Posted: Wed 26 Jan, 2011, 22:47 

User rating: 3
Joined: Tue 17 May, 2011, 16:51
Posts: 38
Location: Sweden, Jonkoping
Make sure you have the same flats filter set in the platform as in the indicator. So if you use "filter weekend flats" in the platform you should turn that off and hopefully the numbers will line up.


 
 Post subject: Re: problem with ema indicator Post rating: 0   New post Posted: Thu 27 Jan, 2011, 08:39 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Please be sure that you use the same Filter in the JForex platform and in the API ema function. For the details how to use filters please consider the following JForex Wiki page: https://www.dukascopy.com/wiki/index.php ... Indicators


 
 Post subject: Re: problem with ema indicator Post rating: 0   New post Posted: Thu 27 Jan, 2011, 11:31 

User rating: 0
Joined: Wed 26 May, 2010, 18:57
Posts: 11
Thank you very much. Now everything is clear.

I have one more question:
It is posible to set filter in this construction:

double ema(Instrument instrument,
Period period,
OfferSide side,
IIndicators.AppliedPrice appliedPrice,
int timePeriod,
int shift)

or this:

double[] ema(Instrument instrument,
Period period,
OfferSide side,
IIndicators.AppliedPrice appliedPrice,
int timePeriod,
long from,
long to)

or only in this?:

double[] ema(Instrument instrument,
Period period,
OfferSide side,
IIndicators.AppliedPrice appliedPrice,
int timePeriod,
Filter filter,
int numberOfCandlesBefore,
long time,
int numberOfCandlesAfter)


 
 Post subject: Re: problem with ema indicator Post rating: 0   New post Posted: Thu 27 Jan, 2011, 14:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Just only to 3rd variant:
public double[] ema(Instrument instrument, Period period, OfferSide side, AppliedPrice appliedPrice, int timePeriod, Filter filter, int numberOfCandlesBefore, long time, int numberOfCandlesAfter)


 

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