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.

Inject @Configurable field via JForex API
 Post subject: Inject @Configurable field via JForex API Post rating: 0   New post Posted: Wed 21 Sep, 2016, 20:42 
User avatar

User rating: 2
Joined: Sun 15 Apr, 2012, 22:19
Posts: 25
Location: GermanyGermany
Hi,

I have a strategy that contains some fields that have been annotated using the @Configurable annotation.
When I start the strategy using 'IClient.startStrategy()' the 'Define Parameters' Window does not appear.

Can I trigger the Dependency Injection somehow manually from the API?

Thanks!


 
 Post subject: Re: Inject @Configurable field via JForex API Post rating: 1   New post Posted: Fri 23 Sep, 2016, 15:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Just set the fields of the strategy object
MyStrategy strat = new MyStrategy();
strat.param1 = "input";
strat.param2 = 2;
client.startStrategy(strat);


 

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