|
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 |
[janjjj]
|
Post subject: problem with ema indicator |
Post rating: 0
|
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?
|
|
|
|
 |
Cashbone
|
Post subject: Re: problem with ema indicator |
Post rating: 0
|
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.
|
|
|
|
 |
API Support
|
Post subject: Re: problem with ema indicator |
Post rating: 0
|
Posted: Thu 27 Jan, 2011, 08:39
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
[janjjj]
|
Post subject: Re: problem with ema indicator |
Post rating: 0
|
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)
|
|
|
|
 |
API Support
|
Post subject: Re: problem with ema indicator |
Post rating: 0
|
Posted: Thu 27 Jan, 2011, 14:10
|
|
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)
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|