### getWidth Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default line width for the guide. ```java public float getWidth() ``` -------------------------------- ### getDash Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default dash settings for the guide (null for solid line). ```java public float[] getDash() ``` -------------------------------- ### getGuides Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Settings.html Gets the set of all registered guide IDs. ```java public Set getGuides() Gets the set of all registered guide ids. Returns: a set of all the registered guides. ``` -------------------------------- ### getStartTime Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/TimeFrameDescriptor.html Gets the start time. ```java public int getStartTime() ``` -------------------------------- ### getQuickSettings Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets the list of quick settings. ```java public List getQuickSettings() ``` -------------------------------- ### Get Start of Bar Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Calculates the start of the bar taking into account regular vs extended trading hours. ```java public static long getStartOfBar(long start, long end, Instrument instr, BarSize bs, boolean rth) Calculates the start of the bar taking into account regular vs extended trading hours. For intraday bars, this will simply return the start of the bar. For daily+ bars this will calculate the start of the day/week/month Parameters: `start` - start time for the bar `end` - end time for the bar `instr` - instrument `bs` - bar size `rth` - regular trading hours vs extended trading hours Returns: start time of the bar in milliseconds since 1970 ``` -------------------------------- ### Get Start of Next Month Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the start of the next trading month. ```java public static long getStartOfNextMonth(long time, Instrument instr, boolean rth) Gets the start of the next trading month Parameters: `time` - time in milliseconds since 1970 `instr` - instrument `rth` - regular trading hours vs extended trading hours ``` -------------------------------- ### Get Start of Next Year Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the start of the next trading year. ```java public static long getStartOfNextYear(long time, Instrument instr, boolean rth) Gets the start of the next trading year Parameters: `time` - time in milliseconds since 1970 `instr` - instrument `rth` - regular trading hours vs extended trading hours ``` -------------------------------- ### Get Start of Next Week Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the start of the next trading week. ```java public static long getStartOfNextWeek(long time, Instrument instr, boolean rth) Gets the start of the next trading week Parameters: `time` - time in milliseconds since 1970 `instr` - instrument `rth` - regular trading hours vs extended trading hours ``` -------------------------------- ### get Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Generic method to get a value. ```Java public T get(String id, T def) ``` -------------------------------- ### get Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Generic method to get a value. ```Java public T get(String id) ``` -------------------------------- ### Get Start of Next Day Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the start of the next trading day (accounting for the weekend). ```java public static long getStartOfNextDay(long time, Instrument instr, boolean rth) Gets the start of the next trading day (accounting for the weekend) Parameters: `time` - time in milliseconds since 1970 `instr` - instrument `rth` - regular trading hours vs extended trading hours ``` -------------------------------- ### getLineColor Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default line color for the guide. ```java public Color getLineColor() ``` -------------------------------- ### getTextColor Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default text color for the guide indicator. ```java public Color getTextColor() ``` -------------------------------- ### getOpen Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the daily open price. ```java float getOpen() ``` -------------------------------- ### setWidth Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Sets the default line width for the guide. ```java public void setWidth(float w) ``` -------------------------------- ### getGuides Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/study/Plot.html Gets the set of declared guides (a map of value key to settings key). ```Java public Set getGuides() ``` -------------------------------- ### getDisplaySettings Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets the list of display settings. ```java public List getDisplaySettings() ``` -------------------------------- ### Get First Element Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the first element from the list (null if the list is null or empty). ```java public static T first(List list) Gets the first element from the list (null if the list is null or empty). ``` -------------------------------- ### getLow Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the daily low price. ```java float getLow() ``` -------------------------------- ### addQuickSettings Method (String...) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Retrieves the setting (if it exists) and adds it as a quick setting. ```java public void addQuickSettings(String... ids) ``` -------------------------------- ### Place Buy Orders - Multiple Overloads Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Demonstrates various overloads for placing BUY orders at market price, specifying instrument and quantity, or just quantity for the current instrument. ```java void buy(Instrument instr, int qty) Convenience Method: Places a BUY order for the given instrument at market price. Parameters: `instr` - instrument `qty` - number of shares/units to buy ``` ```java void buy(int qty) Convenience Method: Places a BUY order for the current instrument at market price. Parameters: `qty` - number of shares/units to buy ``` ```java void buy(Instrument instr, float qty) Convenience Method: Places a BUY order for the given instrument at market price. Parameters: `instr` - instrument `qty` - number of shares/units to buy ``` ```java void buy(float qty) Convenience Method: Places a BUY order for the current instrument at market price. Parameters: `qty` - number of shares/units to buy ``` -------------------------------- ### write Method Source: https://www.motivewave.com/sdk/javadoc/index-all.html Convenience method. ```java write(Writer, Locale, Object...) ``` -------------------------------- ### Method Details - getDescription() Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Enums.BarInput.html Gets the description. ```Java public String getDescription() Gets the description. Returns: description of the bar input ``` -------------------------------- ### getSetting Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets all of the SettingDescriptor associated with the given name. ```java public SettingDescriptor getSetting(String id) ``` -------------------------------- ### getOnQSUpdated Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets the OnUpdated listener for a quick setting. ```java public SettingsDescriptor.OnUpdated getOnQSUpdated(String id) ``` -------------------------------- ### addListener Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Adds a listener. ```java public void addListener(Runnable l) ``` -------------------------------- ### getFile Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Gets the file associated with the given id. ```Java public File getFile(String id) ``` -------------------------------- ### createControl Method Examples Source: https://www.motivewave.com/sdk/javadoc/index-all.html This snippet shows various implementations of the createControl method across different descriptor classes, used for creating input controls for settings. ```Java createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.BarSizeDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.BooleanDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.ColorDescriptor Creates the color input selector createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.DateTimeDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.DiscreteDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.DiscreteDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.DoubleDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.ExitPointDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.FileDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.FileDescriptor Creates an editor for this input and returns it as a JavaFX Node. createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.FontDescriptor Creates an editor for this input and returns it as a JavaFX Node. createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.GuideDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.IndicatorDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.InputDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.InputDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.InstrDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.InstrumentDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.IntegerDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.LabelDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.MAMethodDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.MAMethodDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.MarkerDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.OrderTypeDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.PathDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.PercentSliderDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.PriceBarDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.QuantityDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.SettingDescriptor Creates the component that will accept the user input. createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.ShadeDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.SliderDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.SoundFileDesc createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.SpacerDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.StringDescriptor Creates an editor for this input and returns it as a JavaFX Node. createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.TifDescriptor createControl(SettingsBase, boolean) - Method in class com.motivewave.platform.sdk.common.desc.TimeFrameDescriptor ``` -------------------------------- ### Place Sell Orders - Multiple Overloads Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Demonstrates various overloads for placing SELL orders at market price, specifying instrument and quantity, or just quantity for the current instrument. ```java void sell(Instrument instr, int qty) Convenience Method: Places a SELL order for the given instrument at market price. Parameters: `instr` - instrument `qty` - number of shares/units to sell ``` ```java void sell(int qty) Convenience Method: Places a SELL order for the current instrument at market price. Parameters: `qty` - number of shares/units to sell ``` ```java void sell(Instrument instr, float qty) Convenience Method: Places a SELL order for the given instrument at market price. Parameters: `instr` - instrument `qty` - number of shares/units to sell ``` ```java void sell(float qty) Convenience Method: Places a SELL order for the current instrument at market price. Parameters: `qty` - number of shares/units to sell ``` -------------------------------- ### getLabelColor Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default label color for the guide indicator. ```java public Color getLabelColor() ``` -------------------------------- ### PriceBarInfo Constructors Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/PriceBarInfo.html Demonstrates various constructors for PriceBarInfo, allowing customization of bar type, input, appearance, and display options. ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, boolean enabled) Constructor. Parameters: `type` - type of price bar `input` - bar input for display a bar or line chart `enabled` - true if this path should be displayed ``` ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, boolean enabled) Constructor. Parameters: `type` - type of price bar `input` - bar input for display a bar or line chart `fixedWidth` - fixed width of the bar (null for auto width) `enabled` - true if this path should be displayed ``` ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, float lineWidth, float[] lineDash, boolean enabled) Constructor. Parameters: `type` - type of price bar `input` - bar input for display a bar or line chart `fixedWidth` - fixed width of the bar (null for auto width) `lineColor` - color for the line chart `lineWidth` - width of the line `lineDash` - dash pattern for the line `enabled` - true if this path should be displayed ``` ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] lineDash, boolean enabled) Constructor. Parameters: `type` - type of price bar `input` - bar input for display a bar or line chart `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 `lineDash` - dash pattern for the line `enabled` - true if this path should be displayed ``` ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Integer fixedWidth, Color lineColor, Color lineColor2, Enums.ColorPolicy colorPolicy, Double gradientCenter, float lineWidth, float[] lineDash, boolean enabled, boolean showTag, boolean showTagValue, String tag, Font font, Color tagTextColor, Color tagBgColor) Constructor. Parameters: `type` - type of price bar `input` - bar input for display a bar or line chart `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 `lineDash` - dash pattern for the line `enabled` - true if this path should be displayed ``` ```Java public PriceBarInfo(Enums.PriceBarType type, Enums.BarInput input, Color c, Color c2, Color c3, Color c4, Enums.ColorPolicy colorPolicy, double gradientCenter, float strokeWidth, float[] dash, int maxPoints, boolean continuous, int barCenter, double fixedWidth, boolean showTag, boolean showTagValue, String tag, TextStyle tagStyle, boolean enabled) Constructor. Creates a path info for displaying the lines and points of the path. Parameters: `c` - primary color `c2` - secondary color `c3` - tertiary color `c4` - quaternary color `colorPolicy` - policy for applying colors to the path `gradientCenter` - center point for the gradient, null if automatic `dash` - dash style (null for solid line) `maxPoints` - max points to display `continuous` - true if this path is continuous even with missing values `barCenter` - center point for drawing bars `fixedWidth` - fixed width for the bars `showTag` - true if the tag should be displayed `showTagValue` - true if the value should be displayed in the tag `tag` - text for the tag `enabled` - true if this path should be displayed `shadeType` - type of shading for path `width` - width of the lines connecting the path points `pointType` - type of point to display `pointSize` - size of the points `showBars` - true if this path should be shown as bars `tagFont` - font for the tag `tagTextColor` - color for the tag text (null for the path color) `tagBgColor` - color for the tag background (null for no background) ``` -------------------------------- ### getStartOfWeek Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the start of the week (in millis since 1970) for the given time. ```java long getStartOfWeek(long time, boolean rth) ``` -------------------------------- ### getRowAligns Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets the row alignments for quick settings. ```java public List getRowAligns() ``` -------------------------------- ### getStartOfDay Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the start of the day (in millis since 1970) for the given day. ```java long getStartOfDay(long time, boolean rth) ``` -------------------------------- ### createLimitOrder (action, tif, qty, limitPrice) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Creates a new 'Limit' order. ```Java Order createLimitOrder(Enums.OrderAction action, Enums.TIF tif, int qty, float limitPrice) ``` -------------------------------- ### getStartStroke Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Gets the stroke for the start line. ```java public Stroke getStartStroke() ``` -------------------------------- ### getSettings Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Gets all of the SettingDescriptor instances declared for this study. ```java public List getSettings() ``` -------------------------------- ### getStartOfEveningSession Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the start of the evening session (in millis since 1970) for the given time. ```java long getStartOfEveningSession(long time) ``` -------------------------------- ### Constructor Details Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TextStyle.html Detailed explanations and signatures for the TextStyle constructors. ```java public TextStyle(Font font) public TextStyle(Font font, Color color) public TextStyle(Font font, Color color, Color bgColor) public TextStyle(float fs) public TextStyle(float fs, Color color) public TextStyle(float fs, Color color, Color bgColor) ``` -------------------------------- ### IndicatorInfo Constructors Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/IndicatorInfo.html Demonstrates various ways to construct an IndicatorInfo object with different parameters. ```Java public IndicatorInfo(String id, String label) public IndicatorInfo(String id, String label, Color lblColor, Color textColor, boolean enabled) public IndicatorInfo(String id, Color lblColor, Color textColor, boolean showLine, boolean enabled) public IndicatorInfo(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) public IndicatorInfo(String id, boolean showLine, float lineWidth, float[] lineDash, Color lineColor, boolean showTag, String tag, TextStyle tagStyle, boolean showLabel, String label, Font labelFont, boolean showOutline, Color outlineColor, Color textColor, Color lblColor, boolean top, boolean enabled) ``` -------------------------------- ### getStartWidth Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Gets the width start line (in pixels). ```java public float getStartWidth() ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/LineInfo.html Constructors for the LineInfo class. ```java LineInfo() LineInfo(boolean enabled) LineInfo(double value, Color lineColor, float width, float[] dash) LineInfo(double value, Color lineColor, float width, float[] dash, boolean enabled) LineInfo(float[] dash) LineInfo(Color lineColor) LineInfo(Color lineColor, boolean enabled) LineInfo(Color lineColor, float width, boolean enabled) LineInfo(Color lineColor, float width, float[] dash, boolean enabled) ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/Profile.html Summary of the constructor for the Profile class. ```java protected Profile(long startTime, long endTime, Instrument instrument, int rangeTicks) ``` -------------------------------- ### Calculate Profit/Loss (PnL) - Multiple Overloads Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Demonstrates various overloads of the calcPnl method for calculating profit/loss based on different parameters like entry price, exit price, quantity, and instrument. ```java double calcPnl(Instrument instr, float entryPrice, float qty) Convenience Method. Calculates the current profit/loss from the given entry price, quantity and instrument. Note: this is in the currency of the instrument associated with this context. Parameters: `instr` - instrument `entryPrice` - `qty` - Returns: calculated profit/loss ``` ```java double calcPnl(float entryPrice, float exitPrice, int qty) Convenience Method. Calculates the profit/loss from the given entry price, exit price and quantity (using the primary instrument). Note: this is in the currency of the instrument associated with this context. Parameters: `entryPrice` - `exitPrice` - `qty` - Returns: calculated profit/loss ``` ```java double calcPnl(Instrument instr, float entryPrice, float exitPrice, int qty) Convenience Method. Calculates the profit/loss from the given entry price, exit price, quantity and instrument. Parameters: `instr` - instrument `entryPrice` - `exitPrice` - `qty` - Returns: calculated profit/loss ``` -------------------------------- ### getStartTime Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Gets the start time as seconds since midnight. ```java public int getStartTime() ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/IndicatorInfo.html Constructs an Indicator Info. ```java IndicatorInfo(String id, boolean showLine, float lineWidth, float[] lineDash, Color lineColor, boolean showTag, String tag, TextStyle tagStyle, boolean showLabel, String label, Font labelFont, boolean showOutline, Color outlineColor, Color textColor, Color lblColor, boolean top, boolean enabled) IndicatorInfo(String id, Color lblColor, Color textColor, boolean showLine, boolean enabled) IndicatorInfo(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) IndicatorInfo(String id, String label) IndicatorInfo(String id, String label, Color lblColor, Color textColor, boolean enabled) ``` -------------------------------- ### getStartDash Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Gets the dash type of the start line (null for solid line). ```java public float[] getStartDash() ``` -------------------------------- ### createLimitOrder (instr, action, tif, qty, limitPrice) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Creates a new 'Limit' order with a specified instrument. ```Java Order createLimitOrder(Instrument instr, Enums.OrderAction action, Enums.TIF tif, int qty, float limitPrice) ``` -------------------------------- ### getStartColor Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Gets the color of the start line (null for default line color). ```java public Color getStartColor() ``` -------------------------------- ### createMarketOrder (action, qty) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Creates a new 'Market' order. ```Java Order createMarketOrder(Enums.OrderAction action, int qty) ``` -------------------------------- ### Constructor Details Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/ColorDescriptor.html Detailed explanations of ColorDescriptor constructors. ```java public ColorDescriptor(String name, String label, Color defaultValue) Constructor. Creates a color descriptor with the name (key), label and default color Parameters: `name` - name of this setting (key) `label` - label displayed to the user `defaultValue` - default color value ``` ```java public ColorDescriptor(String name, String label, Color defaultValue, boolean enabled, boolean supportsDisable) Constructor. Parameters: `name` - name of this setting (key) `label` - label displayed to the user `defaultValue` - default color value `enabled` - default enabled state `supportsDisable` - indicates if the user can disable this setting ``` ```java public ColorDescriptor(String name, String label, ColorInfo defaultValue) Constructor. Parameters: `name` - name of this setting (key) `label` - label displayed to the user `defaultValue` - default color value ``` ```java public ColorDescriptor(String name, String label, ColorInfo defaultValue, boolean supportsDisable) Constructor. Parameters: `name` - name of this setting (key) `label` - label displayed to the user `defaultValue` - default color value `supportsDisable` - indicates if the user can disable this setting `enabled` - default enabled state ``` -------------------------------- ### getStartOfYear Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the start of the year (in millis since 1970) for the given time, with an option to specify regular or extended trading hours. ```Java long getStartOfYear(long time, boolean rth) ``` -------------------------------- ### getStartOfMonth Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the start of the month (in millis since 1970) for the given time, with an option to specify regular or extended trading hours. ```Java long getStartOfMonth(long time, boolean rth) ``` -------------------------------- ### MenuItem Constructors Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/menu/MenuItem.html Provides examples of how to construct a MenuItem with different parameters. ```Java public MenuItem(String text) Constructor. Creates a menu item with the given text label. Parameters: `text` - display text for the menu item ``` ```Java public MenuItem(String text, Runnable action) Constructor. Creates a menu item with the given text label. Parameters: `text` - display text for the menu item `action` - action to execute when this item is selected (clicked) by the user ``` ```Java public MenuItem(String text, boolean checked, Runnable action) Constructor. Creates a menu item with the given text label. Parameters: `text` - display text for the menu item `checked` - if true a check mark will appear to the left of the menu item `action` - action to execute when this item is selected (clicked) by the user ``` -------------------------------- ### setOnQSUpdated Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Sets an OnUpdated listener for a quick setting. ```java public void setOnQSUpdated(String id, SettingsDescriptor.OnUpdated onUpdated) ``` -------------------------------- ### Field Details: startTime Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/Profile.html Details for the 'startTime' field. ```java protected long startTime ``` -------------------------------- ### Get Font Metrics Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the font metrics for the given font. ```java public static FontMetrics getFontMetrics(Font font) Gets the font metrics for the given font. ``` -------------------------------- ### addQuickSettings Method (SettingDescriptor...) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html Adds a setting that can be displayed in a tool bar or in the Quick Editor. ```java public void addQuickSettings(SettingDescriptor... sds) ``` -------------------------------- ### Get Last Element Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Util.html Gets the last element from the list (null if the list is null or empty). ```java public static T last(List list) Gets the last element from the list (null if the list is null or empty). ``` -------------------------------- ### Menu Constructor with Text Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/menu/Menu.html Creates a sub menu with the given text label. ```java public Menu(String text) ``` -------------------------------- ### get Method (no params) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/ErrorCode.html Gets the locale dependent message using the US locale. ```Java public String get() ``` -------------------------------- ### setDash Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Sets the default dash settings for the guide (null for solid line). ```java public void setDash(float[] d) ``` -------------------------------- ### withStyle Method Source: https://www.motivewave.com/sdk/javadoc/index-all.html Sets the style. ```java withStyle(int) ``` -------------------------------- ### Get Background Color Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/draw/ColorRange.html Gets the background color for the color range. This is the color that is shown for undefined regions. ```Java public Color getBackgroundColor() ``` -------------------------------- ### get Method (with params) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/ErrorCode.html Gets the locale dependent message using the US locale (with the given string substitutions). ```Java public String get(Object... params) ``` -------------------------------- ### get Method (with Locale and params) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/ErrorCode.html Gets the locale dependent message for the default locale. The occurrences of %x are replaced by the given parameters. ```Java public String get(Locale locale, Object... params) ``` -------------------------------- ### fromJson Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Populates settings from a JSON map. ```java public void fromJson(Map json) ``` -------------------------------- ### getEndTime Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/TimeFrameDescriptor.html Gets the end time. ```java public int getEndTime() ``` -------------------------------- ### Method Details: add Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingTab.html Details for the add(String groupName, SettingDescriptor... settings) method. ```java public SettingTab add(String groupName, SettingDescriptor... settings) ``` -------------------------------- ### fromKey Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/BarSize.html Gets a BarSize from its key. ```Java public static BarSize fromKey(String key) ``` -------------------------------- ### isShowStart Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TimeFrame.html Checks if the start line should be displayed. ```java public boolean isShowStart() ``` -------------------------------- ### getBaseCurrency Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Gets the symbol for the base currency. ```Java String getBaseCurrency() Gets the symbol for the base currency. Returns: base currency ``` -------------------------------- ### VolumeRow getStartPrice Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/VolumeRow.html Retrieves the starting price of this row. ```java public float getStartPrice() ``` -------------------------------- ### getDefaultValue Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/TimeFrameDescriptor.html Gets the default value for this setting. ```java public TimeFrame getDefaultValue() ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/TextStyle.html Provides a summary of the available constructors for the TextStyle class. ```java TextStyle(float fs) TextStyle(float fs, Color color) TextStyle(float fs, Color color, Color bgColor) TextStyle(Font font) TextStyle(Font font, Color color) TextStyle(Font font, Color color, Color bgColor) ``` -------------------------------- ### getStep Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/DoubleDescriptor.html Gets the incremental step. ```java public double getStep() ``` -------------------------------- ### getHigh Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Instrument.html Gets the daily high price. ```java float getHigh() ``` -------------------------------- ### withBgColor Method Source: https://www.motivewave.com/sdk/javadoc/index-all.html Sets the background color. ```java withBgColor(Color) ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/ColorDescriptor.html Constructors for ColorDescriptor. ```java ColorDescriptor(String name, String label, ColorInfo defaultValue) Constructor. ``` ```java ColorDescriptor(String name, String label, ColorInfo defaultValue, boolean supportsDisable) Constructor. ``` ```java ColorDescriptor(String name, String label, Color defaultValue) Constructor. ``` ```java ColorDescriptor(String name, String label, Color defaultValue, boolean enabled, boolean supportsDisable) Constructor. ``` -------------------------------- ### getLots Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/ExitPointDescriptor.html Gets the number of lots. ```java public int getLots() ``` -------------------------------- ### getPips Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/ExitPointDescriptor.html Gets the number of pips. ```java public int getPips() ``` -------------------------------- ### SettingsBase Constructor Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/SettingsBase.html Constructors for the SettingsBase class. ```java SettingsBase() SettingsBase(SettingsDescriptor desc) ``` -------------------------------- ### Method Details: getOpenPrice Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/Profile.html Details for the getOpenPrice method. ```java public float getOpenPrice() ``` -------------------------------- ### getDefaultValue Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/DateTimeDescriptor.html Gets the default value for this setting. ```java public Long getDefaultValue() ``` -------------------------------- ### getCashBalance Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Gets the current cash balance for the account. ```Java double getCashBalance() Gets the current cash balance for the account. Returns: current cash balance for the account ``` -------------------------------- ### populate Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/SummaryProfile.html Populates the profile with a list of VolumeProfile objects. ```java public void populate(List profiles) ``` -------------------------------- ### getExportedValues Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/study/RuntimeDescriptor.html Gets the list of exported values. ```java public List getExportedValues() ``` -------------------------------- ### createMarketOrder (instr, action, qty) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Creates a new 'Market' order with a specified instrument. ```Java Order createMarketOrder(Instrument instr, Enums.OrderAction action, int qty) ``` -------------------------------- ### Constructor Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingsDescriptor.html The default constructor for SettingsDescriptor. ```java public SettingsDescriptor() ``` -------------------------------- ### getDefaultValue Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/GuideDescriptor.html Gets the default value for this setting. ```java public GuideInfo getDefaultValue() ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/SettingTab.html Constructors for SettingTab. ```java SettingTab(String name) Creates a tab with the given name ``` ```java SettingTab(String name, String header) Creates a tab with the given name ``` -------------------------------- ### createLimitOrder (refId, action, tif, qty, limitPrice) Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/order_mgmt/OrderContext.html Creates a new 'Limit' order using the current instrument. The refId parameter is used for hedging accounts to associate this order to an existing position. ```Java Order createLimitOrder(Object refId, Enums.OrderAction action, Enums.TIF tif, int qty, float limitPrice) ``` -------------------------------- ### getDefaultValue Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/MAMethodDescriptor.html Gets the default value for this setting. ```java public Enums.MAMethod getDefaultValue() ``` -------------------------------- ### Method Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Enums.EntryState.html Summarizes the static and concrete methods available for Enums.EntryState. ```Java Modifier and Type Method Description `static Enums.EntryState` `valueOf(String name)` Returns the enum constant of this class with the specified name. `static Enums.EntryState[]` `values()` Returns an array containing the constants of this enum class, in the order they are declared. ``` -------------------------------- ### getStep Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/IntegerDescriptor.html Gets the step increment value. ```java public int getStep() ``` -------------------------------- ### setGuide Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/Settings.html Associates a GuideInfo object to a specified ID. Called by the underlying study framework. ```java public void setGuide(String id, GuideInfo guide) Associates the given GuideInfo to the specified id. This is called by the underlying study framework. Parameters: id - id of the guide guide - guide info object ``` -------------------------------- ### getMaxValue Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/IntegerDescriptor.html Gets the maximum value for the setting. ```java public int getMaxValue() ``` -------------------------------- ### Method Details: getTotalVolume Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/profile/Profile.html Details for the getTotalVolume method. ```java public double getTotalVolume() ``` -------------------------------- ### getMinValue Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/IntegerDescriptor.html Gets the minimum value for the setting. ```java public int getMinValue() ``` -------------------------------- ### StringInfo Constructor Details Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/StringInfo.html Detailed view of StringInfo constructors. ```java public StringInfo(String value) public StringInfo(String value, boolean enabled) ``` -------------------------------- ### getDefaultValue Method Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/desc/IntegerDescriptor.html Gets the default value as an Integer. ```java public Integer getDefaultValue() ``` -------------------------------- ### Constructor Summary Source: https://www.motivewave.com/sdk/javadoc/com/motivewave/platform/sdk/common/MException.html Provides a summary of the constructors available for the MException class. ```java MException(ErrorCode error) Constructs a new MException using the given error code. MException(ErrorCode error, Object... parameters) Constructs a new MException with the given error code and parameter substitution for the message. MException(Exception cause, ErrorCode error) Constructs a new MException with the cause and error msg. MException(Exception cause, ErrorCode error, Object... parameters) Constructs a new MException with the cause, using the error. ```