com.dukascopy.api
Annotation Type Configurable


@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface Configurable

Fields marked with this annotation will be shown in dialog before strategy start. Values from that dialog will be set to fields before calling onStart method


Required Element Summary
 String value
          Name of the field that will appear in dialog
 
Optional Element Summary
 boolean datetimeAsLong
          Setting if
 String fileType
          This field is exclusively for File parameters, for other types of parameters fileType value will be ignored.
 boolean obligatory
          Setting this to true means field is obligatory
 double stepSize
          This field is suitable for parameter's types as : int, long or double.
 

Element Detail

value

public abstract String value
Name of the field that will appear in dialog

Returns:
value for field

fileType

public abstract String fileType
This field is exclusively for File parameters, for other types of parameters fileType value will be ignored.

File parameters can be visualized in 2 ways:

1. textField and button("..."), which allow you to specify file from your file system. Do not use fileType or define it ="" to use this visualization

2. combobox with predefined list of file(s) from strategy directory. fileType should not be empty to use this visualization. In this case fileType is filter, which specifies what files to show in combo.
e.g. fieldType="*" -> return all your files from Strategy directory,
fieldType="*.xml" -> return only files with XML extension from Strategy directory

Returns:
fileName filter
Default:
""

stepSize

public abstract double stepSize
This field is suitable for parameter's types as : int, long or double. For other types of parameters stepSize value will be ignored. Value must be positive & greater then zero Default stepSize for int & long is 1, for double it's 0.5

Returns:
step value as String
Default:
0.0

obligatory

public abstract boolean obligatory
Setting this to true means field is obligatory

Returns:
true - obligatory, default false
Default:
false

datetimeAsLong

public abstract boolean datetimeAsLong
Setting if

Returns:
true - obligatory, default false
Default:
false


Copyright © 2011. All Rights Reserved.