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.

documentation - what is returned by indicators ?
 Post subject: documentation - what is returned by indicators ? Post rating: 0   New post Posted: Tue 27 Oct, 2009, 13:55 

User rating: 0
Joined: Tue 13 Oct, 2009, 20:35
Posts: 7
Hi Support

When I read the documentation, how can I see what is returned by each indicator ? eg

double[]

ma(Instrument instrument, Period period, OfferSide side, IIndicators.AppliedPrice appliedPrice, int timePeriod, IIndicators.MaType maType, Filter filter, int numberOfCandlesBefore, long time, int numberOfCandlesAfter)

How can I know what information is contained in the return array, in what format ? Not just for this specific example, but for all the documentation.

Thanks in advance

Mark


 
 Post subject: Re: documentation - what is returned by indicators ? Post rating: 0   New post Posted: Wed 28 Oct, 2009, 09:54 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
unfortunately at the moment, there is no obvious way to know this only from documentation. We will add it in the near future.
However, there is a ways how to find it out from the current system.
Each indicator could be calculated using three methods. There are several parameters common, like those with such types as:
    Instrument, Period, OfferSide, IIndicators.AppliedPrice, timePeriod.

And for one type of methods is added parameter shift with type int.
For example
double[] minMax(Instrument instrument, Period period, OfferSide side, IIndicators.AppliedPrice appliedPrice, int timePeriod, int shift) throws JFException

In this case method returns two calculated value for n number (shift) of candle back in time staring from current bar. Because of minMax indicator calculates min and max values for period, it returns two values: one for min, other for max. Values in array are in the same order as they are in "Add Indicators" dialog window in JForex platform. For minMax indicator values in combo boxes could be defined color. These combo boxes are represented in order - from top to bottom. For this example it means that first value in returned array will be min and second max. Its because in dialog window, first top combo box defines color for min and then for max line.

Also there is methods were is added such parameter as long from and long to
For example
double[][] minMax(Instrument instrument, Period period, OfferSide side, IIndicators.AppliedPrice appliedPrice, int timePeriod, long from, long to) throws JFException

This method returns arrays of calculated min and max values for each line. It means that first array will consist of calculated min values and second array will consist of calculated max values. Both array size depends on candle count in period, which is defined by long from and long to parameters.

And there is one more type of methods. Fore those are added such parameters as: Filter filter, int numberOfCandlesBefore, long time, int numberOfCandlesAfter.
For example
double[][] minMax(Instrument instrument, Period period, OfferSide side, IIndicators.AppliedPrice appliedPrice, int timePeriod, Filter filter, int numberOfCandlesBefore, long time, int numberOfCandlesAfter) throws JFException

This method will return also two array values, where the first array will consist of calculated min value for each candle for defined period and the second array similar - it will consist of calculated max value.


 

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