Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Strategies which has public variables.
 Post subject: Strategies which has public variables. Post rating: 0   New post Posted: Wed 31 Oct, 2018, 04:16 
User avatar

User rating: 7
Joined: Tue 28 Feb, 2012, 09:45
Posts: 45
Location: JapanJapan
JForex ver. 3.4.9
API ver. 2.13.60

Strategies which has public variables could not running.

Sample 1: could be not run
package jforex;

import com.dukascopy.api.*;

public class Test1 implements IStrategy {
    public int i;
   
    public void onStart(IContext context) throws JFException {}
    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 {}
}

Sample 2: could be run
package jforex;

import com.dukascopy.api.*;

public class Test2 implements IStrategy {
    private int i;
   
    public void onStart(IContext context) throws JFException {}
    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 {}
}

Regards.


 
 Post subject: Re: Strategies which has public variables. Post rating: 0   New post Posted: Wed 31 Oct, 2018, 14:31 
User avatar

User rating: 7
Joined: Tue 28 Feb, 2012, 09:45
Posts: 45
Location: JapanJapan
In version 3.4.10.

Trick seems to be fixed.

Thanks for quickly Treat.

Oct. 31


 

Jump to:  

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