|
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.
Javadoc for methods of interface IIndicators |
[trottel]
|
Post subject: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Mon 02 May, 2011, 18:16
|
|
User rating: 0
Joined: Wed 27 Apr, 2011, 13:56 Posts: 18
|
Hi support,
Are javadocs for methods of interface IIndicators planned?
|
|
|
|
 |
API Support
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Tue 03 May, 2011, 07:11
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
[trottel]
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Tue 03 May, 2011, 11:12
|
|
User rating: 0
Joined: Wed 27 Apr, 2011, 13:56 Posts: 18
|
I meant the interface IIndicators which defines all the methods for getting the values of standard indicators such as ema(...), ma(...) and so on.
|
|
|
|
 |
API Support
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Wed 04 May, 2011, 07:14
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
[trottel]
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Wed 04 May, 2011, 07:48
|
|
User rating: 0
Joined: Wed 27 Apr, 2011, 13:56 Posts: 18
|
Thank you. Especially the second link was helpful.
|
|
|
|
 |
[trottel]
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Wed 04 May, 2011, 11:50
|
|
User rating: 0
Joined: Wed 27 Apr, 2011, 13:56 Posts: 18
|
But however the parameter timePeriod in method double[] sma(Instrument instrument, Period period, OfferSide side, IIndicators.AppliedPrice appliedPrice, int timePeriod, long from, long to) isn't clear for me  I constantly get com.dukascopy.api.JFException: Interval from [2011.04.29 00:05:17 500] to [2011.04.29 00:05:37 500] GMT is not valid at com.dukascopy.api.impl.ab.b(Unknown Source) at com.dukascopy.api.impl.ab.calculateIndicator(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.ai.calculateIndicator(Unknown Source) at com.dukascopy.api.impl.ab.a(Unknown Source) at com.dukascopy.api.impl.ab.sma(Unknown Source) at jforex.FirstStrategy.onTick(FirstStrategy.java:56) at com.dukascopy.dds2.greed.agent.strategy.tester.a.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.l.run(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.a.wI(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.vc(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uB(Unknown Source) at com.dukascopy.dds2.greed.actions.c.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)And here is the method call double[] result = indicators.sma(instrument, period, OfferSide.BID, IIndicators.AppliedPrice.MEDIAN_PRICE, 2,tick.getTime() - 20000, tick.getTime());
|
|
|
|
 |
API Support
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Mon 09 May, 2011, 08:58
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Hi, long from is the start time of the first candle in the calculated period and long to is start time of the last candle in the calculated period Try using the following code: long from = history.getBar(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID, 2).getTime(); long to = history.getBar(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID, 1).getTime(); double[] result = indicators.sma(instrument, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.MEDIAN_PRICE, 2, from, to);
|
|
|
|
 |
[trottel]
|
Post subject: Re: Javadoc for methods of interface IIndicators |
Post rating: 0
|
Posted: Thu 12 May, 2011, 10:20
|
|
User rating: 0
Joined: Wed 27 Apr, 2011, 13:56 Posts: 18
|
At the moment I don't need this method but thanks for answer. I will try it out.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|