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.

3Tick Bar Feed ArrayIndexOutOfBoundsException
 Post subject: 3Tick Bar Feed ArrayIndexOutOfBoundsException Post rating: 0   New post Posted: Mon 02 Nov, 2015, 17:16 
User avatar

User rating: 0
Joined: Mon 04 May, 2015, 05:43
Posts: 4
Location: Russian Federation, Saint-Petersburg
Hello, i try get indicator data but get exception on 3tick chart. In strategy tester it works, but doesnt work in real mode.


public Instrument instrument = Instrument.DEUIDXEUR;

public OfferSide side = OfferSide.BID;

public IFeedDescriptor tickFeed = new TickBarFeedDescriptor(instrument, TickBarSize.THREE, side);

@Override
    public void onTick(Instrument instrument, ITick tick) throws JFException {
       
        if (instrument != this.instrument) {
            return;
        }
       
        double tsf1 = indicators.tsf(tickFeed, appliedPrice, side, 100).calculate(1);
       
        console.getOut().println(String.format("tsf[100][%.5f];", tsf1));
}


I got this error when ticks are null: 16:12:14 java.lang.ArrayIndexOutOfBoundsException: -1 @ Strategy...

ps: also i got NaN results sometime, is it normal?


 
 Post subject: Re: 3Tick Bar Feed ArrayIndexOutOfBoundsException Post rating: 0   New post Posted: Thu 05 Nov, 2015, 10:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider this article in JForex Wiki about subscribing to feeds:
https://www.dukascopy.com/wiki/#Chart_feeds


 

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