nexustrade 5.1.0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -3
- package/dist/cjs/client.js +8 -2
- package/dist/cjs/generated/ntSdk.generated.js +133 -133
- package/dist/cjs/portfolio.js +3 -0
- package/dist/esm/client.d.ts +3 -1
- package/dist/esm/client.js +8 -2
- package/dist/esm/generated/ntSdk.generated.d.ts +133 -133
- package/dist/esm/generated/ntSdk.generated.js +133 -133
- package/dist/esm/portfolio.d.ts +2 -0
- package/dist/esm/portfolio.js +3 -0
- package/package.json +1 -1
|
@@ -905,17 +905,17 @@ export declare const portfolio: (name: string, strategies: Strategy[], options?:
|
|
|
905
905
|
deployment?: AuthoredDeploymentTiming;
|
|
906
906
|
}) => PortfolioHandle;
|
|
907
907
|
/**
|
|
908
|
-
*
|
|
908
|
+
* The absolute value of an indicator.
|
|
909
909
|
*/
|
|
910
910
|
export declare function AbsoluteValue(operand: Indicator): Indicator;
|
|
911
911
|
/**
|
|
912
|
-
*
|
|
912
|
+
* Running total of close-location value times volume. Unlike OBV it weights where in the range the bar closed, so weak closes on high volume distribute. Range: Unbounded (cumulative).
|
|
913
913
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
914
914
|
* @param interval Bar interval the line is accumulated on
|
|
915
915
|
*/
|
|
916
916
|
export declare function AccumulationDistribution(asset: AssetArg, interval?: Interval): Indicator;
|
|
917
917
|
/**
|
|
918
|
-
*
|
|
918
|
+
* Wilder's ADX: trend strength on 0-100, with optional +DI and -DI trend-direction lines. ADX above ~25 is conventionally a strong trend. Range: 0 to 100.
|
|
919
919
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
920
920
|
* @param length Length of time
|
|
921
921
|
* @param interval Unit of time
|
|
@@ -923,19 +923,19 @@ export declare function AccumulationDistribution(asset: AssetArg, interval?: Int
|
|
|
923
923
|
*/
|
|
924
924
|
export declare function AverageDirectionalIndex(asset: AssetArg, length?: number, interval?: Interval, line?: "adx" | "plusDi" | "minusDi"): Indicator;
|
|
925
925
|
/**
|
|
926
|
-
*
|
|
926
|
+
* The average of True Range over a window. A smoothed measure of volatility used for position sizing and stop-losses. Range: >= 0.
|
|
927
927
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
928
928
|
* @param length Length of time
|
|
929
929
|
* @param interval Unit of time
|
|
930
930
|
*/
|
|
931
931
|
export declare function AverageTrueRange(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
932
932
|
/**
|
|
933
|
-
*
|
|
933
|
+
* Detects a bearish fair value gap (3-candle gap down) on minute bars. Returns the gap's resistance price (candle1 low) while the pattern is active; otherwise no value (condition fails). Not a 0/1 flag — never compare to 1. Range: price when present.
|
|
934
934
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
935
935
|
*/
|
|
936
936
|
export declare function BearishFairValueGap(asset: AssetArg): Indicator;
|
|
937
937
|
/**
|
|
938
|
-
*
|
|
938
|
+
* One Bollinger band, returned as a single number: the simple moving average of price plus the given number of standard deviations of price over the same window. A positive number gives the upper band, a negative number the lower band, and 0 the moving average itself. Range: Same scale as price.
|
|
939
939
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
940
940
|
* @param length Length of time
|
|
941
941
|
* @param interval Unit of time
|
|
@@ -944,23 +944,23 @@ export declare function BearishFairValueGap(asset: AssetArg): Indicator;
|
|
|
944
944
|
export declare function BollingerBand(asset: AssetArg, length?: number, interval?: Interval, numStandardDeviations?: number): Indicator;
|
|
945
945
|
export declare const BBand: typeof BollingerBand;
|
|
946
946
|
/**
|
|
947
|
-
*
|
|
947
|
+
* Detects a bullish fair value gap (3-candle gap up) on minute bars. Returns the gap's support price (candle1 high) while the pattern is active; otherwise no value (condition fails). Not a 0/1 flag — never compare to 1 (that is for CrossAbove/CrossBelow). Range: price when present.
|
|
948
948
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
949
949
|
*/
|
|
950
950
|
export declare function BullishFairValueGap(asset: AssetArg): Indicator;
|
|
951
951
|
/**
|
|
952
|
-
*
|
|
952
|
+
* The amount of cash available to make new purchases. Range: >= 0.
|
|
953
953
|
*/
|
|
954
954
|
export declare function BuyingPower(): Indicator;
|
|
955
955
|
/**
|
|
956
|
-
*
|
|
956
|
+
* Money flow volume over money volume across N bars, bounded in -1 to +1. Sustained readings above +0.2 show institutional accumulation. Range: -1 to +1.
|
|
957
957
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
958
958
|
* @param length Length of time
|
|
959
959
|
* @param interval Unit of time
|
|
960
960
|
*/
|
|
961
961
|
export declare function ChaikinMoneyFlow(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
962
962
|
/**
|
|
963
|
-
*
|
|
963
|
+
* Prices, the average close, or the end time of completed chart candles, built from contiguous minute data. Stock candles align to the regular trading session. Range: Same scale as price for open, high, low, close and sma; the endTime line returns the end time of the newest selected candle in Unix seconds.
|
|
964
964
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
965
965
|
* @param barMinutes Completed candles: stocks divide the 390-minute regular session from 9:30 ET. Crypto divides the 1440-minute UTC day or uses 10080 for a Monday UTC week; legacy intraday sizes remain valid. Observation cadence must be Minute even for daily/weekly candles.
|
|
966
966
|
* @param line open: oldest selected candle; close: newest; high/low: range; sma: mean candle closes.
|
|
@@ -970,7 +970,7 @@ export declare function ChaikinMoneyFlow(asset: AssetArg, length?: number, inter
|
|
|
970
970
|
*/
|
|
971
971
|
export declare function ChartBar(asset: AssetArg, barMinutes?: number, line?: "open" | "high" | "low" | "close" | "sma" | "endTime", bars?: number, offsetBars?: number, minutePolicy?: "strict" | "observed"): Indicator;
|
|
972
972
|
/**
|
|
973
|
-
*
|
|
973
|
+
* Deviation of the typical price from its moving average, scaled by mean deviation. Readings above +100 are overbought, below -100 oversold. Range: Unbounded (typically -300 to +300).
|
|
974
974
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
975
975
|
* @param length Length of time
|
|
976
976
|
* @param interval Unit of time
|
|
@@ -978,7 +978,7 @@ export declare function ChartBar(asset: AssetArg, barMinutes?: number, line?: "o
|
|
|
978
978
|
*/
|
|
979
979
|
export declare function CommodityChannelIndex(asset: AssetArg, length?: number, interval?: Interval, constant?: number): Indicator;
|
|
980
980
|
/**
|
|
981
|
-
*
|
|
981
|
+
* The annualized growth rate of a fundamental metric over a specified number of years. Smooths out quarterly volatility to show the long-term trend. Range: Unbounded (percentage).
|
|
982
982
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
983
983
|
* @param metric The fundamental metric to use
|
|
984
984
|
* @param years Floating point years value
|
|
@@ -1006,8 +1006,8 @@ export declare function ConsecutiveIncrease(indicator: Indicator, period: Period
|
|
|
1006
1006
|
*/
|
|
1007
1007
|
export declare function ConsecutiveTrue(condition: Condition, length?: number, interval?: Interval): Indicator;
|
|
1008
1008
|
/**
|
|
1009
|
-
*
|
|
1010
|
-
* @param operands
|
|
1009
|
+
* Rolling Pearson correlation (-1 to 1) of two indicators' period-over-period returns over N paired observations. Flat or degenerate windows read no-signal instead of a fabricated number.
|
|
1010
|
+
* @param operands One list of exactly 2 sub-indicators.
|
|
1011
1011
|
* @param length Length of time
|
|
1012
1012
|
* @param interval Unit of time
|
|
1013
1013
|
*/
|
|
@@ -1032,15 +1032,15 @@ export declare function CrossAbove(left: Indicator, right: Indicator): Indicator
|
|
|
1032
1032
|
*/
|
|
1033
1033
|
export declare function CrossBelow(left: Indicator, right: Indicator): Indicator;
|
|
1034
1034
|
/**
|
|
1035
|
-
*
|
|
1035
|
+
* Hours since midnight in America/New_York time, including fractional hours. For example, 9:30 AM returns 9.5. Daylight saving time is handled automatically.
|
|
1036
1036
|
*/
|
|
1037
1037
|
export declare function CurrentTimeHours(): Indicator;
|
|
1038
1038
|
/**
|
|
1039
|
-
*
|
|
1039
|
+
* Minutes since midnight in America/New_York time, including fractional minutes. For example, 9:30 AM returns 570. Daylight saving time is handled automatically.
|
|
1040
1040
|
*/
|
|
1041
1041
|
export declare function CurrentTimeMinutes(): Indicator;
|
|
1042
1042
|
/**
|
|
1043
|
-
*
|
|
1043
|
+
* Seconds since midnight in America/New_York time, including fractions of a second. For example, 9:30 AM returns 34200. Daylight saving time is handled automatically.
|
|
1044
1044
|
*/
|
|
1045
1045
|
export declare function CurrentTimeSeconds(): Indicator;
|
|
1046
1046
|
/**
|
|
@@ -1052,39 +1052,39 @@ export declare function CurrentTimestamp(): Indicator;
|
|
|
1052
1052
|
*/
|
|
1053
1053
|
export declare function CurrentValue(operand: Indicator): Indicator;
|
|
1054
1054
|
/**
|
|
1055
|
-
*
|
|
1055
|
+
* Account-owned timestamp/value data uploaded through CSV or JSON ingestion. Range: User-defined numeric value.
|
|
1056
1056
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind per candidate.
|
|
1057
1057
|
* @param customIndicatorId 24-char hex ObjectId of the owned series (list_custom_indicators).
|
|
1058
1058
|
*/
|
|
1059
1059
|
export declare function CustomIndicator(asset: AssetArg, customIndicatorId: string): Indicator;
|
|
1060
1060
|
/**
|
|
1061
|
-
*
|
|
1061
|
+
* The day of the month in America/New_York, from 1 through 31. Combine with Month and Year for a specific calendar date.
|
|
1062
1062
|
*/
|
|
1063
1063
|
export declare function Date(): Indicator;
|
|
1064
1064
|
/**
|
|
1065
|
-
*
|
|
1065
|
+
* The weekday in America/New_York: Monday = 1 through Sunday = 7. Use Date for the day of the month.
|
|
1066
1066
|
*/
|
|
1067
1067
|
export declare function Day(): Indicator;
|
|
1068
1068
|
/**
|
|
1069
|
-
*
|
|
1069
|
+
* The number of days since an AI agent was launched by this strategy. Useful for rate-limiting agent launches. Range: >= 0.
|
|
1070
1070
|
*/
|
|
1071
1071
|
export declare function DaysSinceAgent(): Indicator;
|
|
1072
1072
|
/**
|
|
1073
|
-
*
|
|
1073
|
+
* The number of days since an alert was triggered. Useful for rate-limiting alerts. Range: >= 0.
|
|
1074
1074
|
* @param message (Optional) Message to display when the indicator is triggered
|
|
1075
1075
|
*/
|
|
1076
1076
|
export declare function DaysSinceAlert(message: string): Indicator;
|
|
1077
1077
|
/**
|
|
1078
|
-
*
|
|
1078
|
+
* Calendar days since the asset's most recent earnings report. In backtests and live, this is the last actually-reported quarter at-or-before the decision time (no look-ahead). Use to time post-earnings entries (e.g. fade the gap after N days, or wait for the IV crush to settle). Range: >= 0 (0 on the report day; grows as time passes).
|
|
1079
1079
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1080
1080
|
*/
|
|
1081
1081
|
export declare function DaysSinceEarnings(asset: AssetArg): Indicator;
|
|
1082
1082
|
/**
|
|
1083
|
-
*
|
|
1083
|
+
* Elapsed days since the latest Filled-matching portfolio order stamped RebalanceOption, RebalanceOptionRenewal or RebalanceOptionFunding. It uses fill time and ignores strategy ID, so these strategies share a cooldown. Unfilled or canceled orders do not reset it. Range: >= 0 (days), or a large number if no RebalanceOption-generated order exists.
|
|
1084
1084
|
*/
|
|
1085
1085
|
export declare function DaysSinceLastRebalanceOptionOrder(): Indicator;
|
|
1086
1086
|
/**
|
|
1087
|
-
*
|
|
1087
|
+
* The number of days since the most recent option order matching the specified filters. Supports filtering by underlying, option type (call/put), spread type, direction (long/short), position effect (open/close), and days to expiration at order time. Range: >= 0 (days), or a large number if no matching order exists.
|
|
1088
1088
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1089
1089
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1090
1090
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1096,26 +1096,26 @@ export declare function DaysSinceLastRebalanceOptionOrder(): Indicator;
|
|
|
1096
1096
|
*/
|
|
1097
1097
|
export declare function DaysSinceOptionOrder(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType, positionEffect: PositionEffect, minDte: number, maxDte: number, orderStatus?: OrderStatus): Indicator;
|
|
1098
1098
|
/**
|
|
1099
|
-
*
|
|
1099
|
+
* The number of days since the most recent order matching the specified filters. Range: >= 0 (days), or a large number if no matching order exists.
|
|
1100
1100
|
* @param assets Ticker(s) whose orders are counted. One string or an array.
|
|
1101
1101
|
* @param side Buy or Sell
|
|
1102
1102
|
*/
|
|
1103
1103
|
export declare function DaysSinceOrder(assets: AssetArg | AssetArg[], side: Side, orderStatus?: OrderStatus): Indicator;
|
|
1104
1104
|
/**
|
|
1105
|
-
*
|
|
1105
|
+
* The number of days since the current strategy last produced an execution artifact. Counts same-strategy order rows, rebalance orders, and launched agents. Range: >= 0 (days), or a large number if the strategy has never fired.
|
|
1106
1106
|
*/
|
|
1107
1107
|
export declare function DaysSinceStrategyFired(): Indicator;
|
|
1108
1108
|
/**
|
|
1109
|
-
*
|
|
1109
|
+
* Calendar days until the asset's next expected earnings report. In backtests the next date is a point-in-time cadence estimate from the last report (no look-ahead); live trading uses the real next scheduled date. Use to time entries and exits around earnings. Range: >= 0 (0 on/after the expected report day; counts down as it nears).
|
|
1110
1110
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1111
1111
|
*/
|
|
1112
1112
|
export declare function DaysUntilEarnings(asset: AssetArg): Indicator;
|
|
1113
1113
|
/**
|
|
1114
|
-
*
|
|
1114
|
+
* Quotient of indicators.
|
|
1115
1115
|
*/
|
|
1116
1116
|
export declare function Divide(left: Indicator, right: Indicator): Indicator;
|
|
1117
1117
|
/**
|
|
1118
|
-
*
|
|
1118
|
+
* Highest high and lowest low over N bars with a midline. Breaks of either edge are breakout entries; the midline is the first pullback level. Range: Price scale.
|
|
1119
1119
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1120
1120
|
* @param length Length of time
|
|
1121
1121
|
* @param interval Unit of time
|
|
@@ -1123,7 +1123,7 @@ export declare function Divide(left: Indicator, right: Indicator): Indicator;
|
|
|
1123
1123
|
*/
|
|
1124
1124
|
export declare function DonchianChannel(asset: AssetArg, length?: number, interval?: Interval, line?: "upper" | "lower" | "middle"): Indicator;
|
|
1125
1125
|
/**
|
|
1126
|
-
*
|
|
1126
|
+
* Macroeconomic data not tied to a specific asset.
|
|
1127
1127
|
* @param metric The economic indicator to use
|
|
1128
1128
|
*/
|
|
1129
1129
|
export declare function Economic(metric: "NonfarmPayrolls" | "UnemploymentRate" | "MoneySupply" | "TreasuryYield3Month" | "CPI"): Indicator;
|
|
@@ -1136,39 +1136,39 @@ export declare function Economic(metric: "NonfarmPayrolls" | "UnemploymentRate"
|
|
|
1136
1136
|
export declare function ExponentialMovingAverage(asset: AssetArg, length: number, interval?: Interval): Indicator;
|
|
1137
1137
|
export declare const EMA: typeof ExponentialMovingAverage;
|
|
1138
1138
|
/**
|
|
1139
|
-
*
|
|
1139
|
+
* Raises an indicator to a specified power.
|
|
1140
1140
|
* @param exponent The exponent to raise the value to
|
|
1141
1141
|
*/
|
|
1142
1142
|
export declare function Exponentiation(operand: Indicator, exponent?: number): Indicator;
|
|
1143
1143
|
/**
|
|
1144
|
-
*
|
|
1144
|
+
* A financial metric from a company's statements or derived valuation ratios.
|
|
1145
1145
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1146
1146
|
* @param metric The fundamental metric to use
|
|
1147
1147
|
*/
|
|
1148
1148
|
export declare function Fundamental(asset: AssetArg, metric: FundamentalMetric): Indicator;
|
|
1149
1149
|
/**
|
|
1150
|
-
*
|
|
1150
|
+
* The gap size expressed as a percentage of the previous close. Range: Unbounded (percentage).
|
|
1151
1151
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1152
1152
|
*/
|
|
1153
1153
|
export declare function GapPercentage(asset: AssetArg): Indicator;
|
|
1154
1154
|
/**
|
|
1155
|
-
*
|
|
1155
|
+
* The dollar difference between today's opening price and yesterday's closing price. Range: Unbounded.
|
|
1156
1156
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1157
1157
|
*/
|
|
1158
1158
|
export declare function GapSize(asset: AssetArg): Indicator;
|
|
1159
1159
|
/**
|
|
1160
|
-
*
|
|
1160
|
+
* Heikin-Ashi candles built from COMPLETED one-minute bars in the regular session (9:30-15:59 bar opens; pre-market and after-hours bars are skipped), identically in backtests and live trading. The first bar seeds HA open = (O+C)/2 with its own high, low and close; after that HA close = (O+H+L+C)/4, HA open = (prior HA open + prior HA close)/2, HA high = max(H, HA open, HA close), HA low = min(L, HA open, HA close). The recursion carries across sessions and advances once per new bar. The streak line is the signed length of the current same-color run, counted from the color change (+3 on the third green candle, -3 on the third red); it reads 0 on a doji and for the rest of any run in which a candle shows an opposite-direction wick (a lower wick on green, an upper wick on red). Range: Price scale; streak is a signed integer.
|
|
1161
1161
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1162
1162
|
* @param line Which one-minute Heikin-Ashi value to evaluate. streak is the signed length of the current same-color run (0 once it shows an opposite-direction wick, and on a doji)
|
|
1163
1163
|
*/
|
|
1164
1164
|
export declare function HeikinAshi(asset: AssetArg, line?: "open" | "high" | "low" | "close" | "streak"): Indicator;
|
|
1165
1165
|
/**
|
|
1166
|
-
*
|
|
1166
|
+
* The highest price reached during the current trading session. Range: > 0.
|
|
1167
1167
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1168
1168
|
*/
|
|
1169
1169
|
export declare function HighOfDay(asset: AssetArg): Indicator;
|
|
1170
1170
|
/**
|
|
1171
|
-
*
|
|
1171
|
+
* Five-line trend system: Tenkan and Kijun midpoints, Senkou A/B cloud bands, and the Chikou lagging line. Lines are evaluated unshifted. Price above the cloud with Tenkan above Kijun is the full bullish alignment. Range: Price scale.
|
|
1172
1172
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1173
1173
|
* @param length Length of time
|
|
1174
1174
|
* @param interval Unit of time
|
|
@@ -1177,13 +1177,13 @@ export declare function HighOfDay(asset: AssetArg): Indicator;
|
|
|
1177
1177
|
*/
|
|
1178
1178
|
export declare function IchimokuCloud(asset: AssetArg, length?: number, interval?: Interval, spanLength?: number, line?: "tenkan" | "kijun" | "senkouA" | "senkouB" | "chikou"): Indicator;
|
|
1179
1179
|
/**
|
|
1180
|
-
*
|
|
1180
|
+
* Constant-maturity at-the-money implied volatility for the underlying, built from the options chain (near-target-DTE expirations, |delta|≈0.50 call/put average, linearly interpolated). Units are annualized decimals (0.25 = 25%). Used on each candidate of a dynamic rebalance over a broad universe (all US stocks, an index or a watchlist), it reads options chains with Greeks for every stock in that universe instead of one underlying, so the run is heavier than with a named ticker or a specific asset list. Range: > 0 (annualized decimal).
|
|
1181
1181
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1182
1182
|
* @param dte Target constant-maturity tenor in calendar days (e.g. 30)
|
|
1183
1183
|
*/
|
|
1184
1184
|
export declare function ImpliedVolatility(asset: AssetArg, dte?: number): Indicator;
|
|
1185
1185
|
/**
|
|
1186
|
-
*
|
|
1186
|
+
* Daily level for a market index or benchmark (e.g. VIX, SPX) from hydrated index price data — not a tradable equity price. Range: Unbounded (index points).
|
|
1187
1187
|
* @param metric Ticker key matching hydrated index price data (add more in BigQuery + rehydrate as needed)
|
|
1188
1188
|
*/
|
|
1189
1189
|
export declare function Index(metric?: "VIX" | "SPX" | "NDX" | "DJI" | "RUT" | "SKEW" | "VVIX" | "USDBROAD" | "TNX"): Indicator;
|
|
@@ -1193,19 +1193,19 @@ export declare function Index(metric?: "VIX" | "SPX" | "NDX" | "DJI" | "RUT" | "
|
|
|
1193
1193
|
*/
|
|
1194
1194
|
export declare function IndicatorAtCondition(operand: Indicator, condition: Condition, selection?: "First" | "Latest" | "Maximum" | "Minimum", clock?: Clock, initialValue?: number, length?: number, interval?: Interval): Indicator;
|
|
1195
1195
|
/**
|
|
1196
|
-
*
|
|
1196
|
+
* The value an indicator held at a matching fill of the asset. The entry anchor chooses the fill: LatestFill (the default) follows the most recent matching fill; HoldingEntry preserves the original holding entry when shares are added. The captured level stays fixed instead of rolling forward. In the form, a candidate-bound condition may leave the asset empty and the surrounding action supplies it; SDK code always passes the asset, using CANDIDATE inside a rebalance pipeline.
|
|
1197
1197
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1198
1198
|
* @param side The side of the fill the value is anchored to
|
|
1199
1199
|
* @param orderStatus Matches order events with this status
|
|
1200
1200
|
*/
|
|
1201
1201
|
export declare function IndicatorAtEntry(operand: Indicator, asset: AssetArg, side: Side, orderStatus?: OrderStatus, anchor?: "LatestFill" | "HoldingEntry"): Indicator;
|
|
1202
1202
|
/**
|
|
1203
|
-
*
|
|
1203
|
+
* Captures the first non-null evaluated indicator value at or after the configured number of minutes after market open. The captured value is then frozen until its next daily reset. A delayed evaluation can capture after the target minute.
|
|
1204
1204
|
* @param minutesAfterOpen The number of minutes after market open to capture the indicator value
|
|
1205
1205
|
*/
|
|
1206
1206
|
export declare function IndicatorAtMinutesAfterOpen(operand: Indicator, minutesAfterOpen?: number): Indicator;
|
|
1207
1207
|
/**
|
|
1208
|
-
*
|
|
1208
|
+
* Computes the Exponential Moving Average of any other indicator. TradingDay follows the input markets: crypto-only inputs use elapsed 24-hour days, including weekends, just like Day. Stock, option, mixed-market and asset-free expressions use confirmed exchange sessions. The window does not change intraday prices into daily closing prices. TradingMinute counts regular-session minutes the same way, so a 70 TradingMinute window at 9:45 reaches back to 3:06 PM on the prior session (the overnight gap is one step); crypto-only inputs use elapsed minutes. It allows at most 1439 minutes; use TradingDay for longer lookbacks. Indicators read every tick have no TradingMinute value outside regular hours, and windows over a ChartBar keep the value of its latest completed candle.
|
|
1209
1209
|
* @param length Length of time
|
|
1210
1210
|
* @param interval Unit of time
|
|
1211
1211
|
*/
|
|
@@ -1217,7 +1217,7 @@ export declare function IndicatorExponentialMovingAverage(operand: Indicator, le
|
|
|
1217
1217
|
*/
|
|
1218
1218
|
export declare function IndicatorMaximum(operand: Indicator, length?: number, interval?: Interval): Indicator;
|
|
1219
1219
|
/**
|
|
1220
|
-
*
|
|
1220
|
+
* Computes the MAD of any indicator over a window. Less sensitive to outliers than standard deviation.
|
|
1221
1221
|
* @param length Length of time
|
|
1222
1222
|
* @param interval Unit of time
|
|
1223
1223
|
*/
|
|
@@ -1229,19 +1229,19 @@ export declare function IndicatorMeanAbsoluteDeviation(operand: Indicator, lengt
|
|
|
1229
1229
|
*/
|
|
1230
1230
|
export declare function IndicatorMinimum(operand: Indicator, length?: number, interval?: Interval): Indicator;
|
|
1231
1231
|
/**
|
|
1232
|
-
*
|
|
1232
|
+
* The percentage change of any indicator over a window.
|
|
1233
1233
|
* @param length Length of time
|
|
1234
1234
|
* @param interval Unit of time
|
|
1235
1235
|
*/
|
|
1236
1236
|
export declare function IndicatorRateOfChange(operand: Indicator, length?: number, interval?: Interval): Indicator;
|
|
1237
1237
|
/**
|
|
1238
|
-
*
|
|
1238
|
+
* Computes the Simple Moving Average of any other indicator over a window. TradingDay follows the input markets: crypto-only inputs use elapsed 24-hour days, including weekends, just like Day. Stock, option, mixed-market and asset-free expressions use confirmed exchange sessions. The window does not change intraday prices into daily closing prices. TradingMinute counts regular-session minutes the same way, so a 70 TradingMinute window at 9:45 reaches back to 3:06 PM on the prior session (the overnight gap is one step); crypto-only inputs use elapsed minutes. It allows at most 1439 minutes; use TradingDay for longer lookbacks. Indicators read every tick have no TradingMinute value outside regular hours, and windows over a ChartBar keep the value of its latest completed candle.
|
|
1239
1239
|
* @param length Length of time
|
|
1240
1240
|
* @param interval Unit of time
|
|
1241
1241
|
*/
|
|
1242
1242
|
export declare function IndicatorSimpleMovingAverage(operand: Indicator, length?: number, interval?: Interval): Indicator;
|
|
1243
1243
|
/**
|
|
1244
|
-
*
|
|
1244
|
+
* Computes the standard deviation of any indicator over a window.
|
|
1245
1245
|
* @param length Length of time
|
|
1246
1246
|
* @param interval Unit of time
|
|
1247
1247
|
*/
|
|
@@ -1261,11 +1261,11 @@ export declare function IndicatorWindowAgo(operand: Indicator, length: number, i
|
|
|
1261
1261
|
*/
|
|
1262
1262
|
export declare function IndustryNewsSentiment(industry: "technology" | "financialServices" | "healthcare" | "energy" | "consumerGoods" | "entertainmentAndMedia" | "manufacturing" | "transportation" | "realEstate" | "utilities" | "agriculture" | "education" | "retail" | "artificialIntelligence" | "aiInfrastructure" | "analytics" | "cloudComputing" | "dataCenter" | "database" | "cybersecurity" | "developerTools" | "software" | "saas" | "enterpriseSoftware" | "customerExperienceSoftware" | "productivityTools" | "collaborationSoftware" | "digitalSignatureAndAuthentication" | "hardware" | "consumerElectronics" | "networking" | "semiconductor" | "chipDesign" | "chipManufacturing" | "semiconductorEquipment" | "gpuAndAccelerators" | "memoryAndStorage" | "quantumComputing" | "robotics" | "industrialAutomation" | "iot" | "smartDevices" | "wearable" | "3dPrinting" | "augmentedReality" | "virtualReality" | "space" | "satellites" | "aerospace" | "defense" | "drones" | "financialInfrastructure" | "capitalMarketsTechnology" | "banking" | "assetManagement" | "brokerage" | "payments" | "fintech" | "insurance" | "autoInsurance" | "homeInsurance" | "lifeInsurance" | "healthInsurance" | "blockchain" | "cryptocurrency" | "biotechnology" | "pharmaceuticals" | "medicalDevices" | "digitalHealth" | "lifeSciencesSoftware" | "bioinformatics" | "computationalBiology" | "computationalDrugDiscovery" | "oncology" | "immunotherapy" | "vaccines" | "veterinary" | "oil" | "gas" | "oilfieldServices" | "cleanEnergy" | "renewableEnergy" | "solarEnergy" | "windEnergy" | "nuclearEnergy" | "hydrogen" | "batteryTechnology" | "miningAndNaturalResources" | "gold" | "silver" | "chemicals" | "advancedMaterials" | "waterInfrastructure" | "wasteManagementAndRecycling" | "forestry" | "construction" | "buildingMaterials" | "electricalAndGridInfrastructure" | "logisticsAndSupplyChain" | "airline" | "maritime" | "railroads" | "automotive" | "electricVehicle" | "autonomousTransportation" | "recreationalVehicle" | "cruise" | "rideShare" | "printing" | "packaging" | "householdProducts" | "ecommerce" | "digitalMarketplace" | "fashionAndApparel" | "luxuryGoods" | "jewelry" | "foodAndBeverage" | "foodDelivery" | "nutrition" | "petCare" | "outdoorAndRecreationalEquipment" | "sportsAndFitness" | "cannabis" | "hospitalityAndTravel" | "homeSecurity" | "advertising" | "gaming" | "gambling" | "sportsBetting" | "socialMedia" | "streaming" | "movies" | "musicAndAudio" | "publishing" | "telecommunications" | "edtech" | "proptech", measure?: Measure, lookbackDays?: number, includeMemberCompanies?: boolean): Indicator;
|
|
1263
1263
|
/**
|
|
1264
|
-
*
|
|
1264
|
+
* The starting value of the portfolio when it was created or when the backtest began. Range: > 0.
|
|
1265
1265
|
*/
|
|
1266
1266
|
export declare function InitialValue(): Indicator;
|
|
1267
1267
|
/**
|
|
1268
|
-
*
|
|
1268
|
+
* Disclosed purchases (code P, including open-market or private transactions), sales (code S), and a separate exact-owner AwardCount for code A issuer grants or other acquisitions over a trailing publication window. AcquisitionCount combines code P and code A as distinct acquisition signals for modeled follower strategies; awards are not reclassified as purchases or sales and do not prove vested common-share ownership. Exact-owner strategies use versioned common-share, call/put, and issuer-award evidence; exercises and warrants are excluded from tradable purchase signals. A signal becomes eligible when its filing is public, never on an earlier transaction date. Range: Dollars, shares, counts or budget percent; unknown owner/amendment coverage has no value.
|
|
1269
1269
|
* @param asset Pass CANDIDATE in a dynamic rebalance pipeline.
|
|
1270
1270
|
* @param ownerCik Exact nonzero SEC reporting owner CIK, up to 10 digits. Omit for a whole company (with issuerCik) or aggregate activity.
|
|
1271
1271
|
* @param issuerCik Company CIK. With ownerCik, restricts that owner to this company. Alone, every reporting owner's events at this company, a joint filing counted once.
|
|
@@ -1273,7 +1273,7 @@ export declare function InitialValue(): Indicator;
|
|
|
1273
1273
|
*/
|
|
1274
1274
|
export declare function InsiderTrades(asset: AssetArg, metric: "NetValue" | "BuyValue" | "SellValue" | "NetShares" | "BuyCount" | "SellCount" | "AwardCount" | "AcquisitionCount" | "DistinctBuyers" | "PurchaseSharePercent" | "AcquisitionSharePercent", role: Role, windowDays: number, ownerCik?: string, issuerCik?: string, instrument?: Instrument): Indicator;
|
|
1275
1275
|
/**
|
|
1276
|
-
*
|
|
1276
|
+
* Institutional positions in the asset disclosed on SEC Form 13F. Naming a manager follows one institution; an empty manager reads every manager holding the asset (SDK code passes an empty string). Level metrics read the latest quarter whose filing became public on or before the evaluation date; change metrics compare it with the quarter before. Positions are never summed across quarters, and an amended filing replaces the original only from the moment the amendment became public. Range: Counts, shares, dollars or a top-5 share of holdings; 0 when no 13F naming the asset was public within the window.
|
|
1277
1277
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1278
1278
|
* @param manager Optional: a CIK such as 1067983, or part of a manager's name such as Renaissance Technologies. Leave empty for every manager. A CIK is exact; a name can match several firms
|
|
1279
1279
|
* @param metric Managers holding, shares or value held, concentration, or the change since the previous quarter
|
|
@@ -1282,57 +1282,57 @@ export declare function InsiderTrades(asset: AssetArg, metric: "NetValue" | "Buy
|
|
|
1282
1282
|
*/
|
|
1283
1283
|
export declare function InstitutionalHoldings(asset: AssetArg, manager: string, metric?: "HolderCount" | "TotalShares" | "TotalValue" | "BookSharePercent" | "ConcentrationTop5" | "NetShareChange" | "NetHolderChange" | "NewHolders" | "ClosedHolders", windowDays?: number, instrument?: Instrument): Indicator;
|
|
1284
1284
|
/**
|
|
1285
|
-
*
|
|
1285
|
+
* Returns 1 if the asset matches a specific symbol. Useful for including specific assets in multi-asset strategies.
|
|
1286
1286
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
1287
1287
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1288
1288
|
*/
|
|
1289
1289
|
export declare function IsAsset(matchAsset: AssetArg, asset: AssetArg): Indicator;
|
|
1290
1290
|
/**
|
|
1291
|
-
*
|
|
1291
|
+
* Returns 1 if the asset matches Stock, Cryptocurrency, Option or Other, and 0 otherwise. ETFs are Stock assets; use separate stock metadata or a universe filter to select ETFs.
|
|
1292
1292
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1293
1293
|
* @param assetType The asset type to check against
|
|
1294
1294
|
*/
|
|
1295
1295
|
export declare function IsAssetType(asset: AssetArg, assetType?: AssetType): Indicator;
|
|
1296
1296
|
/**
|
|
1297
|
-
*
|
|
1297
|
+
* Returns 1 if the asset is a member of a specified index, 0 otherwise.
|
|
1298
1298
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1299
1299
|
* @param index The index to check membership against
|
|
1300
1300
|
*/
|
|
1301
1301
|
export declare function IsIndexMember(asset: AssetArg, index?: "SP500" | "NASDAQ100" | "DJIA"): Indicator;
|
|
1302
1302
|
/**
|
|
1303
|
-
*
|
|
1303
|
+
* Returns 1 if the asset belongs to a specified industry, 0 otherwise. Over 100 categories supported including Artificial Intelligence, Semiconductor, Electric Vehicles, Space Exploration, Healthcare, Biotechnology, Cloud Computing, Cybersecurity, Renewable Energy, and many more.
|
|
1304
1304
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1305
1305
|
* @param industry The industry to check membership against
|
|
1306
1306
|
*/
|
|
1307
1307
|
export declare function IsIndustry(asset: AssetArg, industry: "technology" | "financialServices" | "healthcare" | "energy" | "consumerGoods" | "entertainmentAndMedia" | "manufacturing" | "transportation" | "realEstate" | "utilities" | "agriculture" | "education" | "retail" | "artificialIntelligence" | "aiInfrastructure" | "analytics" | "cloudComputing" | "dataCenter" | "database" | "cybersecurity" | "developerTools" | "software" | "saas" | "enterpriseSoftware" | "customerExperienceSoftware" | "productivityTools" | "collaborationSoftware" | "digitalSignatureAndAuthentication" | "hardware" | "consumerElectronics" | "networking" | "semiconductor" | "chipDesign" | "chipManufacturing" | "semiconductorEquipment" | "gpuAndAccelerators" | "memoryAndStorage" | "quantumComputing" | "robotics" | "industrialAutomation" | "iot" | "smartDevices" | "wearable" | "3dPrinting" | "augmentedReality" | "virtualReality" | "space" | "satellites" | "aerospace" | "defense" | "drones" | "financialInfrastructure" | "capitalMarketsTechnology" | "banking" | "assetManagement" | "brokerage" | "payments" | "fintech" | "insurance" | "autoInsurance" | "homeInsurance" | "lifeInsurance" | "healthInsurance" | "blockchain" | "cryptocurrency" | "biotechnology" | "pharmaceuticals" | "medicalDevices" | "digitalHealth" | "lifeSciencesSoftware" | "bioinformatics" | "computationalBiology" | "computationalDrugDiscovery" | "oncology" | "immunotherapy" | "vaccines" | "veterinary" | "oil" | "gas" | "oilfieldServices" | "cleanEnergy" | "renewableEnergy" | "solarEnergy" | "windEnergy" | "nuclearEnergy" | "hydrogen" | "batteryTechnology" | "miningAndNaturalResources" | "gold" | "silver" | "chemicals" | "advancedMaterials" | "waterInfrastructure" | "wasteManagementAndRecycling" | "forestry" | "construction" | "buildingMaterials" | "electricalAndGridInfrastructure" | "logisticsAndSupplyChain" | "airline" | "maritime" | "railroads" | "automotive" | "electricVehicle" | "autonomousTransportation" | "recreationalVehicle" | "cruise" | "rideShare" | "printing" | "packaging" | "householdProducts" | "ecommerce" | "digitalMarketplace" | "fashionAndApparel" | "luxuryGoods" | "jewelry" | "foodAndBeverage" | "foodDelivery" | "nutrition" | "petCare" | "outdoorAndRecreationalEquipment" | "sportsAndFitness" | "cannabis" | "hospitalityAndTravel" | "homeSecurity" | "advertising" | "gaming" | "gambling" | "sportsBetting" | "socialMedia" | "streaming" | "movies" | "musicAndAudio" | "publishing" | "telecommunications" | "edtech" | "proptech" | "informationTechnology" | "personalAndHouseholdGoods" | "investing" | "spaceExploration" | "alternativeEnergy" | "clothesAndApparal" | "computationalChemistry" | "customerEngagement" | "dataVisualization" | "graphicsCard" | "materialScience" | "medicine" | "messaging" | "phones" | "security" | "socialNetwork" | "television" | "videoConferencing" | "videos" | "waterPurifaction" | "waterTreatment"): Indicator;
|
|
1308
1308
|
/**
|
|
1309
|
-
*
|
|
1309
|
+
* Returns 1 if the asset does NOT match a specific symbol. Useful for excluding specific assets.
|
|
1310
1310
|
* @param matchAsset The specific asset to compare against (ex. UPRO, GLD)
|
|
1311
1311
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1312
1312
|
*/
|
|
1313
1313
|
export declare function IsNotAsset(matchAsset: AssetArg, asset: AssetArg): Indicator;
|
|
1314
1314
|
/**
|
|
1315
|
-
*
|
|
1315
|
+
* Constant-maturity ATM implied volatility divided by annualized close-to-close realized volatility (HV) over hvWindow trading days. Values > 1 mean options are pricing more vol than recently realized. Used on each candidate of a dynamic rebalance over a broad universe (all US stocks, an index or a watchlist), it reads options chains with Greeks for every stock in that universe instead of one underlying, so the run is heavier than with a named ticker or a specific asset list. Range: > 0.
|
|
1316
1316
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1317
1317
|
* @param hvWindow Trading days of log-return history for realized volatility
|
|
1318
1318
|
*/
|
|
1319
1319
|
export declare function IVHVRatio(asset: AssetArg, hvWindow?: number): Indicator;
|
|
1320
1320
|
/**
|
|
1321
|
-
*
|
|
1321
|
+
* Percent of sessions in the lookback window whose constant-maturity ATM IV was strictly below today's (0–100). Distinct from IV Rank. Used on each candidate of a dynamic rebalance over a broad universe (all US stocks, an index or a watchlist), it reads options chains with Greeks for every stock in that universe instead of one underlying, so the run is heavier than with a named ticker or a specific asset list. Range: 0–100.
|
|
1322
1322
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1323
1323
|
* @param length Length of time
|
|
1324
1324
|
* @param interval Unit of time
|
|
1325
1325
|
*/
|
|
1326
1326
|
export declare function IVPercentile(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1327
1327
|
/**
|
|
1328
|
-
*
|
|
1328
|
+
* Where today's constant-maturity ATM IV sits between the lookback window's high and low: (IV − IV_low) / (IV_high − IV_low) × 100. Distinct from IV Percentile. Used on each candidate of a dynamic rebalance over a broad universe (all US stocks, an index or a watchlist), it reads options chains with Greeks for every stock in that universe instead of one underlying, so the run is heavier than with a named ticker or a specific asset list. Range: 0–100.
|
|
1329
1329
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1330
1330
|
* @param length Length of time
|
|
1331
1331
|
* @param interval Unit of time
|
|
1332
1332
|
*/
|
|
1333
1333
|
export declare function IVRank(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1334
1334
|
/**
|
|
1335
|
-
*
|
|
1335
|
+
* EMA midline with ATR bands above and below. Tighter than Bollinger in calm tape, so closes outside the bands mean stronger conviction moves. Range: Price scale.
|
|
1336
1336
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1337
1337
|
* @param length Length of time
|
|
1338
1338
|
* @param interval Unit of time
|
|
@@ -1346,87 +1346,87 @@ export declare function KeltnerChannel(asset: AssetArg, length?: number, interva
|
|
|
1346
1346
|
*/
|
|
1347
1347
|
export declare function LastDividend(asset: AssetArg): Indicator;
|
|
1348
1348
|
/**
|
|
1349
|
-
*
|
|
1349
|
+
* The execution price of the most recent order matching the specified filters. Range: > 0.
|
|
1350
1350
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1351
1351
|
* @param side Matches order events with this side (buy or sell)
|
|
1352
1352
|
* @param orderStatus Matches order events with this status
|
|
1353
1353
|
*/
|
|
1354
1354
|
export declare function LastOrderPrice(asset: AssetArg, side: Side, orderStatus?: OrderStatus): Indicator;
|
|
1355
1355
|
/**
|
|
1356
|
-
*
|
|
1356
|
+
* Logarithm of an indicator with a specified base.
|
|
1357
1357
|
* @param base The base for the logarithm
|
|
1358
1358
|
*/
|
|
1359
1359
|
export declare function Log(operand: Indicator, base?: number): Indicator;
|
|
1360
1360
|
/**
|
|
1361
|
-
*
|
|
1361
|
+
* The lowest price reached during the current trading session. Range: > 0.
|
|
1362
1362
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1363
1363
|
*/
|
|
1364
1364
|
export declare function LowOfDay(asset: AssetArg): Indicator;
|
|
1365
1365
|
/**
|
|
1366
|
-
*
|
|
1366
|
+
* The maximum value of two or more indicators. The SDK builder takes exactly two operands; nest it to compare more.
|
|
1367
1367
|
*/
|
|
1368
1368
|
export declare function Max(left: Indicator, right: Indicator): Indicator;
|
|
1369
1369
|
/**
|
|
1370
|
-
*
|
|
1370
|
+
* The largest peak-to-trough percentage decline of the asset's price inside the window, reported as a positive number: 10 means a 10% fall from a high to a later low, and 0 means the price never fell below an earlier price in the window. Measures worst-case downside risk. Range: 0 to 100 (percent, never negative).
|
|
1371
1371
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1372
1372
|
* @param length Length of time
|
|
1373
1373
|
* @param interval Unit of time
|
|
1374
1374
|
*/
|
|
1375
1375
|
export declare function MaxDrawdown(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1376
1376
|
/**
|
|
1377
|
-
*
|
|
1377
|
+
* The maximum trough-to-peak percentage increase over a window. Range: >= 0 (percentage).
|
|
1378
1378
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1379
1379
|
* @param length Length of time
|
|
1380
1380
|
* @param interval Unit of time
|
|
1381
1381
|
*/
|
|
1382
1382
|
export declare function MaxDrawup(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1383
1383
|
/**
|
|
1384
|
-
*
|
|
1384
|
+
* The highest of the asset's observed prices over a window, including the current one. Each observation is the price at that time (a completed day contributes its close, a completed minute its closing price), not an intrabar high. Range: > 0.
|
|
1385
1385
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1386
1386
|
* @param length Length of time
|
|
1387
1387
|
* @param interval Unit of time
|
|
1388
1388
|
*/
|
|
1389
1389
|
export declare function MaximumPrice(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1390
1390
|
/**
|
|
1391
|
-
*
|
|
1391
|
+
* The minimum value of two or more indicators. The SDK builder takes exactly two operands; nest it to compare more.
|
|
1392
1392
|
*/
|
|
1393
1393
|
export declare function Min(left: Indicator, right: Indicator): Indicator;
|
|
1394
1394
|
/**
|
|
1395
|
-
*
|
|
1395
|
+
* The lowest of the asset's observed prices over a window, including the current one. Each observation is the price at that time (a completed day contributes its close, a completed minute its closing price), not an intrabar low. Range: > 0.
|
|
1396
1396
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1397
1397
|
* @param length Length of time
|
|
1398
1398
|
* @param interval Unit of time
|
|
1399
1399
|
*/
|
|
1400
1400
|
export declare function MinimumPrice(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1401
1401
|
/**
|
|
1402
|
-
*
|
|
1402
|
+
* Difference between indicators.
|
|
1403
1403
|
*/
|
|
1404
1404
|
export declare function Minus(left: Indicator, right: Indicator): Indicator;
|
|
1405
1405
|
/**
|
|
1406
|
-
*
|
|
1406
|
+
* The high of the most recently COMPLETED one-minute bar. The bar that opens at 9:30 is readable from 9:31, identically in backtests and live trading; the forming bar is never used. Not the day's high (use High of Day). Pre-market and after-hours bars count. Strategies using it run on one-minute data. Range: > 0.
|
|
1407
1407
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1408
1408
|
*/
|
|
1409
1409
|
export declare function MinuteBarHigh(asset: AssetArg): Indicator;
|
|
1410
1410
|
/**
|
|
1411
|
-
*
|
|
1411
|
+
* The low of the most recently COMPLETED one-minute bar. The bar that opens at 9:30 is readable from 9:31, identically in backtests and live trading; the forming bar is never used. Not the day's low (use Low of Day). Pre-market and after-hours bars count. Strategies using it run on one-minute data. Range: > 0.
|
|
1412
1412
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1413
1413
|
*/
|
|
1414
1414
|
export declare function MinuteBarLow(asset: AssetArg): Indicator;
|
|
1415
1415
|
/**
|
|
1416
|
-
*
|
|
1416
|
+
* Whole minutes since the regular US market open (9:30 AM ET), read from the Eastern clock. The value is not clamped to the session: it is negative before the open and keeps rising above 390 after the 4:00 PM close. Range: 0 to 390 during a regular session; negative before 9:30 AM ET and above 390 after the close.
|
|
1417
1417
|
*/
|
|
1418
1418
|
export declare function MinutesAfterOpen(): Indicator;
|
|
1419
1419
|
/**
|
|
1420
|
-
*
|
|
1420
|
+
* The number of minutes since an AI agent was launched by this strategy. Useful for fine-grained rate-limiting of agent launches within a single day. Range: >= 0.
|
|
1421
1421
|
*/
|
|
1422
1422
|
export declare function MinutesSinceAgent(): Indicator;
|
|
1423
1423
|
/**
|
|
1424
|
-
*
|
|
1424
|
+
* The number of minutes since an alert was triggered. Useful for fine-grained rate-limiting of alerts within a single day. Range: >= 0.
|
|
1425
1425
|
* @param message (Optional) Message to display when the indicator is triggered
|
|
1426
1426
|
*/
|
|
1427
1427
|
export declare function MinutesSinceAlert(message: string): Indicator;
|
|
1428
1428
|
/**
|
|
1429
|
-
*
|
|
1429
|
+
* The number of minutes since the most recent option order matching the specified filters. Same filters as Days Since Option Order but measured in minutes for intraday strategies. Range: >= 0 (minutes), or a large number if no matching order exists.
|
|
1430
1430
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1431
1431
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1432
1432
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1438,29 +1438,29 @@ export declare function MinutesSinceAlert(message: string): Indicator;
|
|
|
1438
1438
|
*/
|
|
1439
1439
|
export declare function MinutesSinceOptionOrder(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType, positionEffect: PositionEffect, minDte: number, maxDte: number, orderStatus?: OrderStatus): Indicator;
|
|
1440
1440
|
/**
|
|
1441
|
-
*
|
|
1441
|
+
* Same as Days Since Order but measured in minutes. Useful for intraday strategies. Range: >= 0 (minutes).
|
|
1442
1442
|
* @param assets Ticker(s) whose orders are counted. One string or an array.
|
|
1443
1443
|
* @param side Buy or Sell
|
|
1444
1444
|
* @param clock Optional elapsed-time clock; omitted retains calendar minutes.
|
|
1445
1445
|
*/
|
|
1446
1446
|
export declare function MinutesSinceOrder(assets: AssetArg | AssetArg[], side: Side, orderStatus?: OrderStatus, clock?: Clock): Indicator;
|
|
1447
1447
|
/**
|
|
1448
|
-
*
|
|
1448
|
+
* Whole minutes until the US equity session close, read from the Eastern clock. The close is that day's real session close, so an early-close day counts down to 1:00 PM ET instead of 4:00 PM. The value is not clamped to the session: it is negative after the close and above 390 before the 9:30 AM open. Range: 0 to 390 during a regular session (0 to 210 on a 1:00 PM early close); negative after the close and above 390 before the open.
|
|
1449
1449
|
*/
|
|
1450
1450
|
export declare function MinutesUntilClose(): Indicator;
|
|
1451
1451
|
/**
|
|
1452
|
-
*
|
|
1452
|
+
* Volume-weighted RSI: money flow direction over N bars on a 0-100 scale. Above 80 is overbought, below 20 oversold. Requires volume data. Range: 0 to 100.
|
|
1453
1453
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1454
1454
|
* @param length Length of time
|
|
1455
1455
|
* @param interval Unit of time
|
|
1456
1456
|
*/
|
|
1457
1457
|
export declare function MoneyFlowIndex(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1458
1458
|
/**
|
|
1459
|
-
*
|
|
1459
|
+
* The current month (1–12).
|
|
1460
1460
|
*/
|
|
1461
1461
|
export declare function Month(): Indicator;
|
|
1462
1462
|
/**
|
|
1463
|
-
*
|
|
1463
|
+
* MACD line (fast EMA minus slow EMA), its signal EMA, or the histogram (MACD minus signal). Classic trend/momentum indicator. Range: Positive or negative for all three lines, in price units: each is a difference of moving averages, not a price level.
|
|
1464
1464
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1465
1465
|
* @param fastLength Period of the fast EMA
|
|
1466
1466
|
* @param slowLength Period of the slow EMA (must exceed the fast length)
|
|
@@ -1470,15 +1470,15 @@ export declare function Month(): Indicator;
|
|
|
1470
1470
|
*/
|
|
1471
1471
|
export declare function MovingAverageConvergenceDivergence(asset: AssetArg, fastLength?: number, slowLength?: number, signalLength?: number, interval?: Interval, line?: "macd" | "signal" | "histogram"): Indicator;
|
|
1472
1472
|
/**
|
|
1473
|
-
*
|
|
1473
|
+
* Product of indicators.
|
|
1474
1474
|
*/
|
|
1475
1475
|
export declare function Multiply(left: Indicator, right: Indicator): Indicator;
|
|
1476
1476
|
/**
|
|
1477
|
-
*
|
|
1477
|
+
* Negates an indicator's value.
|
|
1478
1478
|
*/
|
|
1479
1479
|
export declare function Negative(operand: Indicator): Indicator;
|
|
1480
1480
|
/**
|
|
1481
|
-
*
|
|
1481
|
+
* True when a newly public Form 4 version matches the selected owner, issuer, role, instrument and action and awaits a strategy decision. Exact-owner corrections count as new versions. A company CIK without an owner watches every reporting owner at that company, and a joint filing fires once. A handled event does not fire again on later price ticks; unverified owner coverage has no value, and a company is only as covered as its least-covered matching owner. Range: 1 while a public Form 4 version awaits a decision; otherwise 0.
|
|
1482
1482
|
* @param ownerCik Exact SEC reporting owner CIK. Omit for a whole company (with issuerCik) or aggregate Form 4 activity.
|
|
1483
1483
|
* @param issuerCik Company CIK. With ownerCik, restricts that owner; alone, every reporting owner at this company, a joint filing once.
|
|
1484
1484
|
* @param role The reporting owner's role.
|
|
@@ -1487,12 +1487,12 @@ export declare function Negative(operand: Indicator): Indicator;
|
|
|
1487
1487
|
*/
|
|
1488
1488
|
export declare function NewInsiderDisclosure(ownerCik?: string, issuerCik?: string, role?: Role, instrument?: Instrument, disclosureAction?: "Any" | "Purchase" | "Sale" | "Award"): Indicator;
|
|
1489
1489
|
/**
|
|
1490
|
-
*
|
|
1490
|
+
* True when an exact manager CIK has a newly public 13F filing or amendment this strategy has not handled. Each accession creates one decision; later price ticks do not repeat it. The current InstitutionalHoldings book still sets target positions. Range: 1 while a public filing awaits a decision; otherwise 0.
|
|
1491
1491
|
* @param manager Exact numeric SEC manager CIK. A new 13F accession, including an amendment, triggers one decision.
|
|
1492
1492
|
*/
|
|
1493
1493
|
export declare function NewInstitutionalFiling(manager: string): Indicator;
|
|
1494
1494
|
/**
|
|
1495
|
-
*
|
|
1495
|
+
* True when a selected member has a newly public equity or option trade disclosure that this strategy has not handled. Corrections count when they become public. A handled disclosure does not fire again on later price ticks. Range: 1 while a new disclosure awaits a decision; otherwise 0.
|
|
1496
1496
|
* @param memberId Exact Bioguide member ID, such as P000197.
|
|
1497
1497
|
* @param instrument Equity or option disclosures, never both for a public bot arm.
|
|
1498
1498
|
* @param disclosureAction Which newly public trade sides trigger a decision.
|
|
@@ -1506,22 +1506,22 @@ export declare function NewPoliticalDisclosure(memberId: string, instrument: Ins
|
|
|
1506
1506
|
*/
|
|
1507
1507
|
export declare function NewsSentiment(asset: AssetArg, measure?: Measure, lookbackDays?: number): Indicator;
|
|
1508
1508
|
/**
|
|
1509
|
-
*
|
|
1509
|
+
* True on the first evaluated trading tick of an ISO week until the strategy makes a decision. A no-order decision still consumes that week, and live portfolios persist the decision through a restart. Use with an option disclosure trigger for modeled maintenance. Range: 1 while this week's first decision is pending; otherwise 0.
|
|
1510
1510
|
*/
|
|
1511
1511
|
export declare function NewTradingWeek(): Indicator;
|
|
1512
1512
|
/**
|
|
1513
|
-
*
|
|
1513
|
+
* Running total of signed volume: adds the bar's volume on up closes, subtracts on down closes. Rising OBV with flat price is accumulation. Range: Unbounded (cumulative).
|
|
1514
1514
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1515
1515
|
* @param interval Bar interval the volume is accumulated on
|
|
1516
1516
|
*/
|
|
1517
1517
|
export declare function OnBalanceVolume(asset: AssetArg, interval?: Interval): Indicator;
|
|
1518
1518
|
/**
|
|
1519
|
-
*
|
|
1519
|
+
* The price of an asset at market open. Range: > 0.
|
|
1520
1520
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1521
1521
|
*/
|
|
1522
1522
|
export declare function OpeningPrice(asset: AssetArg): Indicator;
|
|
1523
1523
|
/**
|
|
1524
|
-
*
|
|
1524
|
+
* Returns the total collateral locked across option spreads matching the filter. Range: 0 to ∞ (dollars).
|
|
1525
1525
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1526
1526
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1527
1527
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1529,7 +1529,7 @@ export declare function OpeningPrice(asset: AssetArg): Indicator;
|
|
|
1529
1529
|
*/
|
|
1530
1530
|
export declare function OptionCollateral(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1531
1531
|
/**
|
|
1532
|
-
*
|
|
1532
|
+
* Returns the minimum or maximum days since entry across option spreads matching the filter. Range: 0 to ∞.
|
|
1533
1533
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1534
1534
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1535
1535
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1538,7 +1538,7 @@ export declare function OptionCollateral(underlying: string, optionType: OptionT
|
|
|
1538
1538
|
*/
|
|
1539
1539
|
export declare function OptionDaysHeld(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType, minOrMax?: MinOrMax): Indicator;
|
|
1540
1540
|
/**
|
|
1541
|
-
*
|
|
1541
|
+
* Returns the minimum or maximum days to expiration across option spreads matching the filter. Range: 0 to 365+.
|
|
1542
1542
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1543
1543
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1544
1544
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1547,11 +1547,11 @@ export declare function OptionDaysHeld(underlying: string, optionType: OptionTyp
|
|
|
1547
1547
|
*/
|
|
1548
1548
|
export declare function OptionDaysToExpiration(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType, minOrMax?: MinOrMax): Indicator;
|
|
1549
1549
|
/**
|
|
1550
|
-
*
|
|
1550
|
+
* Sum of absolute option leg marks divided by portfolio value (percent). Matches gross deployment audits. Unfiltered portfolio-wide only. Range: 0% to ∞.
|
|
1551
1551
|
*/
|
|
1552
1552
|
export declare function OptionGrossExposurePercent(): Indicator;
|
|
1553
1553
|
/**
|
|
1554
|
-
*
|
|
1554
|
+
* Returns the number of open option contract positions/legs matching the filter criteria. Portfolio-wide (no underlying, option type, direction, or spread filters): open legs plus legs reserved by earlier true OpenOption signals in the same tick's strategy loop. Filtered counts (e.g. per ticker) use open legs only. Use Option Spread Count for multi-leg spread groups. Range: 0 to ∞.
|
|
1555
1555
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1556
1556
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1557
1557
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1559,7 +1559,7 @@ export declare function OptionGrossExposurePercent(): Indicator;
|
|
|
1559
1559
|
*/
|
|
1560
1560
|
export declare function OptionPositionCount(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1561
1561
|
/**
|
|
1562
|
-
*
|
|
1562
|
+
* Peak-to-current drawdown of the aggregated P&L percentage across option spreads matching the filter. Stateful counterpart of the Option Position P&L% indicator (OptionPositionPercentChange): while that indicator returns the current P&L percentage, this one tracks the highest value observed and returns how far the position has fallen from that peak. Resets when no matching spreads remain so a fresh entry starts from a clean peak. Range: >= 0 (percentage points of P&L).
|
|
1563
1563
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1564
1564
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1565
1565
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1567,7 +1567,7 @@ export declare function OptionPositionCount(underlying: string, optionType: Opti
|
|
|
1567
1567
|
*/
|
|
1568
1568
|
export declare function OptionPositionMaxDrawdown(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1569
1569
|
/**
|
|
1570
|
-
*
|
|
1570
|
+
* Returns the weighted average P&L percentage across option spreads matching the filter. Range: -100% to ∞.
|
|
1571
1571
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1572
1572
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1573
1573
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1575,7 +1575,7 @@ export declare function OptionPositionMaxDrawdown(underlying: string, optionType
|
|
|
1575
1575
|
*/
|
|
1576
1576
|
export declare function OptionPositionPercentChange(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1577
1577
|
/**
|
|
1578
|
-
*
|
|
1578
|
+
* Returns the total market value of option spreads matching the filter criteria. Range: 0 to ∞ (dollars).
|
|
1579
1579
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1580
1580
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1581
1581
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1583,7 +1583,7 @@ export declare function OptionPositionPercentChange(underlying: string, optionTy
|
|
|
1583
1583
|
*/
|
|
1584
1584
|
export declare function OptionPositionValue(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1585
1585
|
/**
|
|
1586
|
-
*
|
|
1586
|
+
* Returns the net realized P&L in dollars from CLOSED option positions matching the filter, long and short alike. Losing closes count as negative. Measures closes only and subtracts nothing for premium already spent. Lookback Days limits it to closes within that many days of the evaluation date; omit it for the whole life of the book. Range: -∞ to ∞ (dollars).
|
|
1587
1587
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1588
1588
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1589
1589
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1592,13 +1592,13 @@ export declare function OptionPositionValue(underlying: string, optionType: Opti
|
|
|
1592
1592
|
*/
|
|
1593
1593
|
export declare function OptionRealizedPnL(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType, lookbackDays?: number): Indicator;
|
|
1594
1594
|
/**
|
|
1595
|
-
*
|
|
1595
|
+
* Returns realized option premium still available to spend: net realized P&L from closed short option positions, minus premium already spent by opens sized with Percent of Realized Premium. Proceeds from closing long options are not added back. This is the balance that allocation sizes against. It goes negative when closed shorts lost money, and a negative balance funds nothing. Lookback Days limits it to activity within that many days of the evaluation date; omit it for the whole life of the book. Range: -∞ to ∞ (dollars).
|
|
1596
1596
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1597
1597
|
* @param lookbackDays Only count activity within this many days of the evaluation date. Leave empty for the whole life of the book.
|
|
1598
1598
|
*/
|
|
1599
1599
|
export declare function OptionRealizedPremium(underlying: string, lookbackDays?: number): Indicator;
|
|
1600
1600
|
/**
|
|
1601
|
-
*
|
|
1601
|
+
* Returns the number of distinct economic open multi-leg option spreads matching the filter criteria, deduplicating equal economic spread keys. Does not count standalone single-leg option positions. Range: 0 to ∞.
|
|
1602
1602
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1603
1603
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1604
1604
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1606,7 +1606,7 @@ export declare function OptionRealizedPremium(underlying: string, lookbackDays?:
|
|
|
1606
1606
|
*/
|
|
1607
1607
|
export declare function OptionSpreadCount(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1608
1608
|
/**
|
|
1609
|
-
*
|
|
1609
|
+
* Returns the net price per share paid or collected to open the option spreads matching the filter: positive for a net debit, negative for a net credit. Several matching spreads average by contracts. Has no value when no matching spread is open. Use it as an option limit amount to price one spread off another spread's fill; wrap a credit spread's price in Absolute Value first, because a limit must be positive. Range: -∞ to ∞ (dollars per share).
|
|
1610
1610
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1611
1611
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1612
1612
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1614,7 +1614,7 @@ export declare function OptionSpreadCount(underlying: string, optionType: Option
|
|
|
1614
1614
|
*/
|
|
1615
1615
|
export declare function OptionSpreadEntryPrice(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1616
1616
|
/**
|
|
1617
|
-
*
|
|
1617
|
+
* Returns the total unrealized P&L in dollars across option spreads matching the filter. Range: -∞ to ∞ (dollars).
|
|
1618
1618
|
* @param underlying Filter by underlying (e.g., AAPL, SPY). Leave empty for all.
|
|
1619
1619
|
* @param optionType Filter by Call or Put. Leave empty for all.
|
|
1620
1620
|
* @param direction Filter by Long or Short. Leave empty for all.
|
|
@@ -1622,7 +1622,7 @@ export declare function OptionSpreadEntryPrice(underlying: string, optionType: O
|
|
|
1622
1622
|
*/
|
|
1623
1623
|
export declare function OptionUnrealizedPnL(underlying: string, optionType: OptionType, direction: OptionDirection, spreadType: OptionSpreadType): Indicator;
|
|
1624
1624
|
/**
|
|
1625
|
-
*
|
|
1625
|
+
* Trailing stop-and-reverse level that accelerates toward price as the trend extends. Price crossing the SAR flips the trend. Range: Price scale.
|
|
1626
1626
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1627
1627
|
* @param interval Bar interval the SAR trails on
|
|
1628
1628
|
* @param step AF increment per new extreme
|
|
@@ -1630,11 +1630,11 @@ export declare function OptionUnrealizedPnL(underlying: string, optionType: Opti
|
|
|
1630
1630
|
*/
|
|
1631
1631
|
export declare function ParabolicSar(asset: AssetArg, interval?: Interval, step?: number, maximum?: number): Indicator;
|
|
1632
1632
|
/**
|
|
1633
|
-
*
|
|
1633
|
+
* Sum of two or more indicators. The SDK builder takes exactly two operands; nest it to add more.
|
|
1634
1634
|
*/
|
|
1635
1635
|
export declare function Plus(left: Indicator, right: Indicator): Indicator;
|
|
1636
1636
|
/**
|
|
1637
|
-
*
|
|
1637
|
+
* A member's publicly known equity or option purchase dollars divided by the sum of both, across all disclosed tickers. Event versions enter only when public. Unclassified instruments are excluded. purchaseScope defaults to AllPurchases for historical flow. RemainingLots sums surviving original purchase costs after reported full sales and exercises, excluding unresolved ticker buckets. Unknown partial quantities retain their estimate. Neither setting is current market value or verified holdings. Range: 0 to 100 percent; zero before a qualifying purchase.
|
|
1638
1638
|
* @param memberId Bioguide member id, for example P000197. The share uses the member's whole public purchase record.
|
|
1639
1639
|
* @param instrument Which side of the equity/option purchase mix to return, as a percent from 0 to 100.
|
|
1640
1640
|
* @param amountBasis Estimate for disclosed purchase ranges. Midpoint is the default.
|
|
@@ -1642,7 +1642,7 @@ export declare function Plus(left: Indicator, right: Indicator): Indicator;
|
|
|
1642
1642
|
*/
|
|
1643
1643
|
export declare function PoliticalPurchaseShare(memberId: string, instrument?: Instrument2, amountBasis?: AmountBasis, purchaseScope?: "AllPurchases" | "RemainingLots"): Indicator;
|
|
1644
1644
|
/**
|
|
1645
|
-
*
|
|
1645
|
+
* Trades by members of Congress in the asset, from the unified House and Senate disclosure lake, over a trailing window. A trade counts from the moment its report became public, never its trade date, and an amended report changes a value only from the moment the amendment became public. Amount metrics can use the lower, midpoint, or upper end of every disclosed range. Equity disclosures are the default; confirmed option disclosures can be selected separately for numeric activity. Held requires Equity and reads the member's whole public record instead: 1 while their latest equity disclosure for the asset is a purchase or partial sale, 0 after a full sale. Held is a disclosure signal, not verified holdings or share quantity. RemainingBuyAmount reads the full public history and sums original purchase ranges of remaining lots after full sales and exercises. Unknown partial quantities retain their purchase amount estimate; sale proceeds are never subtracted. This is estimated remaining cost, not current market value. Printed expirations identify lots but do not implicitly end modeled renewal exposure. Range: Disclosed amount-range values or counts over the window, or 1/0 for Held; 0 when no matching trade was disclosed.
|
|
1646
1646
|
* @param asset Pass CANDIDATE inside a rebalance pipeline to bind each stock.
|
|
1647
1647
|
* @param filer Member full or last name. Pass an empty string for all members.
|
|
1648
1648
|
* @param metric Amount-range aggregate, event count, distinct purchasing members, RemainingBuyAmount (surviving original purchase amounts; ignores window; unknown partial quantities retained), or Held: 1 while the member still holds the asset (latest public disclosure is a purchase or partial sale), ignoring the window.
|
|
@@ -1654,7 +1654,7 @@ export declare function PoliticalPurchaseShare(memberId: string, instrument?: In
|
|
|
1654
1654
|
*/
|
|
1655
1655
|
export declare function PoliticalTrades(asset: AssetArg, filer: string, metric?: "NetAmount" | "BuyAmount" | "RemainingBuyAmount" | "SellAmount" | "BuyCount" | "SellCount" | "DistinctBuyers" | "Held", windowDays?: number, amountBasis?: AmountBasis, instrument?: "Equity" | "Option" | "All", chamber?: "All" | "House" | "Senate", memberId?: string): Indicator;
|
|
1656
1656
|
/**
|
|
1657
|
-
*
|
|
1657
|
+
* The total current value of your portfolio (cash + all positions). Range: >= 0.
|
|
1658
1658
|
*/
|
|
1659
1659
|
export declare function PortfolioValue(): Indicator;
|
|
1660
1660
|
/**
|
|
@@ -1663,12 +1663,12 @@ export declare function PortfolioValue(): Indicator;
|
|
|
1663
1663
|
*/
|
|
1664
1664
|
export declare function PositionEntryPrice(asset: AssetArg): Indicator;
|
|
1665
1665
|
/**
|
|
1666
|
-
*
|
|
1666
|
+
* The maximum percentage decline in the position's unrealized P&L from its peak. Aggregates the stock or crypto holding plus all option spreads on that underlying. Returns 0 at a new high water mark; rises as P&L falls below the peak, so it is never negative. Range: >= 0 (percentage points of P&L).
|
|
1667
1667
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1668
1668
|
*/
|
|
1669
1669
|
export declare function PositionMaxDrawdown(asset: AssetArg): Indicator;
|
|
1670
1670
|
/**
|
|
1671
|
-
*
|
|
1671
|
+
* The percentage increase of the asset's current market price from the lowest price observed by this indicator. Share purchases and sales do not change the calculation; it does not use position cost basis. Range: >= 0 (percentage).
|
|
1672
1672
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1673
1673
|
*/
|
|
1674
1674
|
export declare function PositionMaxDrawup(asset: AssetArg): Indicator;
|
|
@@ -1683,46 +1683,46 @@ export declare function PositionMinutesSinceHigh(asset: AssetArg): Indicator;
|
|
|
1683
1683
|
*/
|
|
1684
1684
|
export declare function PositionPeakPrice(asset: AssetArg): Indicator;
|
|
1685
1685
|
/**
|
|
1686
|
-
*
|
|
1686
|
+
* How much your position has gained or lost as a percentage since you opened it. Range: Unbounded (percentage).
|
|
1687
1687
|
* @param assets Ticker name (ex. SPY, BTC)
|
|
1688
1688
|
*/
|
|
1689
1689
|
export declare function PositionPercentChange(assets: AssetArg | AssetArg[]): Indicator;
|
|
1690
1690
|
/**
|
|
1691
|
-
*
|
|
1691
|
+
* The current dollar value of your position in one or more assets. Range: >= 0.
|
|
1692
1692
|
* @param assets Ticker name (ex. SPY, BTC)
|
|
1693
1693
|
*/
|
|
1694
1694
|
export declare function PositionValue(assets: AssetArg | AssetArg[]): Indicator;
|
|
1695
1695
|
/**
|
|
1696
|
-
*
|
|
1696
|
+
* The closing price from the previous trading session. It already has a one-session offset; wrapping it in Indicator Window Ago adds another lag rather than selecting that same previous close. Range: > 0.
|
|
1697
1697
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1698
1698
|
*/
|
|
1699
1699
|
export declare function PreviousClosingPrice(asset: AssetArg): Indicator;
|
|
1700
1700
|
/**
|
|
1701
|
-
*
|
|
1701
|
+
* The current market price of any asset. Range: > 0.
|
|
1702
1702
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1703
1703
|
*/
|
|
1704
1704
|
export declare function Price(asset: AssetArg): Indicator;
|
|
1705
1705
|
/**
|
|
1706
|
-
*
|
|
1706
|
+
* The dollar change in price since market open. Range: Unbounded.
|
|
1707
1707
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1708
1708
|
*/
|
|
1709
1709
|
export declare function PriceChangeSinceOpen(asset: AssetArg): Indicator;
|
|
1710
1710
|
/**
|
|
1711
|
-
*
|
|
1711
|
+
* The mean absolute deviation of an asset's price over a window. Similar to standard deviation but less sensitive to outliers. Range: >= 0.
|
|
1712
1712
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1713
1713
|
* @param length Length of time
|
|
1714
1714
|
* @param interval Unit of time
|
|
1715
1715
|
*/
|
|
1716
1716
|
export declare function PriceMeanAbsoluteDeviation(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1717
1717
|
/**
|
|
1718
|
-
*
|
|
1718
|
+
* Measures the percentage change in price between the current price and the price N periods ago. Range: Unbounded (percentage).
|
|
1719
1719
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1720
1720
|
* @param length Length of time
|
|
1721
1721
|
* @param interval Unit of time
|
|
1722
1722
|
*/
|
|
1723
1723
|
export declare function PriceRateOfChange(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1724
1724
|
/**
|
|
1725
|
-
*
|
|
1725
|
+
* The standard deviation of an asset's closing price over a window. Measures price volatility. Range: >= 0.
|
|
1726
1726
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1727
1727
|
* @param length Length of time
|
|
1728
1728
|
* @param interval Unit of time
|
|
@@ -1730,12 +1730,12 @@ export declare function PriceRateOfChange(asset: AssetArg, length?: number, inte
|
|
|
1730
1730
|
export declare function PriceStandardDeviation(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1731
1731
|
export declare const PriceStdDev: typeof PriceStandardDeviation;
|
|
1732
1732
|
/**
|
|
1733
|
-
*
|
|
1733
|
+
* Exposes the allocation plan that a DynamicRebalance or RebalanceOption action is about to execute, so the strategy condition can decide whether that plan is worthwhile. Range: Drift and turnover are portfolio fractions; cost and benefit metrics are dollar amounts.
|
|
1734
1734
|
* @param metric Reads the prospective plan calculated by DynamicRebalance or RebalanceOption before the strategy condition runs.
|
|
1735
1735
|
*/
|
|
1736
1736
|
export declare function RebalanceDecisionMetric(metric?: "allocationDrift" | "plannedTurnover" | "estimatedCost" | "expectedBenefit" | "netBenefit"): Indicator;
|
|
1737
1737
|
/**
|
|
1738
|
-
*
|
|
1738
|
+
* Measures the speed and magnitude of recent price changes. Oscillates between 0 and 100. Range: 0 to 100.
|
|
1739
1739
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1740
1740
|
* @param length Length of time
|
|
1741
1741
|
* @param interval Unit of time
|
|
@@ -1743,7 +1743,7 @@ export declare function RebalanceDecisionMetric(metric?: "allocationDrift" | "pl
|
|
|
1743
1743
|
export declare function RelativeStrengthIndex(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1744
1744
|
export declare const RSI: typeof RelativeStrengthIndex;
|
|
1745
1745
|
/**
|
|
1746
|
-
*
|
|
1746
|
+
* Current bar volume divided by the average volume of the trailing N completed bars. 1.0 means the bar is trading exactly its recent pace. Range: >= 0 (ratio around 1.0).
|
|
1747
1747
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1748
1748
|
* @param length Length of time
|
|
1749
1749
|
* @param interval Unit of time
|
|
@@ -1758,11 +1758,11 @@ export declare function RelativeVolume(asset: AssetArg, length?: number, interva
|
|
|
1758
1758
|
export declare function SimpleMovingAverage(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1759
1759
|
export declare const SMA: typeof SimpleMovingAverage;
|
|
1760
1760
|
/**
|
|
1761
|
-
*
|
|
1761
|
+
* Square root of an indicator.
|
|
1762
1762
|
*/
|
|
1763
1763
|
export declare function SquareRoot(operand: Indicator): Indicator;
|
|
1764
1764
|
/**
|
|
1765
|
-
*
|
|
1765
|
+
* Momentum oscillator comparing the close to the high-low range over N bars, with %K smoothing and a %D signal average. Readings above 80 are overbought, below 20 oversold. Range: 0 to 100.
|
|
1766
1766
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1767
1767
|
* @param length Length of time
|
|
1768
1768
|
* @param interval Unit of time
|
|
@@ -1772,12 +1772,12 @@ export declare function SquareRoot(operand: Indicator): Indicator;
|
|
|
1772
1772
|
*/
|
|
1773
1773
|
export declare function Stochastic(asset: AssetArg, length?: number, interval?: Interval, smoothK?: number, smoothD?: number, line?: "k" | "d"): Indicator;
|
|
1774
1774
|
/**
|
|
1775
|
-
* StockReport
|
|
1775
|
+
* AI stock report rating: a fundamental-strength score from 1 to 5, higher is stronger, synthesizing revenue growth, profitability, balance sheet health, valuation and competitive positioning. Point-in-time: a backtest reads the rating in effect on each date. Works on a named ticker and on CANDIDATE inside a rebalance filter, rank or weight, e.g. gte(StockReport(CANDIDATE), Value(3.5)) for fundamentally strong stocks.
|
|
1776
1776
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1777
1777
|
*/
|
|
1778
1778
|
export declare function StockReport(asset: AssetArg): Indicator;
|
|
1779
1779
|
/**
|
|
1780
|
-
*
|
|
1780
|
+
* The total dollar amount across all matching orders within a window. Range: >= 0.
|
|
1781
1781
|
* @param side Matches order events with this side (buy or sell)
|
|
1782
1782
|
* @param orderStatus Matches order events with this status
|
|
1783
1783
|
* @param length Length of time
|
|
@@ -1786,7 +1786,7 @@ export declare function StockReport(asset: AssetArg): Indicator;
|
|
|
1786
1786
|
*/
|
|
1787
1787
|
export declare function SumOrderAmount(side: Side, orderStatus?: OrderStatus, length?: number, interval?: Interval, assets?: AssetArg | AssetArg[]): Indicator;
|
|
1788
1788
|
/**
|
|
1789
|
-
*
|
|
1789
|
+
* The total number of shares across all matching orders within a window. Range: >= 0.
|
|
1790
1790
|
* @param side Matches order events with this side (buy or sell)
|
|
1791
1791
|
* @param orderStatus Matches order events with this status
|
|
1792
1792
|
* @param length Length of time
|
|
@@ -1795,7 +1795,7 @@ export declare function SumOrderAmount(side: Side, orderStatus?: OrderStatus, le
|
|
|
1795
1795
|
*/
|
|
1796
1796
|
export declare function SumOrderQuantity(side: Side, orderStatus?: OrderStatus, length?: number, interval?: Interval, assets?: AssetArg | AssetArg[]): Indicator;
|
|
1797
1797
|
/**
|
|
1798
|
-
*
|
|
1798
|
+
* ATR trailing band that ratchets with the trend and flips sides on a close through it. The direction line reads +1 in an uptrend, -1 in a downtrend. Range: Price scale (value); +1 / -1 (direction).
|
|
1799
1799
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1800
1800
|
* @param length Length of time
|
|
1801
1801
|
* @param interval Unit of time
|
|
@@ -1804,45 +1804,45 @@ export declare function SumOrderQuantity(side: Side, orderStatus?: OrderStatus,
|
|
|
1804
1804
|
*/
|
|
1805
1805
|
export declare function Supertrend(asset: AssetArg, length?: number, interval?: Interval, multiplier?: number, line?: "value" | "direction"): Indicator;
|
|
1806
1806
|
/**
|
|
1807
|
-
*
|
|
1807
|
+
* The sum of the last N accepted observations of the inner indicator. Generic inputs append when the value changes; source-backed inputs use their own observation identities. Length counts retained observations rather than every evaluation tick.
|
|
1808
1808
|
* @param length Length of the rolling window
|
|
1809
1809
|
*/
|
|
1810
1810
|
export declare function TrailingSum(operand: Indicator, length?: number): Indicator;
|
|
1811
1811
|
/**
|
|
1812
|
-
*
|
|
1812
|
+
* The greatest of: current high minus low, |high − previous close|, or |low − previous close|. Measures single-period volatility. Range: >= 0.
|
|
1813
1813
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1814
1814
|
*/
|
|
1815
1815
|
export declare function TrueRange(asset: AssetArg): Indicator;
|
|
1816
1816
|
/**
|
|
1817
|
-
*
|
|
1817
|
+
* The current percentage decline of the asset's market price from the highest price observed by this indicator. Tracks the underlying price independently of position state. Range: 0 to 100 (percentage).
|
|
1818
1818
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1819
1819
|
*/
|
|
1820
1820
|
export declare function UnderlyingMaxDrawdown(asset: AssetArg): Indicator;
|
|
1821
1821
|
/**
|
|
1822
|
-
*
|
|
1822
|
+
* A fixed numeric value. Useful as one side of a comparison.
|
|
1823
1823
|
* @param value Constant value
|
|
1824
1824
|
*/
|
|
1825
1825
|
export declare function Value(value?: number): Indicator;
|
|
1826
1826
|
/**
|
|
1827
|
-
* Volume
|
|
1827
|
+
* Trading volume for the asset. It is the Fundamental indicator with its metric preset to Volume, on the same pipeline and data sources. Keep the metric at Volume: any other metric returns that fundamental metric instead of volume. Range: >= 0.
|
|
1828
1828
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1829
1829
|
* @param metric The fundamental metric to use
|
|
1830
1830
|
*/
|
|
1831
1831
|
export declare function Volume(asset: AssetArg, metric?: FundamentalMetric): Indicator;
|
|
1832
1832
|
/**
|
|
1833
|
-
*
|
|
1833
|
+
* The average price weighted by volume throughout the trading session. A key intraday benchmark. Range: > 0.
|
|
1834
1834
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1835
1835
|
*/
|
|
1836
1836
|
export declare function VWAP(asset: AssetArg): Indicator;
|
|
1837
1837
|
/**
|
|
1838
|
-
*
|
|
1838
|
+
* Momentum oscillator placing the close within the high-low range over N bars, on a -100 to 0 scale. Above -20 is overbought, below -80 oversold. Range: -100 to 0.
|
|
1839
1839
|
* @param asset Ticker name (ex. SPY, BTC)
|
|
1840
1840
|
* @param length Length of time
|
|
1841
1841
|
* @param interval Unit of time
|
|
1842
1842
|
*/
|
|
1843
1843
|
export declare function WilliamsR(asset: AssetArg, length?: number, interval?: Interval): Indicator;
|
|
1844
1844
|
/**
|
|
1845
|
-
*
|
|
1845
|
+
* The current year.
|
|
1846
1846
|
*/
|
|
1847
1847
|
export declare function Year(): Indicator;
|
|
1848
1848
|
export type FitnessFunction = "sharpeRatio" | "sortinoRatio" | "winRate" | "profitFactor" | "calmarRatio" | "maxDrawdown" | "avgDrawdown" | "percentChange" | "dollarsSold" | "ulcerPerformanceIndex" | "participationRate" | "distinctUnderlyingsTraded" | "medianDeployment";
|