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.

Issue with Fractal indicator
 Post subject: Issue with Fractal indicator Post rating: 0   New post Posted: Wed 02 Jun, 2010, 17:51 

User rating: 0
Joined: Thu 19 May, 2011, 16:00
Posts: 37
Location: UkraineUkraine
Dear Support!

Could you please share source for for fractal indicator using inside JForex platform?


 
 Post subject: Re: Fractal indicator source code Post rating: 0   New post Posted: Thu 03 Jun, 2010, 09:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider this ;) https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=6&t=8379


 
 Post subject: Re: Fractal indicator source code Post rating: 0   New post Posted: Tue 15 Jun, 2010, 06:10 

User rating: 0
Joined: Thu 19 May, 2011, 16:00
Posts: 37
Location: UkraineUkraine
Hello!

Could you please explain how this implementations works? I confusing a bit because this indicator always returns 2 values (Max and Min) and I never got NaN. Not sure that it is possible to have UP and DOWN fractal in same time.
But on the chart arrows are correct.
Here is way how I calling indicator indicator:

        double []fr = indicators.fractal(
                Instrument.EURUSD,
                period,
                offerSide,
                0,
                2/*or 3 or 5 whatever*/
        );
        console.getOut().println("L: " + fr.length + " Max: " + fr[0] + " Min: " + fr[1]);


And here is a output:
05:08:40 L: 2 Max: 1.22025 Min: 1.22025
05:08:31 L: 2 Max: 1.22025 Min: 1.2202
05:08:20 L: 2 Max: 1.22025 Min: 1.2202
05:08:11 L: 2 Max: 1.22025 Min: 1.2202
05:08:01 L: 2 Max: 1.2203 Min: 1.22025
05:07:50 L: 2 Max: 1.2203 Min: 1.2203
05:07:41 L: 2 Max: 1.2203 Min: 1.2203
05:07:30 L: 2 Max: 1.22055 Min: 1.2203
05:07:21 L: 2 Max: 1.2205 Min: 1.2205
05:07:10 L: 2 Max: 1.2206 Min: 1.2205
05:07:01 L: 2 Max: 1.2206 Min: 1.2206
05:06:51 L: 2 Max: 1.2206 Min: 1.22055
05:06:40 L: 2 Max: 1.2207 Min: 1.22055
05:06:30 L: 2 Max: 1.2207 Min: 1.2207
05:06:20 L: 2 Max: 1.2207 Min: 1.2207



So question is how to interpret output of this indicator?
Really need your feedback about this question.


 
 Post subject: Re: Fractal indicator source code Post rating: 0   New post Posted: Tue 15 Jun, 2010, 07:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Thanks, for your attention. There is a bug. It will be fixed ASAP.


 
 Post subject: Re: JFOREX-1851 : Issue with Fractal indicator Post rating: 0   New post Posted: Tue 15 Jun, 2010, 09:21 

User rating: 0
Joined: Thu 19 May, 2011, 16:00
Posts: 37
Location: UkraineUkraine
Could you please keep us updated?


 
 Post subject: Re: JFOREX-1851 Issue with Fractal indicator Post rating: 0   New post Posted: Wed 16 Jun, 2010, 14:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Sorry for misunderstanding, the indicator is working properly. You need to give a timePeriod > 0. The parameter timePeriod determines candle count which will be used to calculate your indicator value. And shift parameters says, from which candle to start calculate the value.
This will calculate you a value starting from the previous(current-1) bar till the next one(current-2)
             double []fr = indicators.fractal(Instrument.EURUSD, period, OfferSide.BID, 1, 1);


 
 Post subject: Re: JFOREX-1851 Issue with Fractal indicator Post rating: 0   New post Posted: Fri 18 Jun, 2010, 16:43 

User rating: 0
Joined: Thu 19 May, 2011, 16:00
Posts: 37
Location: UkraineUkraine
But why sometimes indicator returns 2 values in same time?


 
 Post subject: Re: Issue with Fractal indicator Post rating: 0   New post Posted: Mon 21 Jun, 2010, 10:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
in this current example, fractal looks at a previous and the next candle (in sum only 3 candles) to find its maximum and minimum. The fractal indicator compares lowest and highest prices of candles to calculate it's value. So for small candles in small timeperiod, a candle could have the maximum and the minimum at the same time quite often.


 

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