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.

Indicator doesn't return a value in Historical tester, but it does in live
 Post subject: Indicator doesn't return a value in Historical tester, but it does in live Post rating: 0   New post Posted: Tue 19 Jun, 2012, 19:57 

User rating: 0
Joined: Wed 11 Apr, 2012, 14:40
Posts: 3
I'm trying to get an indicator data in historical tester but the result is NaN. When I run the same in a live everything OK.
Last week everything worked OK with the same code. All the parameters are double checked.

Please help to get it working back!

Thank you.

Here is a code:

 
   public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
       
        if (period.equals(Period.ONE_HOUR))
        {
            double[] res = indicators.alligator(Instrument.XAUUSD, Period.ONE_HOUR, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 13, 8, 5, 0);
           
            console.getOut().println(new Date(bidBar.getTime()) + ": Jaw " + String.format("%.5f", res[0]) + ". Teeth " + String.format("%.5f", res[1]) + ". Lips " + String.format("%.5f", res[2]));
        }
    }


 
 Post subject: Re: Indicator doesn't return a value in Historical tester, but it does in live Post rating: 0   New post Posted: Wed 20 Jun, 2012, 05:32 

User rating: 0
Joined: Wed 11 Apr, 2012, 14:40
Posts: 3
Started to work again.


 

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