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 Type Method Description
    boolean isStrategyEnabled​(java.lang.String alias)  
    void onStrategyCheckboxEnabled​(java.lang.String alias, boolean isEnabled)
    Checkbox for this strategy for this alias was set enabled/disabled
    default void setStrategyEnabledRecheckCallback​(java.lang.String alias, java.lang.Runnable recheckCallback)
    Set callback that allows strategy to notify that value returned by isStrategyEnabled(String) has changed.
  • Method Details

    • onStrategyCheckboxEnabled

      void onStrategyCheckboxEnabled​(java.lang.String alias, boolean isEnabled)
      Checkbox for this strategy for this alias was set enabled/disabled
      Parameters:
      alias - alias of instrument
      isEnabled - true if checkbox was selected, false otherwise
    • isStrategyEnabled

      boolean isStrategyEnabled​(java.lang.String alias)
      Parameters:
      alias - alias of instrument
      Returns:
      true if strategy is currently enabled for this alias, false otherwise
    • setStrategyEnabledRecheckCallback

      default void setStrategyEnabledRecheckCallback​(java.lang.String alias, java.lang.Runnable recheckCallback)
      Set callback that allows strategy to notify that value returned by isStrategyEnabled(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 to
      recheckCallback - runnable to call if enabled state has changed