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.

Attempt to get past values for SMA fails in historical tester
 Post subject: Attempt to get past values for SMA fails in historical tester Post rating: 0   New post Posted: Sun 25 Nov, 2012, 16:47 
User avatar

User rating: 0
Joined: Tue 05 Jul, 2011, 15:21
Posts: 28
Location: Switzerland,
Dear support, I have a problem with following call in stand-alone JForex API when run against historical data (using ITesterClient interface):
indicators.sma(instrument, Period.THIRTY_MINUTES, OfferSide.BID, AppliedPrice.CLOSE, 20, Filter.WEEKENDS, 1000, bidBar.getTime(), 0); for EUR/USD as instrument

(obviously I'd like to get last 1000 values of 30 minutes SMA for EUR/USD)

On log console there is a warning "WARN Indicators - There is not enough data to calculate value for SMA" and an empty array is returned. On the other hand the unchanged piece of code runs fine with live date (IClient interface)

In code for ITesterClient I do have this block of code executed before starting the strategy:
Future<?> future = client.downloadData(null);
Thread.sleep(10000);
future.get();

I'm using a permanent demo account. It seems to me this started since 2.7.2 version of the library. When I compile the unchanged code with version 2.6.69 everything works correctly.

Could you please check if there is an issue with historical data servers or something got changed since 2.7.2 version. Thanks in advance.


 
 Post subject: Re: Attempt to get past values for SMA fails in historical tester Post rating: 0   New post Posted: Mon 26 Nov, 2012, 09:25 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please use the latest JForex-SDK and JForex-API version, see:
viewforum.php?f=113
FXace wrote:
On log console there is a warning "WARN Indicators - There is not enough data to calculate value for SMA" and an empty array is returned. On the other hand the unchanged piece of code runs fine with live date (IClient interface)
If the error persists also with the latest version, then please provide full example program and the example strategy which replicates the error.


 

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