Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API function requests in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Request about indicator idea
 Post subject: Request about indicator idea Post rating: 0   New post Posted: Tue 22 Sep, 2015, 03:07 

User rating: 0
Joined: Fri 16 Nov, 2012, 16:36
Posts: 11
Bar bar5M_0 = history.getBar(instrument, Period.FIVE_MINS, OfferSide.BID, 0);
IBar bar5M_20 = history.getBar(instrument, Period.FIVE_MINS, OfferSide.BID, 20);

double[] sma = indicators.ema(instrument, Period.FIVE_MINS, OfferSide.BID, AppliedPrice.CLOSE, periodIndicateur, Filter.NO_FILTER, bar5M_20.getTime(), bar5M_0.getTime());

double valeur1 =0;

if(sma.length > 1) {
valeur1 = Math.abs((sma[10] - sma[20]));
}


But, i have really no idea how to creates indicator with this idea.

indicator : EMA of timeperiod 20

outputs : indicate the difference between 2 value of the array example array[5] - array[0] ...

Thanks for your help


 

Jump to:  

cron
  © 1998-2024 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