Dukascopy
 
 
Wiki JStore Search Login

jforex retains strategy data across strategy restart?
 Post subject: jforex retains strategy data across strategy restart? Post rating: 0   New post Posted: Wed 28 Mar, 2012, 16:26 

User rating: 4
Joined: Mon 19 Sep, 2011, 09:55
Posts: 29
Location: Germany,
Edit: this has been moved from "bug reports" to "knowledge base". Why?

Upon restart of a strategy (i.e. start-stop-start), variables etc retain the values from the previous instance.. both in live and demo.
Simple example (should always print "0" but does not):
package jforex;

import com.dukascopy.api.*;

public class SampleStrategy implements IStrategy {
    int check = 0;
   
    public void onStart(IContext context) throws JFException {
        context.getConsole().getOut().println(check++);
    }

    public void onAccount(IAccount account) throws JFException {
    }

    public void onMessage(IMessage message) throws JFException {
    }

    public void onStop() throws JFException {
    }

    public void onTick(Instrument instrument, ITick tick) throws JFException {
    }
   
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
    }
}


 
 Post subject: Re: jforex retains strategy data across strategy restart? Post rating: 0   New post Posted: Thu 29 Mar, 2012, 07:54 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please check on the latest JForex client 2.15.


 
 Post subject: Re: jforex retains strategy data across strategy restart? Post rating: 0   New post Posted: Thu 29 Mar, 2012, 09:59 

User rating: 4
Joined: Mon 19 Sep, 2011, 09:55
Posts: 29
Location: Germany,
Yes, fixed in 2.15 demo. Hope it will make it into live soon.


 

Jump to:  

cron
  © 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