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.

call com.dukascopy.indicators from strategy
 Post subject: call com.dukascopy.indicators from strategy Post rating: 0   New post Posted: Tue 05 Dec, 2017, 09:44 

User rating: 0
Joined: Mon 14 Nov, 2011, 05:16
Posts: 33
Location: PhilippinesPhilippines
Hi

I am trying to call the TSI indicator from the com.dukascopy.indicators library with the below call

double [] tsi = com.dukascopy.indicators.TSI(instrument, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 20, 13, 7);

but get an error

09:52:48 com.dukascopy.indicators cannot be resolved to a type

- how do I call indicators from com.dukascopy.indicators?


 
 Post subject: Re: call com.dukascopy.indicators from strategy Post rating: 0   New post Posted: Tue 05 Dec, 2017, 14:29 

User rating: 0
Joined: Mon 18 Jan, 2016, 14:56
Posts: 5
Location: ChinaChina
I think maybe this wiki will help: https://www.dukascopy.com/wiki/en/devel ... t-on-chart


 
 Post subject: Re: call com.dukascopy.indicators from strategy Post rating: 0   New post Posted: Tue 05 Dec, 2017, 16:53 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can do it in this way:
    Object[] indicatorTSIOutput = indicators.calculateIndicator(
                                        Instrument.EURUSD,
                                        Period.ONE_HOUR,
                                        new OfferSide[]{OfferSide.BID},
                                        "TSI",
                                        new AppliedPrice[]{AppliedPrice.CLOSE},
                                        new Object[] {20,13,7},
                                                  0);


 

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