Skip to content

Commit 0e01f97

Browse files
committed
Update to the latest Haas definitions.
1 parent c8c5316 commit 0e01f97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+9337
-2403
lines changed

haas-production/hs.array-helpers.def.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function ArrayAdd(input, element) end
1313
--- Returns true if the array contains any element or an element matches a specific value.
1414
--- @param input any Source data.
1515
--- @param value any Optional - Optional value to match.
16-
--- @return boolean Returns true if. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
16+
--- @return boolean Returns true if the input has any elements or if 'value' is defined when any of the elements matches the value. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
1717
--- @overload fun(input: any): boolean
1818
--- @overload fun(input: any, optionalParameters: OptionalParametersOf_ArrayAny): boolean
1919
function ArrayAny(input, value) end
@@ -31,14 +31,14 @@ function ArrayConcat(array1, array2) end
3131
--- Returns true if the array contains any element or an element matches a specific value.
3232
--- @param input any Source data.
3333
--- @param value any Optional - Optional value to match.
34-
--- @return boolean Returns true if. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
34+
--- @return boolean Returns true if the input has any elements or if 'value' is defined when any of the elements matches the value. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
3535
--- @overload fun(input: any): boolean
3636
--- @overload fun(input: any, optionalParameters: OptionalParametersOf_ArrayContains): boolean
3737
function ArrayContains(input, value) end
3838

3939
--- Returns a new list with only unique elements. In other words; removes all duplicates.
4040
--- @param input any Source data.
41-
--- @return any Returns the list.
41+
--- @return any Returns the unique values of the input.
4242
function ArrayDistinct(input) end
4343

4444
--- The optional parameters of ArrayFilter.
@@ -106,12 +106,12 @@ function ArrayRemove(input, index) end
106106
--- @param input any Source data.
107107
--- @param oldValue any The old value.
108108
--- @param newValue any The new value.
109-
--- @return any Returns true if.
109+
--- @return any The input with replaced values.
110110
function ArrayReplace(input, oldValue, newValue) end
111111

112112
--- Remove an item from the beginning of an array.
113113
--- @param input any Source data.
114-
--- @return any Returns the input array.
114+
--- @return any The input without the first value
115115
function ArrayShift(input) end
116116

117117
--- The optional parameters of ArraySort.
@@ -141,7 +141,7 @@ function ArraySum(input, key) end
141141
--- Adds an element to the beginning of an array.
142142
--- @param input any Source data.
143143
--- @param element any Element which to add to the array.
144-
--- @return any Returns the input array.
144+
--- @return any The input with the element added in front of the array
145145
function ArrayUnshift(input, element) end
146146

147147
--- The optional parameters of Count.
@@ -192,13 +192,13 @@ function Range(input, offset, count) end
192192
--- @shape OptionalParametersOf_SourceManager
193193
--- @field interval number | nil The interval on which the data is based. Default is the selected main interval.
194194
--- @field cap number | nil Maximum size of the collection.
195-
--- @field initialValues number[] | nil
195+
--- @field initialValues number[] | nil The initial values when source in initialized
196196

197197
--- Stores numeric values in a collection. Only adds the new value when the candle on the specified interval closed. This results in interval based data.
198198
--- @param newValue number This value will be added in front of the collection when the candle closed.
199199
--- @param interval number Optional - The interval on which the data is based. Default is the selected main interval. Suggestions: InputInterval, CurrentInterval
200200
--- @param cap number Optional - Maximum size of the collection.
201-
--- @param initialValues number[] Optional -
201+
--- @param initialValues number[] Optional - The initial values when source in initialized
202202
--- @return number[] Returns the numeric collection. Output Suggestions: Equals, IsBiggerOrSmallerThan, IsSmallerThan, IsBiggerThan, Compare, Add, Sum, Sub, Mul, Mult, Div, AddPerc, AddPercentage, SubPerc, SubPercentage, Plot
203203
--- @overload fun(newValue: number): number[]
204204
--- @overload fun(newValue: number, interval: number): number[]

haas-production/hs.charting.def.lua

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ function ChartSetOptions(chartId, title, height, style) end
7474
--- @field side Enum | nil Axis side to snap on.
7575
--- @field id string | nil Unique identifier.
7676
--- @field behind boolean | nil If true, the line will be plotted behind the price chart, if enabled.
77-
--- @field ignoreOnAxis boolean | nil If true, the line we not be taking in to consideration when calculating the range on the y-axis.
77+
--- @field ignoreOnAxis boolean | nil If true, the line will not be taken into consideration when calculating the range on the y-axis.
78+
--- @field drawTrailingLine boolean | nil If true, a dotted line will be drawn from the last data point to the y-axis.
7879

7980
--- Creates a line options object to be used for Plot().
8081
--- @param color string | ColorEnum Optional - The color of the line. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
@@ -85,7 +86,8 @@ function ChartSetOptions(chartId, title, height, style) end
8586
--- @param side Enum Optional - Axis side to snap on. Suggestions: RightAxis, LeftAxis
8687
--- @param id string Optional - Unique identifier. Suggestions: Load, NewGuid
8788
--- @param behind boolean Optional - If true, the line will be plotted behind the price chart, if enabled.
88-
--- @param ignoreOnAxis boolean Optional - If true, the line we not be taking in to consideration when calculating the range on the y-axis.
89+
--- @param ignoreOnAxis boolean Optional - If true, the line will not be taken into consideration when calculating the range on the y-axis.
90+
--- @param drawTrailingLine boolean Optional - If true, a dotted line will be drawn from the last data point to the y-axis.
8991
--- @return any Creates a line options object. Output Suggestions: Plot
9092
--- @overload fun(): any
9193
--- @overload fun(color: string | ColorEnum): any
@@ -96,8 +98,9 @@ function ChartSetOptions(chartId, title, height, style) end
9698
--- @overload fun(color: string | ColorEnum, style: Enum, deco: Enum, width: number, offset: number, side: Enum): any
9799
--- @overload fun(color: string | ColorEnum, style: Enum, deco: Enum, width: number, offset: number, side: Enum, id: string): any
98100
--- @overload fun(color: string | ColorEnum, style: Enum, deco: Enum, width: number, offset: number, side: Enum, id: string, behind: boolean): any
101+
--- @overload fun(color: string | ColorEnum, style: Enum, deco: Enum, width: number, offset: number, side: Enum, id: string, behind: boolean, ignoreOnAxis: boolean): any
99102
--- @overload fun(optionalParameters: OptionalParametersOf_LineOptions): any
100-
function LineOptions(color, style, deco, width, offset, side, id, behind, ignoreOnAxis) end
103+
function LineOptions(color, style, deco, width, offset, side, id, behind, ignoreOnAxis, drawTrailingLine) end
101104

102105
--- The optional parameters of MarkCandle.
103106
--- @shape OptionalParametersOf_MarkCandle
@@ -331,7 +334,7 @@ function PlotPrice(chartId, market, interval, style, upColor, upFill, downColor,
331334

332335
--- Draws a shape above the candle or first line on the chart.
333336
--- @param chartId number Optional - Index on which to plot the line.
334-
--- @param shape Enum Optional - The shape type. Suggestions: ShapeAdd, ShapeCircle, ShapeCross, ShapeDiamond, ShapeSquare, ShapeTriangleDown, ShapeTriangleUp, ShapeText
337+
--- @param shape Enum Optional - The shape type. Suggestions: ShapeAdd, ShapeCircle, ShapeCross, ShapeDiamond, ShapeDash, ShapeSquare, ShapeTriangleDown, ShapeTriangleUp, ShapeText
335338
--- @param color string | ColorEnum Optional - The color of the shape. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
336339
--- @param size number Optional - Size of the shape.
337340
--- @param aboveCandle boolean Optional - If true, the shape will be drawn above the candle else below.
@@ -350,6 +353,19 @@ function PlotPrice(chartId, market, interval, style, upColor, upFill, downColor,
350353
--- @overload fun(optionalParameters: OptionalParametersOf_PlotShape): void
351354
function PlotShape(chartId, shape, color, size, aboveCandle, text, textColor, offset) end
352355

356+
--- The optional parameters of PlotShapes.
357+
--- @shape OptionalParametersOf_PlotShapes
358+
--- @field fillColor string | nil The inner color of the circles. Default is none.
359+
360+
--- Changes the line into a specific shape.
361+
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
362+
--- @param shape Enum The shape type. Suggestions: ShapeAdd, ShapeCircle, ShapeCross, ShapeDiamond, ShapeDash, ShapeSquare, ShapeTriangleDown, ShapeTriangleUp, ShapeText
363+
--- @param fillColor string | ColorEnum Optional - The inner color of the circles. Default is none. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
364+
--- @return void
365+
--- @overload fun(lineGuid: string, shape: Enum): void
366+
--- @overload fun(lineGuid: string, shape: Enum, optionalParameters: OptionalParametersOf_PlotShapes): void
367+
function PlotShapes(lineGuid, shape, fillColor) end
368+
353369
--- Creates a small signal bar chart. A positive chartId will place the line below the main price chart. A negative index above.
354370
--- @param chartId number Index on which to plot the line.
355371
--- @param color string | ColorEnum The color of the signal block. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
@@ -375,7 +391,7 @@ function PlotStackedArea(lineGuids) end
375391
--- @param chartId number The chart index on which to plot the data.
376392
--- @param name string Name of the line. This needs to be unique per index.
377393
--- @param color string | ColorEnum The line color. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
378-
--- @param unix number The a-axis timestamp on which to place the line. Suggestions: Input
394+
--- @param unix number The x-axis timestamp on which to place the line. Suggestions: Input
379395
--- @param lineDecoration Enum Optional - Line decoration style. Default is Solid. Suggestions: Solid, Dashed, Dotted
380396
--- @return void
381397
--- @overload fun(chartId: number, name: string, color: string | ColorEnum, unix: number): void
@@ -386,8 +402,8 @@ function PlotVerticalLine(chartId, name, color, unix, lineDecoration) end
386402
--- @param chartId number The chart index on which to plot the data.
387403
--- @param name string Name of the zone. This needs to be unique per index.
388404
--- @param color string | ColorEnum The zone inner color. Suggestions: Aqua, Black, Blue, Cyan, DarkGray, DarkGreen, Fuchsia, Gold, Gray, Green, Maroon, Olive, Orange, Purple, Red, SkyBlue, Teal, White, Yellow, ChangeColorOpacity
389-
--- @param start number The lowest value of the zone. Suggestions: Input
390-
--- @param endValue number The highest value of the zone. Suggestions: Input
405+
--- @param start number The lowest value of the zone on the y-axis. Suggestions: Input
406+
--- @param endValue number The highest value of the zone on the y-axis. Suggestions: Input
391407
--- @return void
392408
function PlotVerticalZone(chartId, name, color, start, endValue) end
393409

@@ -415,3 +431,9 @@ function PlotVerticalZone(chartId, name, color, start, endValue) end
415431
--- @overload fun(chartId: number, optionalParameters: OptionalParametersOf_PlotVolume): void
416432
function PlotVolume(chartId, upColor, downColor, upFill, downFill, side) end
417433

434+
--- Configures the opacity for stacked area chart. A values between
435+
--- @param chartId number Index on which to plot the line.
436+
--- @param opacity number Opacity level from 0 - 100.
437+
--- @return void
438+
function SetStackedAreaOpacity(chartId, opacity) end
439+

haas-production/hs.custom-commands-helpers.def.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function DefineEasyIndicatorOutput(result) end
1414
--- The object returned by DefineEasyIndicatorParameters.
1515
--- @class ResultOf_DefineEasyIndicatorParameters
1616
--- @field chartIndex number Index on which to plot. Suggestions: Plot
17-
--- @field interval number The interval of the indicator. Suggestions: AskPrices, BuyPrices, BidPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, Prices, HLPrices, HLCPrices, OCPrices, HeikenClosePrices, OHLCPrices, DefineIntervalOptimization
17+
--- @field interval number The interval of the indicator. Suggestions: AskPrices, BuyPrices, BidPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, Prices, HLPrices, HLCPrices, OCPrices, HeikenClosePrices, OHLCPrices, GetBodyHighPrices, GetBodyLowPrices, DefineIntervalOptimization
1818
--- @field [1] number Index on which to plot. Suggestions: Plot
19-
--- @field [2] number The interval of the indicator. Suggestions: AskPrices, BuyPrices, BidPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, Prices, HLPrices, HLCPrices, OCPrices, HeikenClosePrices, OHLCPrices, DefineIntervalOptimization
19+
--- @field [2] number The interval of the indicator. Suggestions: AskPrices, BuyPrices, BidPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, Prices, HLPrices, HLCPrices, OCPrices, HeikenClosePrices, OHLCPrices, GetBodyHighPrices, GetBodyLowPrices, DefineIntervalOptimization
2020

2121
--- The optional parameters of DefineEasyIndicatorParameters.
2222
--- @shape OptionalParametersOf_DefineEasyIndicatorParameters

0 commit comments

Comments
 (0)