Class PriceBarDescriptor

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<PriceBarInfo>
com.motivewave.platform.sdk.common.desc.PriceBarDescriptor

public class PriceBarDescriptor extends SettingDescriptor<PriceBarInfo>
Describes a price bar.
  • Constructor Details

    • PriceBarDescriptor

      public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, boolean enabled, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      type - type of price bar
      enabled - true if the path is enabled by default
      supportsDisable - true if the user can disable this price bar
    • PriceBarDescriptor

      public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      type - type of price bar
      fixedWidth - fixed width of the bar (null for auto width)
      enabled - true if the path is enabled by default
      supportsDisable - true if the user can disable this price bar
    • PriceBarDescriptor

      public PriceBarDescriptor(String name, String label, Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] dash, boolean enabled, boolean supportsDisable)
      Constructor.
      Parameters:
      name - name of the setting (key)
      label - label displayed to the user
      type - type of price bar
      fixedWidth - fixed width of the bar (null for auto width)
      lineColor - color for the line chart
      lineColor2 - secondary color for the line chart (used with the color policy)
      colorPolicy - policy for applying colors to the path
      gradientCenter - center point for the gradient, null if automatic
      lineWidth - width of the line
      enabled - true if the path is enabled by default
      supportsDisable - true if the user can disable this price bar
      lineDash - dash pattern for the line
  • Method Details

    • getDefaultValue

      public PriceBarInfo getDefaultValue()
      Gets the default value for this setting.
      Overrides:
      getDefaultValue in class SettingDescriptor<PriceBarInfo>
      Returns:
      default value for the setting
    • createInputFX

      public javafx.scene.Node createInputFX(Settings settings, boolean readOnly)
      Description copied from class: SettingDescriptor
      Creates the component that will accept the user input. This is called by the study framework.
      Specified by:
      createInputFX in class SettingDescriptor<PriceBarInfo>
      Parameters:
      settings - settings for the study
      readOnly - true if the component should not accept user input
      Returns:
      component that will accept user input.
    • isSupportsColorPolicy

      public boolean isSupportsColorPolicy()
      Determines if the user is allowed to choose the color policy.
      Returns:
      true if user is allowed to choose the color policy
    • getColorPolicies

      public Enums.ColorPolicy[] getColorPolicies()
      Gets the supported color policies for this path.
      Returns:
      return supported color policies
    • setColorPolicies

      public void setColorPolicies(Enums.ColorPolicy[] policies)
      Sets the supported color policies for this path.
      Parameters:
      policies - supported color policies
    • isSupportsTag

      public boolean isSupportsTag()
      Gets the supports tag attribute for the path. If true, the user can configure a tag for the path.
      Returns:
      true tags are supported
    • setSupportsTag

      public void setSupportsTag(boolean b)
      Sets the supports tag attribute for the path. If true, the user can configure a tag for the path.
      Parameters:
      b - true if the path supports a tag
    • isDisplaySetting

      public boolean isDisplaySetting()
      Description copied from class: SettingDescriptor
      Indicates if this setting is used to affect the appearance of the of the study/strategy
      Overrides:
      isDisplaySetting in class SettingDescriptor<PriceBarInfo>
      Returns:
      true if this setting affects the appearance of the study/strategy
    • fromJson

      public Object fromJson(Object json)
      Overrides:
      fromJson in class SettingDescriptor<PriceBarInfo>