Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

How can i control the dialog popup before stategy work always choose Default Setting?
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=82&t=47914
Page 1 of 1

Author:  tea123 [ Tue 28 Aug, 2012, 15:07 ]
Post subject:  How can i control the dialog popup before stategy work always choose Default Setting?

I set the default setting at the dialog, but when I change any parameter and next time I start the stategy the dialog use my last setting. So how can I control this mean I want always first choose Default Setting.

Author:  SmithJr [ Fri 31 Aug, 2012, 21:55 ]
Post subject:  Re: How can i control the dialog popup before stategy work always choose Default Setting?

tea123 wrote:
I set the default setting at the dialog, but when I change any parameter and next time I start the stategy the dialog use my last setting. So how can I control this mean I want always first choose Default Setting.


If you mean the parameters of your strategy in the configuration dialog, you can set the default values in the code where the @Configurable variables are, for instance, the following code:

    // Configurable parameters
    @Configurable("Instrument") public Instrument instrument = Instrument.EURUSD; 


specifies the default instrument that is selected in such dialog. Look for the @Configurables in your code and play with them.

Regards

Author:  jlongo [ Sun 02 Sep, 2012, 19:10 ]
Post subject:  Re: How can i control the dialog popup before stategy work always choose Default Setting?

Hi tea123:

You can use the solution privided by SmithJr but i think you mean to use some predefined settings at strategy start and not only the default ones defined on the code. For this you can create different "presets" with diferent settings. To do this, on the windows with the parameters at strategy start you can rename the "Default preset" change the settings and click on the save icon. After this you have this predefined setting saved and can use them clicking on the top dropbox and selecting any of the "presets" you have stored before.

Image

Hope that helps

JL

Attachments:
presets.png [33.5 KiB]
Downloaded 660 times

Author:  SmithJr [ Mon 03 Sep, 2012, 09:13 ]
Post subject:  Re: How can i control the dialog popup before stategy work always choose Default Setting?

Good point JL!

See you around,
SmithJr

  Page 1 of 1