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.

JForex 3 SDK Backtest slow
 Post subject: JForex 3 SDK Backtest slow Post rating: 0   New post Posted: Thu 02 Nov, 2017, 21:15 

User rating: 0
Joined: Thu 02 Nov, 2017, 20:06
Posts: 2
I am backtest with the singlejartest/TesterMain from the example code.

It tooks one hour to test one year history.

It is possible to speedup the test, only to download the one minute candle and only test this instead the ticks?

greetings

Artur


 
 Post subject: Re: JForex 3 SDK Backtest slow Post rating: 0   New post Posted: Thu 09 Nov, 2017, 14:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
To speed up backtesting application can set custom data interval. Here is an example:
    private void setDataInterval(ITesterClient client, String dateFrom, String dateTo) throws ParseException {
        final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));

        Date dateFromObject = dateFormat.parse(dateFrom);
        Date dateToObject = dateFormat.parse(dateTo);

        client.setDataInterval(Period.ONE_MIN, OfferSide.ASK, ITesterClient.InterpolationMethod.FOUR_TICKS, dateFromObject.getTime(), dateToObject.getTime());
    }


 

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