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.

Trend Envelopes Indicator only returns low band
 Post subject: Trend Envelopes Indicator only returns low band Post rating: 0   New post Posted: Fri 03 Dec, 2010, 19:18 

User rating: 0
Joined: Fri 03 Dec, 2010, 16:11
Posts: 4
I'm trying to make a EA based on this indicator. However the function:


indicators.trendEnv(instrument, per, OfferSide.BID, period, envelopeDev , shift);


returns only a double and the indicator has two outputs: the low band and the high band.

So right now I'm missing the high band value. :?

Moreover, when the indicator is going short (high band) the return of this function is a NaN, making my EA throw error like there's no tomorrow.

By the way, Why don't you allow the community to edit the JForex wiki? I mean, what's the point of a wiki if nobody can contribute to it?


 
 Post subject: Re: Trend Envelopes Indicator only returns low band Post rating: 0   New post Posted: Mon 06 Dec, 2010, 16:42 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Thank you for the tip, this will be fixed in the next release.
Trend Envelopes indicator may return NaN values, you can use the following code to identify them:
if (Double.isNaN(value)){
    ...      
}


 
 Post subject: Re: Trend Envelopes Indicator only returns low band Post rating: 0   New post Posted: Wed 15 Dec, 2010, 15:40 

User rating: 0
Joined: Tue 14 Dec, 2010, 19:05
Posts: 1
Can you post a source code of this indicator?


 
 Post subject: Re: Trend Envelopes Indicator only returns low band Post rating: 0   New post Posted: Wed 19 Jan, 2011, 09:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
You can download the indicator sources with JForexClientLibrary located here: https://www.dukascopy.com/client/jforexl ... ibrary.zip


 

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