lightweight-charts-indicators 0.16.5 → 0.16.7

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.
Files changed (188) hide show
  1. package/dist/community/accurate-swing-trading.d.ts +12 -6
  2. package/dist/community/accurate-swing-trading.d.ts.map +1 -1
  3. package/dist/community/alpha-trend.d.ts +4 -1
  4. package/dist/community/alpha-trend.d.ts.map +1 -1
  5. package/dist/community/atr-trailing-colored.d.ts +7 -4
  6. package/dist/community/atr-trailing-colored.d.ts.map +1 -1
  7. package/dist/community/atr-trailing-stops.d.ts +21 -18
  8. package/dist/community/atr-trailing-stops.d.ts.map +1 -1
  9. package/dist/community/auto-fib.d.ts +12 -7
  10. package/dist/community/auto-fib.d.ts.map +1 -1
  11. package/dist/community/banker-fund-flow.d.ts +3 -3
  12. package/dist/community/banker-fund-flow.d.ts.map +1 -1
  13. package/dist/community/binary-option-arrows.d.ts +15 -13
  14. package/dist/community/binary-option-arrows.d.ts.map +1 -1
  15. package/dist/community/bullish-engulfing-finder.d.ts +14 -8
  16. package/dist/community/bullish-engulfing-finder.d.ts.map +1 -1
  17. package/dist/community/bulls-bears-control.d.ts +8 -7
  18. package/dist/community/bulls-bears-control.d.ts.map +1 -1
  19. package/dist/community/cci-stochastic.d.ts +4 -2
  20. package/dist/community/cci-stochastic.d.ts.map +1 -1
  21. package/dist/community/chandelier-exit.d.ts +14 -11
  22. package/dist/community/chandelier-exit.d.ts.map +1 -1
  23. package/dist/community/cm-gann-swing.d.ts +27 -4
  24. package/dist/community/cm-gann-swing.d.ts.map +1 -1
  25. package/dist/community/cm-rsi-2-lower.d.ts +9 -9
  26. package/dist/community/cm-rsi-2-lower.d.ts.map +1 -1
  27. package/dist/community/cm-rsi-2-upper.d.ts +14 -10
  28. package/dist/community/cm-rsi-2-upper.d.ts.map +1 -1
  29. package/dist/community/cm-sling-shot.d.ts +4 -4
  30. package/dist/community/cm-sling-shot.d.ts.map +1 -1
  31. package/dist/community/comprehensive-trading-toolkit.d.ts +3 -2
  32. package/dist/community/comprehensive-trading-toolkit.d.ts.map +1 -1
  33. package/dist/community/delta-rsi-oscillator.d.ts +18 -10
  34. package/dist/community/delta-rsi-oscillator.d.ts.map +1 -1
  35. package/dist/community/dmi-adx-levels.d.ts +11 -17
  36. package/dist/community/dmi-adx-levels.d.ts.map +1 -1
  37. package/dist/community/donchian-custom.d.ts +7 -4
  38. package/dist/community/donchian-custom.d.ts.map +1 -1
  39. package/dist/community/dynamic-structure-indicator.d.ts +14 -9
  40. package/dist/community/dynamic-structure-indicator.d.ts.map +1 -1
  41. package/dist/community/ehlers-mesa-ma.d.ts +18 -6
  42. package/dist/community/ehlers-mesa-ma.d.ts.map +1 -1
  43. package/dist/community/ema-supertrend.d.ts +12 -12
  44. package/dist/community/ema-supertrend.d.ts.map +1 -1
  45. package/dist/community/evwma-envelope.d.ts +12 -7
  46. package/dist/community/evwma-envelope.d.ts.map +1 -1
  47. package/dist/community/follow-line.d.ts +14 -7
  48. package/dist/community/follow-line.d.ts.map +1 -1
  49. package/dist/community/gann-high-low.d.ts +4 -2
  50. package/dist/community/gann-high-low.d.ts.map +1 -1
  51. package/dist/community/global-liquidity-index.d.ts +9 -2
  52. package/dist/community/global-liquidity-index.d.ts.map +1 -1
  53. package/dist/community/gmma.d.ts +26 -6
  54. package/dist/community/gmma.d.ts.map +1 -1
  55. package/dist/community/hap-macd.d.ts +2 -2
  56. package/dist/community/hap-macd.d.ts.map +1 -1
  57. package/dist/community/heatmap-volume.d.ts +3 -0
  58. package/dist/community/heatmap-volume.d.ts.map +1 -1
  59. package/dist/community/hull-butterfly-oscillator.d.ts +16 -8
  60. package/dist/community/hull-butterfly-oscillator.d.ts.map +1 -1
  61. package/dist/community/ichimoku-oscillator.d.ts +28 -7
  62. package/dist/community/ichimoku-oscillator.d.ts.map +1 -1
  63. package/dist/community/impulse-macd.d.ts +5 -0
  64. package/dist/community/impulse-macd.d.ts.map +1 -1
  65. package/dist/community/intraday-buy-sell.d.ts +4 -3
  66. package/dist/community/intraday-buy-sell.d.ts.map +1 -1
  67. package/dist/community/isolated-peak-bottom.d.ts +3 -0
  68. package/dist/community/isolated-peak-bottom.d.ts.map +1 -1
  69. package/dist/community/liquidity-grabs.d.ts +6 -5
  70. package/dist/community/liquidity-grabs.d.ts.map +1 -1
  71. package/dist/community/macd-reloaded.d.ts.map +1 -1
  72. package/dist/community/macd-support-resistance.d.ts +2 -1
  73. package/dist/community/macd-support-resistance.d.ts.map +1 -1
  74. package/dist/community/market-cipher-a.d.ts +8 -4
  75. package/dist/community/market-cipher-a.d.ts.map +1 -1
  76. package/dist/community/matrix-series.d.ts +7 -4
  77. package/dist/community/matrix-series.d.ts.map +1 -1
  78. package/dist/community/mfi-nexus-pro.d.ts +2 -1
  79. package/dist/community/mfi-nexus-pro.d.ts.map +1 -1
  80. package/dist/community/ml-adaptive-supertrend.d.ts +44 -12
  81. package/dist/community/ml-adaptive-supertrend.d.ts.map +1 -1
  82. package/dist/community/ml-knn-strategy.d.ts +40 -9
  83. package/dist/community/ml-knn-strategy.d.ts.map +1 -1
  84. package/dist/community/ml-momentum-index.d.ts +26 -11
  85. package/dist/community/ml-momentum-index.d.ts.map +1 -1
  86. package/dist/community/ml-moving-average.d.ts +15 -9
  87. package/dist/community/ml-moving-average.d.ts.map +1 -1
  88. package/dist/community/multiple-divergences.d.ts +31 -5
  89. package/dist/community/multiple-divergences.d.ts.map +1 -1
  90. package/dist/community/optimized-trend-tracker.d.ts +18 -2
  91. package/dist/community/optimized-trend-tracker.d.ts.map +1 -1
  92. package/dist/community/order-blocks-signals.d.ts +8 -7
  93. package/dist/community/order-blocks-signals.d.ts.map +1 -1
  94. package/dist/community/philakone-ema-swing.d.ts +5 -2
  95. package/dist/community/philakone-ema-swing.d.ts.map +1 -1
  96. package/dist/community/ppo-divergence.d.ts +4 -6
  97. package/dist/community/ppo-divergence.d.ts.map +1 -1
  98. package/dist/community/profit-maximizer.d.ts +19 -6
  99. package/dist/community/profit-maximizer.d.ts.map +1 -1
  100. package/dist/community/qqe-mod.d.ts +3 -5
  101. package/dist/community/qqe-mod.d.ts.map +1 -1
  102. package/dist/community/qqe.d.ts +15 -5
  103. package/dist/community/qqe.d.ts.map +1 -1
  104. package/dist/community/rci-3lines.d.ts +13 -5
  105. package/dist/community/rci-3lines.d.ts.map +1 -1
  106. package/dist/community/redk-everex.d.ts +48 -9
  107. package/dist/community/redk-everex.d.ts.map +1 -1
  108. package/dist/community/redk-rss-wma.d.ts +13 -6
  109. package/dist/community/redk-rss-wma.d.ts.map +1 -1
  110. package/dist/community/redk-tpx.d.ts +1 -3
  111. package/dist/community/redk-tpx.d.ts.map +1 -1
  112. package/dist/community/renko-chart.d.ts +32 -12
  113. package/dist/community/renko-chart.d.ts.map +1 -1
  114. package/dist/community/reversal-signals.d.ts +3 -3
  115. package/dist/community/reversal-signals.d.ts.map +1 -1
  116. package/dist/community/rsi-bb-stddev-signal.d.ts +2 -2
  117. package/dist/community/rsi-bb-stddev-signal.d.ts.map +1 -1
  118. package/dist/community/rsi-histoalert.d.ts +19 -6
  119. package/dist/community/rsi-histoalert.d.ts.map +1 -1
  120. package/dist/community/rsi-supply-demand.d.ts +1 -5
  121. package/dist/community/rsi-supply-demand.d.ts.map +1 -1
  122. package/dist/community/rsi-swing-signal.d.ts +22 -4
  123. package/dist/community/rsi-swing-signal.d.ts.map +1 -1
  124. package/dist/community/rsi-tops-bottoms.d.ts +10 -5
  125. package/dist/community/rsi-tops-bottoms.d.ts.map +1 -1
  126. package/dist/community/sar-ema-macd.d.ts +3 -5
  127. package/dist/community/sar-ema-macd.d.ts.map +1 -1
  128. package/dist/community/scalping-line.d.ts +3 -0
  129. package/dist/community/scalping-line.d.ts.map +1 -1
  130. package/dist/community/schaff-trend-cycle.d.ts +7 -5
  131. package/dist/community/schaff-trend-cycle.d.ts.map +1 -1
  132. package/dist/community/slow-heiken-ashi.d.ts +10 -3
  133. package/dist/community/slow-heiken-ashi.d.ts.map +1 -1
  134. package/dist/community/smi-ucs.d.ts +8 -7
  135. package/dist/community/smi-ucs.d.ts.map +1 -1
  136. package/dist/community/squeeze-momentum-v2.d.ts +42 -10
  137. package/dist/community/squeeze-momentum-v2.d.ts.map +1 -1
  138. package/dist/community/st0p.d.ts +31 -7
  139. package/dist/community/st0p.d.ts.map +1 -1
  140. package/dist/community/standardized-macd-ha.d.ts +19 -3
  141. package/dist/community/standardized-macd-ha.d.ts.map +1 -1
  142. package/dist/community/stoch-vx3.d.ts +19 -8
  143. package/dist/community/stoch-vx3.d.ts.map +1 -1
  144. package/dist/community/supertrend-ladder.d.ts +42 -9
  145. package/dist/community/supertrend-ladder.d.ts.map +1 -1
  146. package/dist/community/tdi-rsi.d.ts +44 -7
  147. package/dist/community/tdi-rsi.d.ts.map +1 -1
  148. package/dist/community/technical-ratings.d.ts +18 -9
  149. package/dist/community/technical-ratings.d.ts.map +1 -1
  150. package/dist/community/top-bottom-candle.d.ts +3 -3
  151. package/dist/community/top-bottom-candle.d.ts.map +1 -1
  152. package/dist/community/traders-reality-main.d.ts.map +1 -1
  153. package/dist/community/trend-line-auto.d.ts +21 -6
  154. package/dist/community/trend-line-auto.d.ts.map +1 -1
  155. package/dist/community/trend-trader.d.ts +17 -8
  156. package/dist/community/trend-trader.d.ts.map +1 -1
  157. package/dist/community/trendlines-with-breaks.d.ts +10 -0
  158. package/dist/community/trendlines-with-breaks.d.ts.map +1 -1
  159. package/dist/community/triangular-momentum-osc.d.ts +3 -0
  160. package/dist/community/triangular-momentum-osc.d.ts.map +1 -1
  161. package/dist/community/ttm-squeeze-pro.d.ts +5 -2
  162. package/dist/community/ttm-squeeze-pro.d.ts.map +1 -1
  163. package/dist/community/twin-range-filter.d.ts +14 -11
  164. package/dist/community/twin-range-filter.d.ts.map +1 -1
  165. package/dist/community/ultimate-buy-sell.d.ts +26 -4
  166. package/dist/community/ultimate-buy-sell.d.ts.map +1 -1
  167. package/dist/community/volume-supertrend-ai.d.ts +42 -9
  168. package/dist/community/volume-supertrend-ai.d.ts.map +1 -1
  169. package/dist/community/vumanchu-swing.d.ts +4 -0
  170. package/dist/community/vumanchu-swing.d.ts.map +1 -1
  171. package/dist/community/vwap-mvwap-ema-crossover.d.ts +3 -1
  172. package/dist/community/vwap-mvwap-ema-crossover.d.ts.map +1 -1
  173. package/dist/community/wavetrend-oscillator.d.ts +11 -12
  174. package/dist/community/wavetrend-oscillator.d.ts.map +1 -1
  175. package/dist/community/weis-wave-volume.d.ts +12 -4
  176. package/dist/community/weis-wave-volume.d.ts.map +1 -1
  177. package/dist/community/williams-bbdiv-signal.d.ts +2 -2
  178. package/dist/community/williams-bbdiv-signal.d.ts.map +1 -1
  179. package/dist/community/zlma-trend-levels.d.ts +5 -2
  180. package/dist/community/zlma-trend-levels.d.ts.map +1 -1
  181. package/dist/index.cjs +51083 -50977
  182. package/dist/index.d.ts +1 -1
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.mjs +48517 -48407
  185. package/dist/style-outputs-community.d.ts.map +1 -1
  186. package/dist/style-outputs.d.ts +4 -1
  187. package/dist/style-outputs.d.ts.map +1 -1
  188. package/package.json +1 -1
@@ -1,16 +1,18 @@
1
1
  /**
2
2
  * Accurate Swing Trading System
3
3
  *
4
- * Swing support/resistance with buy/sell signals.
5
- * TSL line based on highest/lowest over swing length, colored by direction.
4
+ * Swing support/resistance with buy/sell signals, as the original: res = highest(high, swing), sup = lowest(low,
5
+ * swing); the direction is 1 when the close is above res[1], -1 below sup[1] (its last non-zero value is kept);
6
+ * TSL = sup in direction 1, else res (width 3), green when the close is at or above it, else red; the same colour
7
+ * on the bars ('Barcolor') and the background ('Bgcolor', transparency 90). BUY / SELL labels (black text) where
8
+ * the close crosses above / below the TSL.
6
9
  *
7
- * Alerts (alertcondition, `alerts` of the result): 'Buy Signal' / 'Sell Signal', true when the close crosses above /
8
- * below the original's TSL: res = highest(high, swing), sup = lowest(low, swing); the direction is 1 when the close
9
- * is above res[1], -1 below sup[1] (its last non-zero value is kept); TSL = sup in direction 1, else res.
10
+ * Alerts (alertcondition, `alerts` of the result): 'Buy Signal' / 'Sell Signal', on the bars of these labels.
10
11
  *
11
12
  * Reference: "Accurate Swing Trading System" (community)
12
13
  */
13
14
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
15
+ import type { MarkerData, BarColorData, BgColorData } from '../types';
14
16
  import { type AlertConditionDecl, type AlertConditionState } from '../alert-states';
15
17
  export interface AccurateSwingTradingInputs {
16
18
  swingLength: number;
@@ -25,7 +27,11 @@ export declare const metadata: {
25
27
  shortTitle: string;
26
28
  overlay: boolean;
27
29
  };
28
- export declare function calculate(bars: Bar[], inputs?: Partial<AccurateSwingTradingInputs>): Omit<IndicatorResult, 'markers'> & {
30
+ export declare function calculate(bars: Bar[], inputs?: Partial<AccurateSwingTradingInputs>): IndicatorResult & {
31
+ markers: MarkerData[];
32
+ barColors: BarColorData[];
33
+ bgColors: BgColorData[];
34
+ } & {
29
35
  alerts: AlertConditionState[];
30
36
  };
31
37
  /** The original's alertconditions */
@@ -1 +1 @@
1
- {"version":3,"file":"accurate-swing-trading.d.ts","sourceRoot":"","sources":["../../src/community/accurate-swing-trading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,OAAO,EACmC,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAC1F,MAAM,iBAAiB,CAAC;AAOzB,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,0BAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAA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IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,GAC9F;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAyDpC;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAG/C,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAAmF,CAAC"}
@@ -3,7 +3,9 @@
3
3
  *
4
4
  * ATR-based adaptive trend indicator.
5
5
  * Uses RSI (or MFI if volume available) to determine trend direction,
6
- * then builds trailing stop levels that only ratchet in trend direction.
6
+ * then builds trailing stop levels that only ratchet in trend direction. As the original, the previous value is
7
+ * nz(AlphaTrend[1]): 0 on the first bar with an ATR, so the line can start at 0. BUY / SELL labels at
8
+ * AlphaTrend[2] * 0.9999 / * 1.0001 on the potential buy / sell signals ('Show Signals?').
7
9
  * Alerts (alertcondition, `alerts` of the result): the original's ten conditions — potential / confirmed buy and
8
10
  * sell (AlphaTrend crossing its value 2 bars back, filtered by the bars since the opposite signal), price / candle
9
11
  * crosses of the AlphaTrend line, and the same crosses one bar later (after bar close).
@@ -17,6 +19,7 @@ export interface AlphaTrendInputs {
17
19
  coeff: number;
18
20
  period: number;
19
21
  useRSI: boolean;
22
+ showSignals: boolean;
20
23
  }
21
24
  export declare const defaultInputs: AlphaTrendInputs;
22
25
  export declare const inputConfig: InputConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"alpha-trend.d.ts","sourceRoot":"","sources":["../../src/community/alpha-trend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAA0C,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE5H,MAAM,WAAW,gBAAgB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CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACrC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAoGlG;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAW/C,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;CAAmF,CAAC"}
@@ -1,11 +1,14 @@
1
1
  /**
2
2
  * Average True Range Trailing Stops Colored
3
3
  *
4
- * ATR trailing stop with trend coloring.
5
- * Green in uptrend (price above stop), red in downtrend (price below stop).
6
- * Stop ratchets in favorable direction only.
4
+ * ATR trailing stop (Sylvain Vervoort): loss = multiplier x ATR(period). While the close and the previous close
5
+ * stay on one side of the previous stop, the stop ratchets (max(stop, close - loss) above, min(stop, close + loss)
6
+ * below); when the close crosses it, the stop restarts at close -/+ loss. A missing previous stop counts as 0, so
7
+ * the stop exists from the first bar of the ATR.
8
+ * The line is coloured by the position: green after the close crosses above the stop, red after it crosses below,
9
+ * blue until the first cross. The original draws only this line (no bar colours, no markers).
7
10
  *
8
- * Reference: "Average True Range Trailing Stops Colored" (community)
11
+ * Reference: "Average True Range Trailing Stops Strategy, by Sylvain Vervoort" (community, HPotter)
9
12
  */
10
13
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
11
14
  export interface ATRTrailingColoredInputs {
@@ -1 +1 @@
1
- {"version":3,"file":"atr-trailing-colored.d.ts","sourceRoot":"","sources":["../../src/community/atr-trailing-colored.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAM,KAAK,eAAe,EA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AC"}
@@ -1,26 +1,31 @@
1
1
  /**
2
- * ATR Trailing Stops Colored
2
+ * ATR + Trailing Stops
3
3
  *
4
- * ATR-based trailing stop with direction color.
5
- * Trailing stop ratchets in favorable direction only.
6
- * Green when price above stop (long), red when below (short).
4
+ * An ATR of a weighted true range: the body range max(|open - close|, |open - close[1]|, |close - close[1]|) times the
5
+ * body percentage plus the wicks (high - max(open, close) + min(open, close) - low) times the wick percentage,
6
+ * smoothed by RMA / SMA / EMA / WMA over the lookback, times the multiplier. Running mode draws low - ATR and
7
+ * high + ATR on every bar. Trailing mode draws a long stop (low - ATR, only rising) while long and a short stop
8
+ * (high + ATR, only falling) while short, each as a wide line with a thin highlight on top; the side flips when the
9
+ * close (or the wick, per "Flip Trail on") goes beyond the opposite stop, the stop of the new side then restarting at
10
+ * the current low - ATR / high + ATR. Both stops are drawn until the first flip.
7
11
  *
8
- * Alerts (alertcondition, `alerts` of the result): the original's two crosses, computed with the original's trail
9
- * logic (not with the line drawn here): an ATR of the body true range plus the wicks (RMA of ATR Period, times the
10
- * multiplier), a long stop low - ATR that only rises and a short stop high + ATR that only falls, the long / short
11
- * state flipping when the close goes beyond the opposite stop (the stop of the new side is then reset to the current
12
- * low - ATR / high + ATR). 'Long: Price crossed ATR up': the close goes above the short stop of the bar before (and
13
- * was not above the one of 2 bars back); 'Short: Price crossed ATR down': the mirror below the long stop. The
14
- * original's other inputs are at their defaults (flip on the close, 100 % body and wick, RMA).
12
+ * Alerts (alertcondition, `alerts` of the result): 'Long: Price crossed ATR up' when the flip source goes above the
13
+ * drawn short stop of the bar before (and was not above the one of 2 bars back); 'Short: Price crossed ATR down' the
14
+ * mirror below the drawn long stop.
15
15
  *
16
- * Reference: "ATR Trailing Stops" (community)
16
+ * Reference: "ATR + Trailing Stops" by SimpleCryptoLife
17
17
  */
18
18
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
19
- import type { MarkerData, BarColorData } from '../types';
20
19
  import { type AlertConditionDecl, type AlertConditionState } from '../alert-states';
21
20
  export interface ATRTrailingStopsInputs {
21
+ /** ATR Lookback Period */
22
22
  atrPeriod: number;
23
23
  atrMultiplier: number;
24
+ trailMode: 'Running' | 'Trailing';
25
+ flipOn: 'Close' | 'Wick';
26
+ bodyPercent: number;
27
+ wickPercent: number;
28
+ smoothing: 'RMA' | 'SMA' | 'EMA' | 'WMA';
24
29
  }
25
30
  export declare const defaultInputs: ATRTrailingStopsInputs;
26
31
  export declare const inputConfig: InputConfig[];
@@ -30,13 +35,11 @@ export declare const metadata: {
30
35
  shortTitle: string;
31
36
  overlay: boolean;
32
37
  };
33
- export declare function calculate(bars: Bar[], inputs?: Partial<ATRTrailingStopsInputs>): Omit<IndicatorResult, 'markers'> & {
34
- markers: MarkerData[];
35
- barColors: BarColorData[];
36
- alerts: AlertConditionState[];
37
- };
38
38
  /** The original's alertconditions */
39
39
  export declare const alertConditions: AlertConditionDecl[];
40
+ export declare function calculate(bars: Bar[], inputs?: Partial<ATRTrailingStopsInputs>): IndicatorResult & {
41
+ alerts: AlertConditionState[];
42
+ };
40
43
  export declare const ATRTrailingStops: {
41
44
  calculate: typeof calculate;
42
45
  metadata: {
@@ -1 +1 @@
1
- {"version":3,"file":"atr-trailing-stops.d.ts","sourceRoot":"","sources":["../../src/community/atr-trailing-stops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAM,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAe,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aA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eAAO,MAAM,WAAW,EAAE,WAAW,EAQpC,CAAC;AAMF,eAAO,MAAM,UAAU,EAAE,UAAU,EAOlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAG/C,CAAC;AASF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,sBAAsB,CAAM,GAC3C,eAAe,GAAG;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAgFrD;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAAmF,CAAC"}
@@ -1,20 +1,24 @@
1
1
  /**
2
2
  * Auto Fibonacci
3
3
  *
4
- * Automatic Fibonacci retracement levels based on highest high and lowest low
5
- * over a lookback period. Plots 7 standard Fibonacci levels.
6
- * On the last bar, the original's level labels (%0 ... %161.8, 15 bars after the last bar, at the original's levels:
7
- * from the low up when the highest high is older than the lowest low, else from the high down) and the High / Low
8
- * labels on the bars of the highest high / lowest low.
4
+ * Fibonacci levels between the highest high and the lowest low of the last "Fibo Period" bars (144). When the
5
+ * highest high is older than the lowest low (a downward leg) the levels go up from the low (low + range x ratio,
6
+ * green #00cc00), else down from the high (high - range x ratio, red #E41019). Levels 0, 0.236, 0.382, 0.5, 0.618,
7
+ * 0.786, 1 and 1.618 (the last one when "Plot 1.618 Level?" is on and the level is not 0).
8
+ * As in the original, each level plot has a value on the last bar only (show_last = 1) and a price line at that value
9
+ * across the chart (trackprice = true, `lines` of the result, dashed, in the level colour); na until "Fibo Period"
10
+ * bars exist. On the last bar, the original's level labels (%0 ... %161.8, 15 bars after the last bar) and the
11
+ * High / Low labels on the bars of the highest high / lowest low.
9
12
  * Alerts (alertcondition, `alerts` of the result): the close crossing over / under the 0.236 ... 0.786 levels of the
10
13
  * original, in an upward (highest high more recent than the lowest low) or a downward retracement.
11
14
  *
12
15
  * Reference: "Auto Fibonacci" (community)
13
16
  */
14
17
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
15
- import type { MarkerData } from '../types';
18
+ import type { LineDrawingData, MarkerData } from '../types';
16
19
  import { type AlertConditionDecl, type AlertConditionState } from '../alert-states';
17
20
  export interface AutoFibInputs {
21
+ /** Fibo Period */
18
22
  length: number;
19
23
  /** Draw the 1.618 level label */
20
24
  plotF1618: boolean;
@@ -27,8 +31,9 @@ export declare const metadata: {
27
31
  shortTitle: string;
28
32
  overlay: boolean;
29
33
  };
30
- export declare function calculate(bars: Bar[], inputs?: Partial<AutoFibInputs>): Omit<IndicatorResult, 'markers'> & {
34
+ export declare function calculate(bars: Bar[], inputs?: Partial<AutoFibInputs>): Omit<IndicatorResult, 'markers' | 'lines'> & {
31
35
  markers: MarkerData[];
36
+ lines: LineDrawingData[];
32
37
  } & {
33
38
  alerts: AlertConditionState[];
34
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"auto-fib.d.ts","sourceRoot":"","sources":["../../src/community/auto-fib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAqB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AACnH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAA0C,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE5H,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAQlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,S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;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CA+FtI;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAEyB,CAAC;AAE1E,eAAO,MAAM,OAAO;;;;;;;;;;;CAAmF,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Banker Fund Flow Trend Oscillator
3
3
  *
4
4
  * Models institutional fund flow using a weighted simple average normalization
5
- * combined with EMA smoothing. Produces two lines: fund flow trend and bull/bear line.
5
+ * combined with EMA smoothing. Computes two series: fund flow trend and bull/bear line (drawn as candles only).
6
6
  * Fund flow trend = double-smoothed stochastic-like normalization over 27 bars.
7
7
  * Bull/bear line = EMA(13) of typical price normalized over 34-bar highest/lowest.
8
8
  * Entry signal fires when fund_flow crosses above bull_bear and bull_bear < 25.
@@ -11,11 +11,12 @@
11
11
  * previous fund flow), red (fund flow below the line) and blue (below the line and above 95 % of the previous fund
12
12
  * flow) candles from the fund flow to the bull bear line.
13
13
  * Alerts (alertcondition, `alerts` of the result): one per candle colour, with the candle's condition.
14
+ * No entry markers: the original shows the entry as the yellow candle only.
14
15
  *
15
16
  * Reference: "[blackcat] L3 Banker Fund Flow Trend Oscillator"
16
17
  */
17
18
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
18
- import type { MarkerData, PlotCandleData } from '../types';
19
+ import type { PlotCandleData } from '../types';
19
20
  import { type AlertConditionDecl, type AlertConditionState } from '../alert-states';
20
21
  export interface BankerFundFlowInputs {
21
22
  normLength: number;
@@ -32,7 +33,6 @@ export declare const metadata: {
32
33
  overlay: boolean;
33
34
  };
34
35
  export declare function calculate(bars: Bar[], inputs?: Partial<BankerFundFlowInputs>): Omit<IndicatorResult, 'markers'> & {
35
- markers: MarkerData[];
36
36
  plotCandles: Record<string, PlotCandleData[]>;
37
37
  } & {
38
38
  alerts: AlertConditionState[];
@@ -1 +1 @@
1
- {"version":3,"file":"banker-fund-flow.d.ts","sourceRoot":"","sources":["../../src/community/banker-fund-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAe,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,oBAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAKpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAuCF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACzC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;CAAE,GAC1G;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CA8IpC;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAM/C,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;CAAmF,CAAC"}
1
+ {"version":3,"file":"banker-fund-flow.d.ts","sourceRoot":"","sources":["../../src/community/banker-fund-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAe,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,oBAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAKpC,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,UAAU,EAAO,CAAC;AAE3C,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAuCF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,oBAAoB,CAAM,GACzC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;CAAE,GACnF;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAkHpC;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAM/C,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;CAAmF,CAAC"}
@@ -1,30 +1,31 @@
1
1
  /**
2
- * Binary Option Arrows
2
+ * Binary Options Arrows (example)
3
3
  *
4
- * Buy/sell arrows based on RSI crossing 50 combined with MACD histogram direction.
5
- * Buy: RSI crosses above 50 AND MACD histogram > 0.
6
- * Sell: RSI crosses below 50 AND MACD histogram < 0.
4
+ * Binary option signals on harami candle patterns: an up arrow (CALL) on a bullish harami (a down bar followed by an
5
+ * up bar whose body sits inside it, with open[5] above the open) and a down arrow (PUT) on a bearish harami (the
6
+ * mirror, with open[5] below the open). The background of the expiry bar, "Expiry" bars after the signal, shows the
7
+ * result: lime when the close moved the signal's way (WIN), red otherwise (LOSE).
7
8
  *
8
- * Reference: "Binary Option Arrows" (community)
9
+ * Reference: "Binary Options Arrows (example) [TheMightyChicken]" by TheMightyChicken
9
10
  */
10
- import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
11
- import type { MarkerData, BgColorData } from '../types';
11
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type ArrowConfig, type ArrowData } from 'oakscriptjs';
12
+ import type { BgColorData } from '../types';
12
13
  export interface BinaryOptionArrowsInputs {
13
- rsiLen: number;
14
- macdFast: number;
15
- macdSlow: number;
16
- macdSignal: number;
14
+ /** Expiry in bars */
15
+ expiry: number;
17
16
  }
18
17
  export declare const defaultInputs: BinaryOptionArrowsInputs;
19
18
  export declare const inputConfig: InputConfig[];
20
19
  export declare const plotConfig: PlotConfig[];
20
+ /** plotarrow(ARROW, colorup=lime, colordown=red, transp=0, minheight=10, maxheight=10) */
21
+ export declare const arrowConfig: ArrowConfig[];
21
22
  export declare const metadata: {
22
23
  title: string;
23
24
  shortTitle: string;
24
25
  overlay: boolean;
25
26
  };
26
- export declare function calculate(bars: Bar[], inputs?: Partial<BinaryOptionArrowsInputs>): Omit<IndicatorResult, 'markers'> & {
27
- markers: MarkerData[];
27
+ export declare function calculate(bars: Bar[], inputs?: Partial<BinaryOptionArrowsInputs>): IndicatorResult & {
28
+ arrows: ArrowData[];
28
29
  bgColors: BgColorData[];
29
30
  };
30
31
  export declare const BinaryOptionArrows: {
@@ -37,5 +38,6 @@ export declare const BinaryOptionArrows: {
37
38
  defaultInputs: BinaryOptionArrowsInputs;
38
39
  inputConfig: InputConfig[];
39
40
  plotConfig: PlotConfig[];
41
+ arrowConfig: ArrowConfig[];
40
42
  };
41
43
  //# sourceMappingURL=binary-option-arrows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"binary-option-arrows.d.ts","sourceRoot":"","sources":["../../src/community/binary-option-arrows.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,wBAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAKpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CA4E5K;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;CAAkE,CAAC"}
1
+ {"version":3,"file":"binary-option-arrows.d.ts","sourceRoot":"","sources":["../../src/community/binary-option-arrows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAClI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,WAAW,wBAAwB;IACvC,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,wBAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAEpC,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,UAAU,EAAO,CAAC;AAE3C,0FAA0F;AAC1F,eAAO,MAAM,WAAW,EAAE,WAAW,EAEpC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC7C,eAAe,GAAG;IAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAqDpE;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAA+E,CAAC"}
@@ -1,14 +1,19 @@
1
1
  /**
2
- * Bullish Engulfing Finder
2
+ * Bullish Engulfing
3
3
  *
4
- * Automatic detection of bullish engulfing candlestick patterns.
5
- * Bullish engulfing: previous candle bearish, current candle bullish,
6
- * current body fully engulfs previous body.
4
+ * Colours yellow the bars that complete a bullish engulfing: the bar before is a down bar (open[1] > close[1]), this
5
+ * bar is an up bar (close > open) whose body contains the body before (close >= open[1], close[1] >= open) and is
6
+ * longer than it (close - open > open[1] - close[1]).
7
7
  *
8
- * Reference: "Bullish Engulfing automatic finding script" (community)
8
+ * Alerts (alert() calls, `alertCalls` of the result, once per bar close): "Bullish Engulfing Formed" on each such bar.
9
+ *
10
+ * Reference: "Bullish Engulfing" by HPotter
11
+ * Original notice: Copyright by HPotter v1.0 01/04/2014
9
12
  */
10
13
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
11
- import type { MarkerData, BarColorData } from '../types';
14
+ import type { AlertCall, BarColorData } from '../types';
15
+ /** The original makes alert() calls */
16
+ export declare const hasAlertFunction = true;
12
17
  export interface BullishEngulfingFinderInputs {
13
18
  }
14
19
  export declare const defaultInputs: BullishEngulfingFinderInputs;
@@ -19,9 +24,9 @@ export declare const metadata: {
19
24
  shortTitle: string;
20
25
  overlay: boolean;
21
26
  };
22
- export declare function calculate(bars: Bar[], _inputs?: Partial<BullishEngulfingFinderInputs>): Omit<IndicatorResult, 'markers'> & {
23
- markers: MarkerData[];
27
+ export declare function calculate(bars: Bar[], _inputs?: Partial<BullishEngulfingFinderInputs>): IndicatorResult & {
24
28
  barColors: BarColorData[];
29
+ alertCalls: AlertCall[];
25
30
  };
26
31
  export declare const BullishEngulfingFinder: {
27
32
  calculate: typeof calculate;
@@ -33,5 +38,6 @@ export declare const BullishEngulfingFinder: {
33
38
  defaultInputs: BullishEngulfingFinderInputs;
34
39
  inputConfig: InputConfig[];
35
40
  plotConfig: PlotConfig[];
41
+ hasAlertFunction: boolean;
36
42
  };
37
43
  //# sourceMappingURL=bullish-engulfing-finder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bullish-engulfing-finder.d.ts","sourceRoot":"","sources":["../../src/community/bullish-engulfing-finder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,4BAA4B;CAAG;AAEhD,eAAO,MAAM,aAAa,EAAE,4BAAiC,CAAC;AAE9D,eAAO,MAAM,WAAW,EAAE,WAAW,EAAO,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,OAAO,GAAE,OAAO,CAAC,4BAA4B,CAAM,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,YAAY,EAAE,CAAA;CAAE,CA0BnL;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;CAAkE,CAAC"}
1
+ {"version":3,"file":"bullish-engulfing-finder.d.ts","sourceRoot":"","sources":["../../src/community/bullish-engulfing-finder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,uCAAuC;AACvC,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,MAAM,WAAW,4BAA4B;CAAG;AAEhD,eAAO,MAAM,aAAa,EAAE,4BAAiC,CAAC;AAE9D,eAAO,MAAM,WAAW,EAAE,WAAW,EAAO,CAAC;AAG7C,eAAO,MAAM,UAAU,EAAE,UAAU,EAAO,CAAC;AAE3C,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,GAAE,OAAO,CAAC,4BAA4B,CAAM,GAClD,eAAe,GAAG;IAAE,SAAS,EAAE,YAAY,EAAE,CAAC;IAAC,UAAU,EAAE,SAAS,EAAE,CAAA;CAAE,CAuB1E;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAAoF,CAAC"}
@@ -1,14 +1,15 @@
1
1
  /**
2
2
  * CM_TotalConsecutive_Up_Down_V2
3
3
  *
4
- * Overlay=false histogram showing consecutive bars since price moved down or up
5
- * (relative to midpoint or previous close). Additional optional overlays:
6
- * - Highest bar lookback period (midpoint and/or close)
7
- * - Standard deviation bands (midpoint and/or close)
8
- * - Moving average (midpoint and/or close)
9
- * Plus an hline at a configurable level.
4
+ * Histograms of the bars since the close was last above (red, "Price Down") / below (lime, "Price Up") the midpoint
5
+ * (hl2) of the bar before, or the close of the bar before when "Use Midpoint" is off or the midpoint count is 0 / na.
6
+ * Optional lines over the four counts (midpoint and close based, down and up): their highest over a lookback, their
7
+ * standard deviation times a multiple, their moving average (each drawn only where non-zero). A dashed yellow
8
+ * horizontal line at the "Horizontal Line" level.
10
9
  *
11
- * Reference: "Custom Indicator Clearly Shows If Bulls or Bears are in Control!"
10
+ * Version 1 plots have a default transparency of 35: the plot colours have an alpha of 0.65.
11
+ *
12
+ * Reference: "CM_TotalConsecutive_Up_Down_V2" by ChrisMoody
12
13
  */
13
14
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
14
15
  export interface BullsBearsInputs {
@@ -1 +1 @@
1
- {"version":3,"file":"bulls-bears-control.d.ts","sourceRoot":"","sources":["../../src/community/bulls-bears-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,gBAa3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAapC,CAAC;AAUF,eAAO,MAAM,UAAU,EAAE,UA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rows" inputs on).
17
17
  *
18
18
  * Reference: "CCI Stochastic" by Daveatt
19
- * Licence: Mozilla Public License 2.0, as the original Pine script (https://mozilla.org/MPL/2.0/).
20
19
  */
21
20
  import { type IndicatorResult, type InputConfig, type PlotConfig, type HLineConfig, type FillConfig, type Bar } from 'oakscriptjs';
22
21
  import type { MarkerData } from '../types';
@@ -40,7 +39,10 @@ export declare const defaultInputs: CCIStochasticInputs;
40
39
  export declare const inputConfig: InputConfig[];
41
40
  export declare const plotConfig: PlotConfig[];
42
41
  export declare const hlineConfig: HLineConfig[];
43
- /** fill(maxLevelPlot, overbought) and fill(minLevelPlot, oversold): the colour changes per bar (result `fills`) */
42
+ /**
43
+ * fill(maxLevelPlot, overbought) and fill(minLevelPlot, oversold), untitled ("Hlines Background"): the colour changes
44
+ * per bar (result `fills`)
45
+ */
44
46
  export declare const fillConfig: FillConfig[];
45
47
  export declare const metadata: {
46
48
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"cci-stochastic.d.ts","sourceRoot":"","sources":["../../src/community/cci-stochastic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EACrG,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAe,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,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* Chandelier Exit
3
3
  *
4
- * Long stop: highest(length) - ATR*mult
5
- * Short stop: lowest(length) + ATR*mult
4
+ * Long stop: highest(length) - ATR*mult, short stop: lowest(length) + ATR*mult (the highest / lowest close with
5
+ * "Use Close for Extremums"). The stops ratchet: the long stop never falls while the previous close is above it, the
6
+ * short stop never rises while the previous close is below it. The direction turns long when the close is above the
7
+ * previous short stop and short when it is below the previous long stop (it starts long).
8
+ * As in the original, the long stop is drawn while the direction is long and the short stop while it is short (lines
9
+ * with breaks); a circle at the stop and a Buy / Sell label ("Show Buy/Sell Labels") mark the bar where the direction
10
+ * turns; with "Highlight State" the area between ohlc4 and the stop of the direction is filled green / red (85 %
11
+ * transparent).
6
12
  *
7
- * Both lines are plotted continuously, as in the PineScript
8
- * `ta.chandelier()` library function. Direction state is still
9
- * tracked to drive buy/sell markers and the fill colors, but the plotted
10
- * series are never gated to NaN.
11
- *
12
- * Alerts (alertcondition, `alerts` of the result): 'CE Direction Change', 'CE Buy' and 'CE Sell', on the direction of
13
- * the original: the stops ratchet (the long stop never falls while the previous close is above it, the short stop
14
- * never rises while the previous close is below it) and the direction turns when the close crosses the previous
15
- * stop. With "Await Bar Confirmation" (default) an open last bar gives no alert: the state of the last bar is read
13
+ * Alerts (alertcondition, `alerts` of the result): 'CE Direction Change', 'CE Buy' and 'CE Sell', on the same
14
+ * direction. With "Await Bar Confirmation" (default) an open last bar gives no alert: the state of the last bar is read
16
15
  * from the optional third argument (see src/chart-context.ts); without it every bar is taken as closed.
17
16
  */
18
17
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
@@ -23,6 +22,10 @@ export interface ChandelierExitInputs {
23
22
  atrPeriod: number;
24
23
  atrMult: number;
25
24
  useClose: boolean;
25
+ /** Show Buy/Sell Labels */
26
+ showLabels: boolean;
27
+ /** Highlight State: fill between ohlc4 and the stop of the direction */
28
+ highlightState: boolean;
26
29
  /** The alerts wait for the bar to close */
27
30
  awaitBarConfirmation: boolean;
28
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chandelier-exit.d.ts","sourceRoot":"","sources":["../../src/community/chandelier-exit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAe,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,aAAa,EAAE,oBAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAKpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAOF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,oBAAoB,CAAM,EAC1C,KAAK,CAAC,EAAE,YAAY,GACnB,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAAE,CA8HlG;AAED,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAI/C,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;CAAmF,CAAC"}
1
+ {"version":3,"file":"chandelier-exit.d.ts","sourceRoot":"","sources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  /**
2
2
  * CM Gann Swing High Low V2
3
3
  *
4
- * Gann swing high/low detection. Tracks the highest high and lowest low
5
- * over a lookback period as step-style swing lines.
4
+ * Swing direction from the close against the moving averages of the highs and lows of the previous bar: +1 when the
5
+ * close is above the SMA of the highs, -1 when it is below the SMA of the lows, 0 otherwise. The direction used is
6
+ * the one of the non-zero bar before the last one (valuewhen(hld != 0, hld, 1)). In a down swing (-1) the SMA of the
7
+ * highs is the swing high, in an up swing (+1) the SMA of the lows is the swing low.
6
8
  *
7
- * Reference: "CM_Gann Swing High Low V2" by ChrisMoody (community)
9
+ * Draws the swing high (fuchsia) and the swing low (lime) as broken lines ("circles" plots, on by default), optional
10
+ * triangles above / below the bars on them (off by default), triangles at the top / bottom of the pane on each bar of
11
+ * a swing high / low (on by default), a green / red background on the bars closing across the swing high / low (on by
12
+ * default) and yellow bars on these crosses (off by default).
13
+ *
14
+ * Reference: "CM_Gann Swing HighLow V2" by ChrisMoody (created with Glaz)
8
15
  */
9
16
  import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
17
+ import type { MarkerData, BarColorData, BgColorData } from '../types';
10
18
  export interface CMGannSwingInputs {
19
+ /** Moving Average Period */
11
20
  length: number;
21
+ /** Plot Up/Down Triangles at Top and Bottom of Candles/Bars? */
22
+ pt: boolean;
23
+ /** Plot Circles at Top and Bottom of Candles/Bars? */
24
+ pc: boolean;
25
+ /** Plot Triangles at Top and Bottom of Screen? */
26
+ pttb: boolean;
27
+ /** Show Highlight Bars on Cross Up or Cross Down? */
28
+ shb: boolean;
29
+ /** Show Background Highlights at Cross Up or Cross Down? */
30
+ sbh: boolean;
12
31
  }
13
32
  export declare const defaultInputs: CMGannSwingInputs;
14
33
  export declare const inputConfig: InputConfig[];
@@ -18,7 +37,11 @@ export declare const metadata: {
18
37
  shortTitle: string;
19
38
  overlay: boolean;
20
39
  };
21
- export declare function calculate(bars: Bar[], inputs?: Partial<CMGannSwingInputs>): Omit<IndicatorResult, 'markers'>;
40
+ export declare function calculate(bars: Bar[], inputs?: Partial<CMGannSwingInputs>): Omit<IndicatorResult, 'markers'> & {
41
+ markers: MarkerData[];
42
+ barColors: BarColorData[];
43
+ bgColors: BgColorData[];
44
+ };
22
45
  export declare const CMGannSwing: {
23
46
  calculate: typeof calculate;
24
47
  metadata: {
@@ -1 +1 @@
1
- {"version":3,"file":"cm-gann-swing.d.ts","sourceRoot":"","sources":["../../src/community/cm-gann-swing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAG5G,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,iBAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAEpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAsHhH;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAAkE,CAAC"}
1
+ {"version":3,"file":"cm-gann-swing.d.ts","sourceRoot":"","sources":["../../src/community/cm-gann-swing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA8B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAC5H,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,EAAE,EAAE,OAAO,CAAC;IACZ,sDAAsD;IACtD,EAAE,EAAE,OAAO,CAAC;IACZ,kDAAkD;IAClD,IAAI,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,GAAG,EAAE,OAAO,CAAC;IACb,4DAA4D;IAC5D,GAAG,EAAE,OAAO,CAAC;CACd;AAED,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAOpC,CAAC;AASF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM,GACtC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,SAAS,EAAE,YAAY,EAAE,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAkElH;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CAAkE,CAAC"}
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * CM RSI-2 Strategy Lower
3
3
  *
4
- * RSI(2) oscillator displayed as histogram.
5
- * < 10 green, > 90 red, else gray.
4
+ * The 2-bar RSI of the close (Larry Connors' RSI-2 strategy), the lower pane of the strategy: averages of the gains
5
+ * and the losses by rma over 2 bars. The line is lime when the close is above its 200-bar SMA, under its 5-bar SMA and
6
+ * the RSI below 10 (buy setup), red when the close is under the 200 SMA, above the 5 SMA and the RSI above 90 (sell
7
+ * setup), silver otherwise. Level lines at 100, 0, 90 and 10, the zone between 90 and 10 filled silver.
6
8
  *
7
- * Reference: "CM_RSI-2 Strategy Lower" by ChrisMoody
9
+ * Reference: "_CM_RSI_2_Strat_Low" by ChrisMoody
8
10
  */
9
- import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
10
- export interface CMRSI2LowerInputs {
11
- rsiLen: number;
12
- src: SourceType;
13
- }
11
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
12
+ /** The original has no inputs */
13
+ export type CMRSI2LowerInputs = Record<string, never>;
14
14
  export declare const defaultInputs: CMRSI2LowerInputs;
15
15
  export declare const inputConfig: InputConfig[];
16
16
  export declare const plotConfig: PlotConfig[];
@@ -19,7 +19,7 @@ export declare const metadata: {
19
19
  shortTitle: string;
20
20
  overlay: boolean;
21
21
  };
22
- export declare function calculate(bars: Bar[], inputs?: Partial<CMRSI2LowerInputs>): IndicatorResult;
22
+ export declare function calculate(bars: Bar[], _inputs?: Partial<CMRSI2LowerInputs>): IndicatorResult;
23
23
  export declare const CMRSI2Lower: {
24
24
  calculate: typeof calculate;
25
25
  metadata: {
@@ -1 +1 @@
1
- {"version":3,"file":"cm-rsi-2-lower.d.ts","sourceRoot":"","sources":["../../src/community/cm-rsi-2-lower.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA+B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9I,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,iBAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,iBAAiB,CAAM,GAAG,eAAe,CA0C/F;AAED,eAAO,MAAM,WAAW;;;;;;;;;;CA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