Package velox.api.layer1
Interface Layer1ApiInstrumentSpecificEnabledStateProvider
public interface Layer1ApiInstrumentSpecificEnabledStateProvider
If this interface is implemented, when strategy checkbox is selected/deselected in
Studies config / Strategy config dialog, strategy will not be loaded/unloaded, instead
it will be notified via this interface
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisStrategyEnabled(String alias) voidonStrategyCheckboxEnabled(String alias, boolean isEnabled) Checkbox for this strategy for this alias was set enabled/disableddefault voidsetStrategyEnabledRecheckCallback(String alias, Runnable recheckCallback) Set callback that allows strategy to notify that value returned byisStrategyEnabled(String)has changed.
-
Method Details
-
onStrategyCheckboxEnabled
Checkbox for this strategy for this alias was set enabled/disabled- Parameters:
alias- alias of instrumentisEnabled- true if checkbox was selected, false otherwise
-
isStrategyEnabled
- Parameters:
alias- alias of instrument- Returns:
- true if strategy is currently enabled for this alias, false otherwise
-
setStrategyEnabledRecheckCallback
Set callback that allows strategy to notify that value returned byisStrategyEnabled(String)has changed. You don't need to implement it unless your strategy can change enabled state without being asked from outside.- Parameters:
alias- alias of the instrument which callback relates torecheckCallback- runnable to call if enabled state has changed
-