lightweight-charts-indicators 0.11.0 → 0.12.0

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 (313) hide show
  1. package/README.md +41 -4
  2. package/dist/anchor-period.d.ts +7 -6
  3. package/dist/anchor-period.d.ts.map +1 -1
  4. package/dist/chart-context.d.ts +34 -4
  5. package/dist/chart-context.d.ts.map +1 -1
  6. package/dist/community/1-2-3-pattern.d.ts +53 -0
  7. package/dist/community/1-2-3-pattern.d.ts.map +1 -0
  8. package/dist/community/10x-bull-vs-bear-vp-intraday-sessions.d.ts +122 -0
  9. package/dist/community/10x-bull-vs-bear-vp-intraday-sessions.d.ts.map +1 -0
  10. package/dist/community/abc-on-recursive-zigzag.d.ts +71 -0
  11. package/dist/community/abc-on-recursive-zigzag.d.ts.map +1 -0
  12. package/dist/community/ag-fx-watermark.d.ts +65 -0
  13. package/dist/community/ag-fx-watermark.d.ts.map +1 -0
  14. package/dist/community/alphatrend-screener.d.ts +135 -0
  15. package/dist/community/alphatrend-screener.d.ts.map +1 -0
  16. package/dist/community/angle-attack-follow-line-indicator.d.ts +121 -0
  17. package/dist/community/angle-attack-follow-line-indicator.d.ts.map +1 -0
  18. package/dist/community/atr-bands.d.ts +61 -0
  19. package/dist/community/atr-bands.d.ts.map +1 -0
  20. package/dist/community/auto-fib-channels-by-dgt.d.ts +85 -0
  21. package/dist/community/auto-fib-channels-by-dgt.d.ts.map +1 -0
  22. package/dist/community/auto-fib-speed-resistance-fans-by-dgt.d.ts +98 -0
  23. package/dist/community/auto-fib-speed-resistance-fans-by-dgt.d.ts.map +1 -0
  24. package/dist/community/auto-trendlines-support-resistance-signal.d.ts +168 -0
  25. package/dist/community/auto-trendlines-support-resistance-signal.d.ts.map +1 -0
  26. package/dist/community/better-volume.d.ts +12 -5
  27. package/dist/community/better-volume.d.ts.map +1 -1
  28. package/dist/community/breakout-and-retest-signals.d.ts +78 -0
  29. package/dist/community/breakout-and-retest-signals.d.ts.map +1 -0
  30. package/dist/community/breakout-pattern-setup.d.ts +88 -0
  31. package/dist/community/breakout-pattern-setup.d.ts.map +1 -0
  32. package/dist/community/btcusdshorts-btcusdlongs-bitfinex-btc-shorts.d.ts +38 -0
  33. package/dist/community/btcusdshorts-btcusdlongs-bitfinex-btc-shorts.d.ts.map +1 -0
  34. package/dist/community/candle-range-theory-flux-charts.d.ts +96 -0
  35. package/dist/community/candle-range-theory-flux-charts.d.ts.map +1 -0
  36. package/dist/community/candlestick-structure.d.ts +89 -0
  37. package/dist/community/candlestick-structure.d.ts.map +1 -0
  38. package/dist/community/cci-stochastic.d.ts +29 -9
  39. package/dist/community/cci-stochastic.d.ts.map +1 -1
  40. package/dist/community/cd-average-daily-range-zones-highs-and-lows.d.ts +41 -0
  41. package/dist/community/cd-average-daily-range-zones-highs-and-lows.d.ts.map +1 -0
  42. package/dist/community/channels-with-patterns.d.ts +97 -0
  43. package/dist/community/channels-with-patterns.d.ts.map +1 -0
  44. package/dist/community/clusters-volume-profile.d.ts +57 -0
  45. package/dist/community/clusters-volume-profile.d.ts.map +1 -0
  46. package/dist/community/cm-high-low-open-close-weekly-intraday.d.ts +70 -0
  47. package/dist/community/cm-high-low-open-close-weekly-intraday.d.ts.map +1 -0
  48. package/dist/community/cm-ultimate-ma-mtf-v4.d.ts +85 -0
  49. package/dist/community/cm-ultimate-ma-mtf-v4.d.ts.map +1 -0
  50. package/dist/community/comprehensive-trading-toolkit.d.ts +85 -0
  51. package/dist/community/comprehensive-trading-toolkit.d.ts.map +1 -0
  52. package/dist/community/consolidation-range-with-signals.d.ts +76 -0
  53. package/dist/community/consolidation-range-with-signals.d.ts.map +1 -0
  54. package/dist/community/cumulative-volume-delta-strategy-flux-charts.d.ts +104 -0
  55. package/dist/community/cumulative-volume-delta-strategy-flux-charts.d.ts.map +1 -0
  56. package/dist/community/decisionpoint-volume-swenlin-trading.d.ts +54 -0
  57. package/dist/community/decisionpoint-volume-swenlin-trading.d.ts.map +1 -0
  58. package/dist/community/delta-zones-buy-sell-pressure.d.ts +121 -0
  59. package/dist/community/delta-zones-buy-sell-pressure.d.ts.map +1 -0
  60. package/dist/community/deltaflow-volume-profile.d.ts +57 -0
  61. package/dist/community/deltaflow-volume-profile.d.ts.map +1 -0
  62. package/dist/community/divergence-screener.d.ts +87 -0
  63. package/dist/community/divergence-screener.d.ts.map +1 -0
  64. package/dist/community/dynamic-linear-regression-channels.d.ts +48 -0
  65. package/dist/community/dynamic-linear-regression-channels.d.ts.map +1 -0
  66. package/dist/community/dynamic-supply-and-demand-zones.d.ts +59 -0
  67. package/dist/community/dynamic-supply-and-demand-zones.d.ts.map +1 -0
  68. package/dist/community/eqh-eql-liquidity-zones.d.ts +60 -0
  69. package/dist/community/eqh-eql-liquidity-zones.d.ts.map +1 -0
  70. package/dist/community/fair-value-gap-absorption-indicator.d.ts +58 -0
  71. package/dist/community/fair-value-gap-absorption-indicator.d.ts.map +1 -0
  72. package/dist/community/fair-value-gaps-flux-charts.d.ts +60 -0
  73. package/dist/community/fair-value-gaps-flux-charts.d.ts.map +1 -0
  74. package/dist/community/fibonacci-time-price-zones.d.ts +100 -0
  75. package/dist/community/fibonacci-time-price-zones.d.ts.map +1 -0
  76. package/dist/community/future-trend-channel.d.ts +53 -0
  77. package/dist/community/future-trend-channel.d.ts.map +1 -0
  78. package/dist/community/gaps-imbalances-wicks-by-leviathan.d.ts +90 -0
  79. package/dist/community/gaps-imbalances-wicks-by-leviathan.d.ts.map +1 -0
  80. package/dist/community/ghost-tangent-crossings.d.ts +2 -1
  81. package/dist/community/ghost-tangent-crossings.d.ts.map +1 -1
  82. package/dist/community/global-liquidity-index.d.ts +90 -0
  83. package/dist/community/global-liquidity-index.d.ts.map +1 -0
  84. package/dist/community/global-monetary-supply-m2.d.ts +54 -0
  85. package/dist/community/global-monetary-supply-m2.d.ts.map +1 -0
  86. package/dist/community/godmode-4-0-2.d.ts +72 -0
  87. package/dist/community/godmode-4-0-2.d.ts.map +1 -0
  88. package/dist/community/halftrend-long-short-signal-engine.d.ts +84 -0
  89. package/dist/community/halftrend-long-short-signal-engine.d.ts.map +1 -0
  90. package/dist/community/hash-ribbons.d.ts +70 -0
  91. package/dist/community/hash-ribbons.d.ts.map +1 -0
  92. package/dist/community/high-volume-points.d.ts +61 -0
  93. package/dist/community/high-volume-points.d.ts.map +1 -0
  94. package/dist/community/higher-time-frame-support-resistance.d.ts +82 -0
  95. package/dist/community/higher-time-frame-support-resistance.d.ts.map +1 -0
  96. package/dist/community/htf-reversal-divergences.d.ts +80 -0
  97. package/dist/community/htf-reversal-divergences.d.ts.map +1 -0
  98. package/dist/community/ichimoku-kink-hy.d.ts +228 -0
  99. package/dist/community/ichimoku-kink-hy.d.ts.map +1 -0
  100. package/dist/community/ict-algorithmic-macro-tracker-by-toodegrees.d.ts +81 -0
  101. package/dist/community/ict-algorithmic-macro-tracker-by-toodegrees.d.ts.map +1 -0
  102. package/dist/community/ict-anchored-market-structures-with-validation.d.ts +82 -0
  103. package/dist/community/ict-anchored-market-structures-with-validation.d.ts.map +1 -0
  104. package/dist/community/ict-auto-validated-smc.d.ts +151 -0
  105. package/dist/community/ict-auto-validated-smc.d.ts.map +1 -0
  106. package/dist/community/ict-everything.d.ts +220 -0
  107. package/dist/community/ict-everything.d.ts.map +1 -0
  108. package/dist/community/ict-implied-fair-value-gap.d.ts +50 -0
  109. package/dist/community/ict-implied-fair-value-gap.d.ts.map +1 -0
  110. package/dist/community/ict-killzones.d.ts +79 -0
  111. package/dist/community/ict-killzones.d.ts.map +1 -0
  112. package/dist/community/ict-seek-destroy-profile.d.ts +78 -0
  113. package/dist/community/ict-seek-destroy-profile.d.ts.map +1 -0
  114. package/dist/community/ift-stoch-rsi-cci.d.ts +26 -8
  115. package/dist/community/ift-stoch-rsi-cci.d.ts.map +1 -1
  116. package/dist/community/indicator-elder-impulse-system.d.ts +57 -0
  117. package/dist/community/indicator-elder-impulse-system.d.ts.map +1 -0
  118. package/dist/community/institutional-orderblock-pressure.d.ts +65 -0
  119. package/dist/community/institutional-orderblock-pressure.d.ts.map +1 -0
  120. package/dist/community/kalman-trend-levels.d.ts +57 -0
  121. package/dist/community/kalman-trend-levels.d.ts.map +1 -0
  122. package/dist/community/linear-regression.d.ts +73 -0
  123. package/dist/community/linear-regression.d.ts.map +1 -0
  124. package/dist/community/liquidations-zones.d.ts +62 -0
  125. package/dist/community/liquidations-zones.d.ts.map +1 -0
  126. package/dist/community/liquidity-location-detector.d.ts +65 -0
  127. package/dist/community/liquidity-location-detector.d.ts.map +1 -0
  128. package/dist/community/liquidity-trendline-with-signals.d.ts +58 -0
  129. package/dist/community/liquidity-trendline-with-signals.d.ts.map +1 -0
  130. package/dist/community/logistic-rsi-stoch-roc-ao-by-dgt.d.ts +87 -0
  131. package/dist/community/logistic-rsi-stoch-roc-ao-by-dgt.d.ts.map +1 -0
  132. package/dist/community/lowess.d.ts +58 -0
  133. package/dist/community/lowess.d.ts.map +1 -0
  134. package/dist/community/luxy-big-beautiful-dynamic-orb.d.ts +179 -0
  135. package/dist/community/luxy-big-beautiful-dynamic-orb.d.ts.map +1 -0
  136. package/dist/community/macd-rsi-overlay.d.ts +66 -0
  137. package/dist/community/macd-rsi-overlay.d.ts.map +1 -0
  138. package/dist/community/machine-learning-rsi-ai-classification-ranking.d.ts +102 -0
  139. package/dist/community/machine-learning-rsi-ai-classification-ranking.d.ts.map +1 -0
  140. package/dist/community/market-cipher-a-free-version-1-1.d.ts +45 -0
  141. package/dist/community/market-cipher-a-free-version-1-1.d.ts.map +1 -0
  142. package/dist/community/market-cipher-b-free-version-with-buy-and-sell.d.ts +47 -0
  143. package/dist/community/market-cipher-b-free-version-with-buy-and-sell.d.ts.map +1 -0
  144. package/dist/community/market-profile-with-tpo.d.ts.map +1 -1
  145. package/dist/community/market-sentiment-technicals.d.ts.map +1 -1
  146. package/dist/community/market-sessions-by-leviathan.d.ts.map +1 -1
  147. package/dist/community/market-structures-zigzag-choch-bos-mss-msb.d.ts +82 -0
  148. package/dist/community/market-structures-zigzag-choch-bos-mss-msb.d.ts.map +1 -0
  149. package/dist/community/mix1-ema-cross-trend-channel.d.ts +75 -0
  150. package/dist/community/mix1-ema-cross-trend-channel.d.ts.map +1 -0
  151. package/dist/community/most-moving-average-screener.d.ts +99 -0
  152. package/dist/community/most-moving-average-screener.d.ts.map +1 -0
  153. package/dist/community/mtf-break-of-structure-market-structure-shift.d.ts +112 -0
  154. package/dist/community/mtf-break-of-structure-market-structure-shift.d.ts.map +1 -0
  155. package/dist/community/multi-layer-volume-profile.d.ts +60 -0
  156. package/dist/community/multi-layer-volume-profile.d.ts.map +1 -0
  157. package/dist/community/multi-time-frame-candles-with-volume-info-3d.d.ts +66 -0
  158. package/dist/community/multi-time-frame-candles-with-volume-info-3d.d.ts.map +1 -0
  159. package/dist/community/multi-timeframe-support-and-resistance.d.ts +62 -0
  160. package/dist/community/multi-timeframe-support-and-resistance.d.ts.map +1 -0
  161. package/dist/community/multpile-strategies.d.ts +160 -0
  162. package/dist/community/multpile-strategies.d.ts.map +1 -0
  163. package/dist/community/n-bar-reversal-detector.d.ts +72 -0
  164. package/dist/community/n-bar-reversal-detector.d.ts.map +1 -0
  165. package/dist/community/normalized-quantitative-qualitative.d.ts +47 -0
  166. package/dist/community/normalized-quantitative-qualitative.d.ts.map +1 -0
  167. package/dist/community/nr4-nr7-with-breakouts.d.ts +58 -0
  168. package/dist/community/nr4-nr7-with-breakouts.d.ts.map +1 -0
  169. package/dist/community/one-shot-one-kill-ict-liquidity-mmxm-cisd-ote.d.ts +66 -0
  170. package/dist/community/one-shot-one-kill-ict-liquidity-mmxm-cisd-ote.d.ts.map +1 -0
  171. package/dist/community/open-close-cross-alerts-norepaint-version-by.d.ts +59 -0
  172. package/dist/community/open-close-cross-alerts-norepaint-version-by.d.ts.map +1 -0
  173. package/dist/community/open-interest-stochastic-money-flow-index.d.ts +71 -0
  174. package/dist/community/open-interest-stochastic-money-flow-index.d.ts.map +1 -0
  175. package/dist/community/open-interest-suite-by-leviathan.d.ts +122 -0
  176. package/dist/community/open-interest-suite-by-leviathan.d.ts.map +1 -0
  177. package/dist/community/open-liquidity-heatmap.d.ts +66 -0
  178. package/dist/community/open-liquidity-heatmap.d.ts.map +1 -0
  179. package/dist/community/order-block-finder-gold-projectsyndicate.d.ts +66 -0
  180. package/dist/community/order-block-finder-gold-projectsyndicate.d.ts.map +1 -0
  181. package/dist/community/order-blocks-finder-major-ob-supply-and-demand.d.ts +84 -0
  182. package/dist/community/order-blocks-finder-major-ob-supply-and-demand.d.ts.map +1 -0
  183. package/dist/community/order-blocks-volume-delta-3d-flux-charts.d.ts +93 -0
  184. package/dist/community/order-blocks-volume-delta-3d-flux-charts.d.ts.map +1 -0
  185. package/dist/community/order-blocks-w-realtime-fibs.d.ts +94 -0
  186. package/dist/community/order-blocks-w-realtime-fibs.d.ts.map +1 -0
  187. package/dist/community/periodic-linear-regressions.d.ts +76 -0
  188. package/dist/community/periodic-linear-regressions.d.ts.map +1 -0
  189. package/dist/community/pivot-trendlines-with-breaks.d.ts +69 -0
  190. package/dist/community/pivot-trendlines-with-breaks.d.ts.map +1 -0
  191. package/dist/community/premium-discount-delta-volume.d.ts +61 -0
  192. package/dist/community/premium-discount-delta-volume.d.ts.map +1 -0
  193. package/dist/community/previous-day-high-and-low-separators-daily.d.ts +74 -0
  194. package/dist/community/previous-day-high-and-low-separators-daily.d.ts.map +1 -0
  195. package/dist/community/previous-day-week-highs-lows.d.ts +74 -0
  196. package/dist/community/previous-day-week-highs-lows.d.ts.map +1 -0
  197. package/dist/community/price-divergence-detector.d.ts +22 -9
  198. package/dist/community/price-divergence-detector.d.ts.map +1 -1
  199. package/dist/community/protected-highs-lows.d.ts +74 -0
  200. package/dist/community/protected-highs-lows.d.ts.map +1 -0
  201. package/dist/community/pure-price-action-order-breaker-blocks.d.ts +58 -0
  202. package/dist/community/pure-price-action-order-breaker-blocks.d.ts.map +1 -0
  203. package/dist/community/r-trend-exhaustion.d.ts +103 -0
  204. package/dist/community/r-trend-exhaustion.d.ts.map +1 -0
  205. package/dist/community/range-average-retest-model.d.ts +73 -0
  206. package/dist/community/range-average-retest-model.d.ts.map +1 -0
  207. package/dist/community/range-breakout.d.ts +61 -0
  208. package/dist/community/range-breakout.d.ts.map +1 -0
  209. package/dist/community/renko-moving-average-rmi-alert-r3-by.d.ts +72 -0
  210. package/dist/community/renko-moving-average-rmi-alert-r3-by.d.ts.map +1 -0
  211. package/dist/community/retest-support-resistance-signals.d.ts +59 -0
  212. package/dist/community/retest-support-resistance-signals.d.ts.map +1 -0
  213. package/dist/community/reversal-trap-probability-bands.d.ts +69 -0
  214. package/dist/community/reversal-trap-probability-bands.d.ts.map +1 -0
  215. package/dist/community/rsi-multi-length.d.ts +63 -0
  216. package/dist/community/rsi-multi-length.d.ts.map +1 -0
  217. package/dist/community/rsi-strategy.d.ts +41 -0
  218. package/dist/community/rsi-strategy.d.ts.map +1 -0
  219. package/dist/community/screener-mean-reversion-channel.d.ts +94 -0
  220. package/dist/community/screener-mean-reversion-channel.d.ts.map +1 -0
  221. package/dist/community/session-streaks.d.ts +68 -0
  222. package/dist/community/session-streaks.d.ts.map +1 -0
  223. package/dist/community/sessions-on-chart.d.ts +2 -0
  224. package/dist/community/sessions-on-chart.d.ts.map +1 -1
  225. package/dist/community/smart-breakout-targets.d.ts +114 -0
  226. package/dist/community/smart-breakout-targets.d.ts.map +1 -0
  227. package/dist/community/smart-money-range.d.ts +62 -0
  228. package/dist/community/smart-money-range.d.ts.map +1 -0
  229. package/dist/community/smc-indicator-with-webhook.d.ts +81 -0
  230. package/dist/community/smc-indicator-with-webhook.d.ts.map +1 -0
  231. package/dist/community/smt-divergences.d.ts +71 -0
  232. package/dist/community/smt-divergences.d.ts.map +1 -0
  233. package/dist/community/squeeze-momentum-indicator-version2-by-k-van.d.ts +50 -0
  234. package/dist/community/squeeze-momentum-indicator-version2-by-k-van.d.ts.map +1 -0
  235. package/dist/community/ssl-hybrid-advanced.d.ts +168 -0
  236. package/dist/community/ssl-hybrid-advanced.d.ts.map +1 -0
  237. package/dist/community/stc-indicator-a-better-macd.d.ts +43 -0
  238. package/dist/community/stc-indicator-a-better-macd.d.ts.map +1 -0
  239. package/dist/community/std-filtered-n-pole-gaussian-filter.d.ts +69 -0
  240. package/dist/community/std-filtered-n-pole-gaussian-filter.d.ts.map +1 -0
  241. package/dist/community/strong-demands-supplies-liquidity-zonas-de.d.ts +70 -0
  242. package/dist/community/strong-demands-supplies-liquidity-zonas-de.d.ts.map +1 -0
  243. package/dist/community/supertrend-mtf-heikin-ashi.d.ts +51 -0
  244. package/dist/community/supertrend-mtf-heikin-ashi.d.ts.map +1 -0
  245. package/dist/community/supertrend-oscillator.d.ts +60 -0
  246. package/dist/community/supertrend-oscillator.d.ts.map +1 -0
  247. package/dist/community/supply-and-demand-anchored.d.ts +76 -0
  248. package/dist/community/supply-and-demand-anchored.d.ts.map +1 -0
  249. package/dist/community/supply-demand-profiles.d.ts +106 -0
  250. package/dist/community/supply-demand-profiles.d.ts.map +1 -0
  251. package/dist/community/support-resistance-classification.d.ts +112 -0
  252. package/dist/community/support-resistance-classification.d.ts.map +1 -0
  253. package/dist/community/swing-breakout-sequence.d.ts +70 -0
  254. package/dist/community/swing-breakout-sequence.d.ts.map +1 -0
  255. package/dist/community/swing-failure-signals.d.ts +59 -0
  256. package/dist/community/swing-failure-signals.d.ts.map +1 -0
  257. package/dist/community/swingarm-atr-trend-indicator.d.ts +48 -0
  258. package/dist/community/swingarm-atr-trend-indicator.d.ts.map +1 -0
  259. package/dist/community/targets-for-many-indicators.d.ts +111 -0
  260. package/dist/community/targets-for-many-indicators.d.ts.map +1 -0
  261. package/dist/community/targets-for-overlay-indicators.d.ts +79 -0
  262. package/dist/community/targets-for-overlay-indicators.d.ts.map +1 -0
  263. package/dist/community/technical-ratings.d.ts +101 -0
  264. package/dist/community/technical-ratings.d.ts.map +1 -0
  265. package/dist/community/the-next-pivot.d.ts +75 -0
  266. package/dist/community/the-next-pivot.d.ts.map +1 -0
  267. package/dist/community/trailing-stop-loss-indicator-by-k-van-fr3762.d.ts +42 -0
  268. package/dist/community/trailing-stop-loss-indicator-by-k-van-fr3762.d.ts.map +1 -0
  269. package/dist/community/trend-lines-for-rsi-cci-momentum-obv.d.ts +59 -0
  270. package/dist/community/trend-lines-for-rsi-cci-momentum-obv.d.ts.map +1 -0
  271. package/dist/community/trend-meter.d.ts +64 -0
  272. package/dist/community/trend-meter.d.ts.map +1 -0
  273. package/dist/community/trend-range-detector.d.ts +46 -0
  274. package/dist/community/trend-range-detector.d.ts.map +1 -0
  275. package/dist/community/trendline-breakout-navigator.d.ts.map +1 -1
  276. package/dist/community/true-breakout-pattern-breakout-signal.d.ts +74 -0
  277. package/dist/community/true-breakout-pattern-breakout-signal.d.ts.map +1 -0
  278. package/dist/community/turtle-soup-ict-strategy-fvg-choch-csd.d.ts +84 -0
  279. package/dist/community/turtle-soup-ict-strategy-fvg-choch-csd.d.ts.map +1 -0
  280. package/dist/community/twin-range-filter-visualized.d.ts +50 -0
  281. package/dist/community/twin-range-filter-visualized.d.ts.map +1 -0
  282. package/dist/community/vdub-trend-master-v-v1-v2-v3.d.ts +84 -0
  283. package/dist/community/vdub-trend-master-v-v1-v2-v3.d.ts.map +1 -0
  284. package/dist/community/vdubus-divergence-wave-pattern-generator-v1.d.ts +83 -0
  285. package/dist/community/vdubus-divergence-wave-pattern-generator-v1.d.ts.map +1 -0
  286. package/dist/community/volumatic-fair-value-gaps.d.ts +64 -0
  287. package/dist/community/volumatic-fair-value-gaps.d.ts.map +1 -0
  288. package/dist/community/volume-open-interest-footprint-by-leviathan.d.ts +117 -0
  289. package/dist/community/volume-open-interest-footprint-by-leviathan.d.ts.map +1 -0
  290. package/dist/community/volume-profile-free-pro-by-rrb.d.ts +134 -0
  291. package/dist/community/volume-profile-free-pro-by-rrb.d.ts.map +1 -0
  292. package/dist/community/volume-profile-kv4coins.d.ts.map +1 -1
  293. package/dist/community/vwap-periodic-close.d.ts +80 -0
  294. package/dist/community/vwap-periodic-close.d.ts.map +1 -0
  295. package/dist/community/vwap-stdev-bands-v2-mod.d.ts +12 -2
  296. package/dist/community/vwap-stdev-bands-v2-mod.d.ts.map +1 -1
  297. package/dist/community/vwap-volume-profile.d.ts +61 -0
  298. package/dist/community/vwap-volume-profile.d.ts.map +1 -0
  299. package/dist/community/wavetrend-oscillator-divergence-direction.d.ts +79 -0
  300. package/dist/community/wavetrend-oscillator-divergence-direction.d.ts.map +1 -0
  301. package/dist/community/zero-lag-ema.d.ts +9 -13
  302. package/dist/community/zero-lag-ema.d.ts.map +1 -1
  303. package/dist/community/zigzag-multiple-methods-forecast-patterns.d.ts +89 -0
  304. package/dist/community/zigzag-multiple-methods-forecast-patterns.d.ts.map +1 -0
  305. package/dist/community/zigzag-trend-divergence-detector.d.ts +78 -0
  306. package/dist/community/zigzag-trend-divergence-detector.d.ts.map +1 -0
  307. package/dist/index.cjs +79999 -26250
  308. package/dist/index.d.ts +292 -4
  309. package/dist/index.d.ts.map +1 -1
  310. package/dist/index.mjs +91016 -36063
  311. package/dist/other-symbol.d.ts +43 -0
  312. package/dist/other-symbol.d.ts.map +1 -0
  313. package/package.json +4 -4
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **[Live Demo](https://deepentropy.github.io/lightweight-charts-indicators/)**
4
4
 
5
- 1551 technical analysis indicators for the lightweight-charts library — 95 standard indicators, 1411 community indicators, and 45 candlestick patterns. PineScript v6 compatible with full drawing primitive support (lines, boxes, labels, tables).
5
+ 1691 technical analysis indicators for the lightweight-charts library — 95 standard indicators, 1551 community indicators, and 45 candlestick patterns. PineScript v6 compatible with full drawing primitive support (lines, boxes, labels, tables).
6
6
 
7
7
  ## Installation
8
8
 
@@ -10,6 +10,9 @@
10
10
  npm install lightweight-charts-indicators oakscriptjs lightweight-charts
11
11
  ```
12
12
 
13
+ `oakscriptjs` is a peer dependency: version 0.11.1 or later, below 0.12. `lightweight-charts` 5 is only needed for
14
+ the renderer.
15
+
13
16
  ## Quick Start
14
17
 
15
18
  ```typescript
@@ -66,6 +69,40 @@ A few indicators draw from the bars visible on the chart. Give the time (in ms)
66
69
  `leftVisibleBarTime` and `rightVisibleBarTime` (fallback: all the bars); their registry entry has
67
70
  `usesVisibleRange: true`, so calculate them again when the user scrolls or zooms the chart.
68
71
 
72
+ **Other symbols.** Some indicators read the bars of another symbol, e.g. an index to compare with. The app gives
73
+ them with `bars(symbol, timeframe)` in the context, from its own cache, in the time unit of the chart bars. When bars
74
+ are missing, `calculate` throws a `MissingSymbolDataError`. Its `requests` list every symbol and timeframe needed.
75
+ Load them, then calculate again. The registry entry of such an indicator has `requiredSymbols(inputs)`: call it to
76
+ preload the bars.
77
+
78
+ ```typescript
79
+ import { indicatorRegistry, MissingSymbolDataError, type ChartContext } from 'lightweight-charts-indicators';
80
+
81
+ const cache = new Map<string, Bar[]>(); // bars loaded by the app, by "symbol|timeframe"
82
+ const load = async (symbol: string, timeframe: string) => {
83
+ cache.set(`${symbol}|${timeframe}`, await fetchBars(symbol, timeframe)); // the app's own data feed
84
+ };
85
+ const chart: ChartContext = { timeframe: '1D', bars: (symbol, timeframe) => cache.get(`${symbol}|${timeframe}`) };
86
+
87
+ async function run(entry: (typeof indicatorRegistry)[number], inputs: Record<string, unknown>) {
88
+ for (const r of entry.requiredSymbols?.(inputs, chart) ?? []) await load(r.symbol, r.timeframe);
89
+ try {
90
+ return entry.calculate(bars, inputs, chart);
91
+ } catch (err) {
92
+ if (!(err instanceof MissingSymbolDataError)) throw err;
93
+ await Promise.all(err.requests.map((r) => load(r.symbol, r.timeframe)));
94
+ return entry.calculate(bars, inputs, chart);
95
+ }
96
+ }
97
+ ```
98
+
99
+ Give the exchange time zone and session of the other symbols with `symbolInfo(symbol)` in the context: the bars of a
100
+ stock requested on a crypto chart close and change trading day by its exchange hours. `MissingSymbolDataError`, the
101
+ context fields (`bars`, `symbolInfo`, `basecurrency`, `root`) and the merge come from oakscriptjs, so the same error
102
+ class is thrown by the ports and by `executeScript`. Ports align the other bars on the chart bars with
103
+ `securityOther(chartBars, otherBars, timeframe, otherSymbolChart(chartBars, chart), { other: chart.symbolInfo?.(symbol) })`
104
+ (`securityLowerTf` for `request.security_lower_tf`; spread symbols "A * B": `spreadBars`, see `src/other-symbol.ts`).
105
+
69
106
  ## Drawing Results with the Renderer
70
107
 
71
108
  `lightweight-charts-indicators/render` draws a complete indicator result (plots, fills, hlines, markers, arrows, bar
@@ -180,7 +217,7 @@ chart.timeScale().subscribeVisibleLogicalRangeChange(range => {
180
217
  });
181
218
  ```
182
219
 
183
- ## Available Indicators (638)
220
+ ## Available Indicators (1,691)
184
221
 
185
222
  ### Moving Averages
186
223
 
@@ -316,9 +353,9 @@ chart.timeScale().subscribeVisibleLogicalRangeChange(range => {
316
353
  | Colored Volume Bars | `ColoredVolume` | Volume colored by price/volume trend |
317
354
  | OBV MACD | `OBVMACD` | MACD applied to On Balance Volume |
318
355
 
319
- ### Community Indicators (498)
356
+ ### Community Indicators (1,551)
320
357
 
321
- 1411 community indicators ported from PineScript sources, covering trend systems, divergence detectors, multi-MA strategies, volume analysis, market structure, and more. Full list in [docs/INDICATOR_INVENTORY_COMMUNITY.md](docs/INDICATOR_INVENTORY_COMMUNITY.md).
358
+ 1551 community indicators ported from PineScript sources, covering trend systems, divergence detectors, multi-MA strategies, volume analysis, market structure, and more. Full list in [docs/INDICATOR_INVENTORY_COMMUNITY.md](docs/INDICATOR_INVENTORY_COMMUNITY.md).
322
359
 
323
360
  Categories include: Hyper Trend, AlphaTrend, HalfTrend, QQE MOD, Hull Suite, SuperTrend variants, Market Structure Trailing Stop, Liquidity Levels, Order Blocks, ZigZag Fibonacci, Trendlines with Breaks, and many more.
324
361
 
@@ -12,8 +12,9 @@
12
12
  * `request.security`, `session.*`, `time_tradingday`), which have the PineScript rules: trading days from the
13
13
  * session and its holidays, sessions that cross midnight, "nD" counted in trading days from the first trading day of
14
14
  * the year, weeks from Monday, the start of a D / W / M period at the session start of its first trading day, an
15
- * intraday bar after an early close outside its day, and a higher-timeframe bar completed by the chart bar whose
16
- * close reaches the end of the period (`securityPeriods`).
15
+ * intraday bar after an early close outside its day and its intraday period for `time(tf)` (in the D / W / M bar of
16
+ * its day for `request.security`), and a higher-timeframe bar completed by the chart bar whose close reaches the end
17
+ * of the period (`securityPeriods`).
17
18
  * `chart.timeframe`, when given, is the chart timeframe; else it is taken from the bar spacing.
18
19
  *
19
20
  * Without the time zone or the session the port uses the UTC calendar and takes the session start of a trading day
@@ -43,9 +44,9 @@ export declare function hasCalendar(chart?: ChartContext): boolean;
43
44
  * times (seconds as lightweight-charts, or ms). A bar opens a new period (`timeframe.change(tf)`) when its value
44
45
  * differs from the previous bar's (see `periodChanges` for the exact PineScript rule). `tf` = "" (the chart
45
46
  * timeframe) gives the bar times.
46
- * With the exchange calendar, `time(tf)` is na on an intraday bar that opens after an early close of its day (D
47
- * periods): such a bar keeps the period of the bar before it; a bar for which the calendar finds no trading day is
48
- * its own period.
47
+ * With the exchange calendar, `time(tf)` is na on an intraday bar that opens after an early close of its day (D and
48
+ * intraday periods): such a bar keeps the period of the bar before it; a bar for which the calendar finds no trading
49
+ * day is its own period.
49
50
  * @throws RangeError for a string that is not a timeframe, or a tick timeframe
50
51
  */
51
52
  export declare function periodStarts(bars: ReadonlyArray<{
@@ -54,7 +55,7 @@ export declare function periodStarts(bars: ReadonlyArray<{
54
55
  /**
55
56
  * PineScript `timeframe.change(tf)` of each bar: true on a bar that opens a new `tf` period (false on the first bar).
56
57
  * With the exchange calendar it is the rule of the library: a bar whose `time(tf)` is na (an intraday bar after an
57
- * early close, for D periods) is no change, and neither is the bar after it. Else: `periodStarts` differs from the
58
+ * early close, for D and intraday periods) is no change, and neither is the bar after it. Else: `periodStarts` differs from the
58
59
  * previous bar's.
59
60
  * @throws RangeError for a string that is not a timeframe, or a tick timeframe
60
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"anchor-period.d.ts","sourceRoot":"","sources":["../src/anchor-period.ts"],"names":[],"m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,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CAG7G;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE,GAAG,IAAI,CAGxG;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAcnH;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAkBlH"}
@@ -3,11 +3,22 @@
3
3
  * third argument of `calculate(bars, inputs, chart)`.
4
4
  *
5
5
  * It is the oakscriptjs ChartContext (chart timeframe, exchange time zone, session, symbol tick, ticker id, symbol
6
- * type and currency, chart colours, current time, state of the last bar) with the visible range of the chart. Every
7
- * value is optional. Without a value the indicator uses the fallback given below, which is what it did before this
8
- * argument existed.
6
+ * type, currency, base currency and root, chart colours, current time, state of the last bar, and the bars and
7
+ * properties of other symbols) with the visible range of the chart. Every value is optional. Without a value the
8
+ * indicator uses the fallback given below, which is what it did before this argument existed.
9
+ *
10
+ * Other symbols (PineScript `request.security` of another ticker): `bars(symbol, timeframe)` gives the bars the caller
11
+ * has loaded for `symbol` ("NASDAQ:MSFT", "CRYPTOCAP:BTC") on `timeframe` (the timeframe the indicator asks for, the
12
+ * chart timeframe when the script uses `timeframe.period`), in the time unit of the chart bars, or `undefined` when it
13
+ * has not loaded them yet: the indicator then throws a `MissingSymbolDataError` that lists what it needs; load those
14
+ * bars and calculate again. `symbolInfo(symbol)` gives the exchange time zone and session of another symbol (when its
15
+ * bars close and which trading day they belong to) and its other properties. An indicator that reads other symbols has
16
+ * `requiredSymbols` in its registry entry.
9
17
  */
10
- import type { ChartContext as ScriptChartContext } from 'oakscriptjs/script';
18
+ import type { Bar } from 'oakscriptjs';
19
+ import { MissingSymbolDataError, type ChartContext as ScriptChartContext, type SymbolDataRequest, type SymbolInfo } from 'oakscriptjs/script';
20
+ export { MissingSymbolDataError };
21
+ export type { SymbolInfo };
11
22
  export interface ChartContext extends ScriptChartContext {
12
23
  /**
13
24
  * Time of the first bar visible on the chart, in ms (PineScript `chart.left_visible_bar_time`); fallback: the
@@ -21,6 +32,14 @@ export interface ChartContext extends ScriptChartContext {
21
32
  */
22
33
  rightVisibleBarTime?: number;
23
34
  }
35
+ /** Bars of another symbol that an indicator needs: `{ symbol, timeframe }` ("NASDAQ:MSFT", "1D") */
36
+ export type SymbolRequest = SymbolDataRequest;
37
+ /**
38
+ * Bars of other symbols from the chart context, all at once: throws one `MissingSymbolDataError` (the library error,
39
+ * as `executeScript` throws it) that lists every request the context cannot give, so that the caller loads them
40
+ * together.
41
+ */
42
+ export declare function symbolBarsOf(requests: SymbolRequest[], chart?: ChartContext): Bar[][];
24
43
  /** Symbol tick (PineScript `syminfo.mintick`); fallback 0.01 */
25
44
  export declare function mintickOf(chart?: ChartContext): number;
26
45
  /**
@@ -38,6 +57,17 @@ export declare function tickerOf(chart?: ChartContext): string;
38
57
  export declare function symbolTypeOf(chart?: ChartContext): string;
39
58
  /** PineScript `syminfo.currency`; fallback "USD" */
40
59
  export declare function currencyOf(chart?: ChartContext): string;
60
+ /**
61
+ * PineScript `syminfo.basecurrency` ("BTC" for BTCUSDT.P, '' for a stock): `chart.basecurrency`. Fallback for a
62
+ * context without it: the ticker of a crypto or forex pair (`chart.symbolType`) without ".P" and without its quote
63
+ * currency (`chart.currency`), else ''
64
+ */
65
+ export declare function basecurrencyOf(chart?: ChartContext): string;
66
+ /**
67
+ * PineScript `syminfo.root` ("ES" for ES1!, "AAPL" for AAPL): `chart.root`. Fallback for a context without it: the
68
+ * ticker, without its contract suffix for futures ("ES1!" -> "ES", "ESH2025" -> "ES")
69
+ */
70
+ export declare function rootOf(chart?: ChartContext): string;
41
71
  /** PineScript `chart.fg_color`; fallback #DBDBDB */
42
72
  export declare function foregroundColorOf(chart?: ChartContext): string;
43
73
  /** PineScript `chart.bg_color`; fallback #0F0F0F */
@@ -1 +1 @@
1
- {"version":3,"file":"chart-context.d.ts","sourceRoot":"","sources":["../src/chart-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAItD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAE3D;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAEvD;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAEvD;AAED,iHAAiH;AACjH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAGrD;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,oDAAoD;AACpD,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAEvD;AAED,oDAAoD;AACpD,wBAAgB,iBAAiB,CAAC,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wE;AACxE,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,CAWxG"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * 1-2-3 Pattern (Expo)
3
+ *
4
+ * Swing pivots (highs and lows with `Period` bars on each side) are taken in alternation: a pivot high only after a
5
+ * pivot low and the reverse. The last three pivots are kept (3 = newest, 2, 1 = oldest). A bullish 1-2-3 is a high
6
+ * cross above pivot 2 while pivot 3 is above pivot 1 and below pivot 2; a bearish 1-2-3 is a low cross below pivot 2
7
+ * while pivot 3 is below pivot 1 and above pivot 2. Only one break is drawn per pivot 2.
8
+ *
9
+ * Drawings: the break shape (a label in the chosen style and colour) and a dashed line from pivot 2 to the break bar;
10
+ * the "1", "2", "3" labels and the two lines of the pattern; optional HH / LH / HL / LL labels on the pivots. Lines
11
+ * and texts use the chart foreground colour. At most 500 labels and 500 lines are kept. The alerts of the original
12
+ * have no output.
13
+ *
14
+ * Chart context: `chart.fg_color` (lines and label texts).
15
+ *
16
+ * Reference: "1-2-3 Pattern (Expo)" by Zeiierman
17
+ * Licence: Mozilla Public License 2.0, as the original Pine script (https://mozilla.org/MPL/2.0/).
18
+ * Original notice: © Zeiierman
19
+ */
20
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
21
+ import { type ChartContext } from '../chart-context';
22
+ export interface Pattern123Inputs {
23
+ /** Pivot period */
24
+ prd: number;
25
+ showBreak: boolean;
26
+ showPattern: boolean;
27
+ showPvts: boolean;
28
+ visuell: 'Diamond' | 'XCross' | 'Cross' | 'Flag' | 'Square';
29
+ colBull: string;
30
+ colBear: string;
31
+ size: 'tiny' | 'small' | 'normal' | 'large' | 'huge';
32
+ }
33
+ export declare const defaultInputs: Pattern123Inputs;
34
+ export declare const inputConfig: InputConfig[];
35
+ export declare const plotConfig: PlotConfig[];
36
+ export declare const metadata: {
37
+ title: string;
38
+ shortTitle: string;
39
+ overlay: boolean;
40
+ };
41
+ export declare function calculate(bars: Bar[], inputs?: Partial<Pattern123Inputs>, chart?: ChartContext): IndicatorResult;
42
+ export declare const Pattern123: {
43
+ calculate: typeof calculate;
44
+ metadata: {
45
+ title: string;
46
+ shortTitle: string;
47
+ overlay: boolean;
48
+ };
49
+ defaultInputs: Pattern123Inputs;
50
+ inputConfig: InputConfig[];
51
+ plotConfig: PlotConfig[];
52
+ };
53
+ //# sourceMappingURL=1-2-3-pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1-2-3-pattern.d.ts","sourceRoot":"","sources":["../../src/community/1-2-3-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAClE,MAAM,aAAa,CAAC;AACrB,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CACtD;AAED,eAAO,MAAM,aAAa,EAAE,gBAS3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAWpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAAO,CAAC;AAE3C,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAgBF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,eAAe,CAmGpH;AAED,eAAO,MAAM,UAAU;;;;;;;;;;CAMtB,CAAC"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Bull Vs. Bear Market Intraday Sessions
3
+ *
4
+ * Up to nine intraday sessions (UTC time ranges, four shown by default: 00-06, 06-12, 12-18 and 18-24 UTC). When a
5
+ * session ends, its bars get a volume profile: the session range (highest high and lowest low of its bars after the
6
+ * first one) is cut into "Profile Rows" levels; the volume of each bar of the session is shared between the levels
7
+ * its wick covers, as bull volume (close above open) or bear volume (close below open). The bull and bear profiles
8
+ * are drawn from the first bar of the session as filled polylines (the value area, "Value Area %" of the bull volume
9
+ * around the level with the most volume, in stronger colours), with an optional box and name label per session,
10
+ * optional delta labels (bull minus bear volume in "Delta Rows" bands), POC lines and value area lines that extend
11
+ * until the price comes back. A "Live" profile of the current period of the "Live" timeframe (1 day) is drawn 200
12
+ * bars to the right of the last bar, with a band behind the bars of that period.
13
+ *
14
+ * `syminfo.mintick` (the top of the live band) comes from the chart context. The session label colour is the
15
+ * midpoint of the HSV gradient between the up and down colours (function `hsv_gradient` of the library hsvColor by
16
+ * kaigouthro, with `percentOfDistance` of its library calc, ported below); the comparison methods of the library
17
+ * MathOperator by RicardoSantos and the array methods `flush` of the library arraymethods by HeWhoMustNotBeNamed are
18
+ * written inline.
19
+ *
20
+ * Reference: "Bull Vs. Bear Market Intraday Sessions [Kioseff Trading]" by KioseffTrading
21
+ * Licence: Mozilla Public License 2.0, as the original Pine script (https://mozilla.org/MPL/2.0/).
22
+ * Original notice: © KioseffTrading
23
+ */
24
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
25
+ import { type ChartContext } from '../chart-context';
26
+ type DeltaSize = 'Tiny' | 'Small' | 'Normal' | 'Large' | 'Huge';
27
+ export interface TenXBullVsBearVpIntradaySessionsInputs {
28
+ showT1: boolean;
29
+ t1: string;
30
+ showT2: boolean;
31
+ t2: string;
32
+ showT3: boolean;
33
+ t3: string;
34
+ showT4: boolean;
35
+ t4: string;
36
+ showT5: boolean;
37
+ t5: string;
38
+ showT6: boolean;
39
+ t6: string;
40
+ showT7: boolean;
41
+ t7: string;
42
+ showT8: boolean;
43
+ t8: string;
44
+ showT9: boolean;
45
+ t9: string;
46
+ T1T: string;
47
+ T2T: string;
48
+ T3T: string;
49
+ T4T: string;
50
+ T5T: string;
51
+ T6T: string;
52
+ T7T: string;
53
+ T8T: string;
54
+ T9T: string;
55
+ showLI: boolean;
56
+ LIT: string;
57
+ upColT1: string;
58
+ dnColT1: string;
59
+ upColT2: string;
60
+ dnColT2: string;
61
+ upColT3: string;
62
+ dnColT3: string;
63
+ upColT4: string;
64
+ dnColT4: string;
65
+ upColT5: string;
66
+ dnColT5: string;
67
+ upColT6: string;
68
+ dnColT6: string;
69
+ upColT7: string;
70
+ dnColT7: string;
71
+ upColT8: string;
72
+ dnColT8: string;
73
+ upColT9: string;
74
+ dnColT9: string;
75
+ upColLI: string;
76
+ dnColLI: string;
77
+ boxed: boolean;
78
+ ROWS: number;
79
+ factor: number;
80
+ same: 'Middle' | 'Same Side';
81
+ showdel: boolean;
82
+ deltaRows: number;
83
+ deltaSz: DeltaSize;
84
+ poc: boolean;
85
+ delet: boolean;
86
+ poctype: 'Bull & Bear POC' | 'Regular POC';
87
+ show: number;
88
+ wid: number;
89
+ generalPOCcol: string;
90
+ transp3: number;
91
+ valines: boolean;
92
+ vacol: string;
93
+ cumu: number;
94
+ vashow: number;
95
+ deletva: boolean;
96
+ transp: number;
97
+ transp2: number;
98
+ transpv: number;
99
+ transpv2: number;
100
+ }
101
+ export declare const defaultInputs: TenXBullVsBearVpIntradaySessionsInputs;
102
+ export declare const inputConfig: InputConfig[];
103
+ export declare const plotConfig: PlotConfig[];
104
+ export declare const metadata: {
105
+ title: string;
106
+ shortTitle: string;
107
+ overlay: boolean;
108
+ };
109
+ export declare function calculate(bars: Bar[], inputs?: Partial<TenXBullVsBearVpIntradaySessionsInputs>, chart?: ChartContext): IndicatorResult;
110
+ export declare const TenXBullVsBearVpIntradaySessions: {
111
+ calculate: typeof calculate;
112
+ metadata: {
113
+ title: string;
114
+ shortTitle: string;
115
+ overlay: boolean;
116
+ };
117
+ defaultInputs: TenXBullVsBearVpIntradaySessionsInputs;
118
+ inputConfig: InputConfig[];
119
+ plotConfig: PlotConfig[];
120
+ };
121
+ export {};
122
+ //# sourceMappingURL=10x-bull-vs-bear-vp-intraday-sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"10x-bull-vs-bear-vp-intraday-sessions.d.ts","sourceRoot":"","sources":["../../src/community/10x-bull-vs-bear-vp-intraday-sessions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAGkD,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EACzH,MAAM,aAAa,CAAC;AACrB,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhE,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,sCAAsC;IACrD,MAAM,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,EA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zigzag
3
+ *
4
+ * A zigzag of length `Length` (a pivot high when the bar makes the highest high of `Length` bars, a pivot low for
5
+ * the lowest low, alternating; the last pivot moves while the price extends, and a pivot is forced after `Length`
6
+ * bars) holds up to `Depth` pivots. Higher-level zigzags are built recursively from it: each level keeps the pivots
7
+ * that make a higher high / lower low (|dir| = 2) and the extreme minor pivots between them, until a level has no
8
+ * fewer pivots than the one below. On every new pivot each level (from `Minimum Zigzag Level`) is scanned for an
9
+ * ABC: the last three pivots A, B, C where the retracement C of the move A-B is between 0.618 and 0.786 (and the
10
+ * trade condition on the A and B pivot directions). Entry, target and stop come from the ABC extension (or the BC
11
+ * retracement) at the entry / target / stop ratios, rounded to the tick. A pattern whose close is still before the
12
+ * entry is drawn (lines A-B, B-C, dotted A-C, the ratio label, the A / B / C labels, entry-stop and entry-target
13
+ * boxes) with the next colour of the theme list, and tracked: status 1 when the close reaches the entry, 2 at the
14
+ * target; it closes at the stop (or before the entry when it is crossed back below the stop) or the bar after the
15
+ * target, and its last status is counted per direction. At most 10 patterns are tracked with drawings; older ones are
16
+ * tracked without. A table on the last bar shows the counts (invalid / stopped / complete), the win ratio and the
17
+ * risk reward.
18
+ *
19
+ * The zigzag is the library "ZigzagLite" (version 3), the drawing types "Drawing" (version 2), the theme colours
20
+ * "utils" (version 1) and the ratios "FibRatios" (version 1) by Trendoscope; the functions used are written in this
21
+ * file.
22
+ *
23
+ * Chart values read: the price tick (targets rounded with round_to_mintick) and the chart background colour (table
24
+ * border). Without a chart context: tick 0.01 and the dark theme colour.
25
+ *
26
+ * Reference: "ABC on Recursive Zigzag [Trendoscope]" by Trendoscope
27
+ * Licence: Mozilla Public License 2.0, as the original Pine script (https://mozilla.org/MPL/2.0/).
28
+ * Original notice: © Trendoscope Pty Ltd
29
+ */
30
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
31
+ import type { TableData } from '../types';
32
+ import { type ChartContext } from '../chart-context';
33
+ export interface AbcOnRecursiveZigzagInputs {
34
+ theme: 'DARK' | 'LIGHT';
35
+ zigzagLength: number;
36
+ depth: number;
37
+ minimumZigZagLevel: number;
38
+ base: 'ABC Extension' | 'BC Retracement';
39
+ entryRatio: number;
40
+ targetRatio: number;
41
+ stopRatio: number;
42
+ logScale: boolean;
43
+ useClosePricesForEntry: boolean;
44
+ useClosePricesForTarget: boolean;
45
+ useClosePricesForStop: boolean;
46
+ useClosePricesForRetest: boolean;
47
+ tradeCondition: 'any' | 'trend' | 'reverse' | 'contracting' | 'expanding';
48
+ }
49
+ export declare const defaultInputs: AbcOnRecursiveZigzagInputs;
50
+ export declare const inputConfig: InputConfig[];
51
+ export declare const plotConfig: PlotConfig[];
52
+ export declare const metadata: {
53
+ title: string;
54
+ shortTitle: string;
55
+ overlay: boolean;
56
+ };
57
+ export declare function calculate(bars: Bar[], inputs?: Partial<AbcOnRecursiveZigzagInputs>, chart?: ChartContext): IndicatorResult & {
58
+ tables: TableData[];
59
+ };
60
+ export declare const AbcOnRecursiveZigzag: {
61
+ calculate: typeof calculate;
62
+ metadata: {
63
+ title: string;
64
+ shortTitle: string;
65
+ overlay: boolean;
66
+ };
67
+ defaultInputs: AbcOnRecursiveZigzagInputs;
68
+ inputConfig: InputConfig[];
69
+ plotConfig: PlotConfig[];
70
+ };
71
+ //# sourceMappingURL=abc-on-recursive-zigzag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abc-on-recursive-zigzag.d.ts","sourceRoot":"","sources":["../../src/community/abc-on-recursive-zigzag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAClE,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMnF,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,eAAe,GAAG,gBAAgB,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,EAAE,OAAO,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,uBAAuB,EAAE,OAAO,CAAC;IACjC,cAAc,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;CAC3E;AAED,eAAO,MAAM,aAAa,EAAE,0BAe3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,WAAW,EA6BpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAAO,CAAC;AAE3C,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAsJF,wBAAgB,SAAS,CACvB,IAAI,EAAE,GAAG,EAAE,EACX,MAAM,GAAE,OAAO,CAAC,0BAA0B,CAAM,EAChD,KAAK,CAAC,EAAE,YAAY,GACnB,eAAe,GAAG;IAAE,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,CAuS3C;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;CAMhC,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * AG FX - Watermark
3
+ *
4
+ * Two tables used as a chart watermark: a title and a subtitle (1 column, 3 rows), and the symbol information
5
+ * ("Show Symbol Info"): the date of the close of the last bar (day/month/year) above "TICKER | timeframe" (an "M" is
6
+ * added to minute timeframes). Position, colours, sizes, alignments and cell size are inputs.
7
+ *
8
+ * Chart context (optional third argument of calculate): the ticker, the chart timeframe, the exchange time zone of
9
+ * the date and the session (close time of a daily bar). Without a context the ticker is empty, the timeframe is read
10
+ * from the bar spacing, and the close time is the bar time plus the bar interval in UTC.
11
+ *
12
+ * Reference: "AG FX - Watermark" by AGFXTRADING
13
+ * Licence: Mozilla Public License 2.0, as the original Pine script (https://mozilla.org/MPL/2.0/).
14
+ */
15
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
16
+ import { type ChartContext } from '../chart-context';
17
+ type Size = 'tiny' | 'small' | 'normal' | 'large' | 'huge' | 'auto';
18
+ type Align = 'center' | 'left' | 'right';
19
+ type VPos = 'top' | 'middle' | 'bottom';
20
+ type HPos = 'left' | 'center' | 'right';
21
+ export interface AgFxWatermarkInputs {
22
+ title: string;
23
+ subtitle: string;
24
+ symInfoCheck: boolean;
25
+ textVPosition: VPos;
26
+ textHPosition: HPos;
27
+ symVPosition: VPos;
28
+ symHPosition: HPos;
29
+ /** Cell width in % of the chart (0 = fit the text) */
30
+ width: number;
31
+ /** Cell height in % of the chart (0 = fit the text) */
32
+ height: number;
33
+ titleColor: string;
34
+ titleSize: Size;
35
+ titleAlign: Align;
36
+ subtitleColor: string;
37
+ subtitleSize: Size;
38
+ subtitleAlign: Align;
39
+ symInfoColor: string;
40
+ symInfoSize: Size;
41
+ symInfoAlign: Align;
42
+ bgColor: string;
43
+ }
44
+ export declare const defaultInputs: AgFxWatermarkInputs;
45
+ export declare const inputConfig: InputConfig[];
46
+ export declare const plotConfig: PlotConfig[];
47
+ export declare const metadata: {
48
+ title: string;
49
+ shortTitle: string;
50
+ overlay: boolean;
51
+ };
52
+ export declare function calculate(bars: Bar[], inputs?: Partial<AgFxWatermarkInputs>, chart?: ChartContext): IndicatorResult;
53
+ export declare const AgFxWatermark: {
54
+ calculate: typeof calculate;
55
+ metadata: {
56
+ title: string;
57
+ shortTitle: string;
58
+ overlay: boolean;
59
+ };
60
+ defaultInputs: AgFxWatermarkInputs;
61
+ inputConfig: InputConfig[];
62
+ plotConfig: PlotConfig[];
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=ag-fx-watermark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ag-fx-watermark.d.ts","sourceRoot":"","sources":["../../src/community/ag-fx-watermark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAClE,MAAM,aAAa,CAAC;AAErB,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE3E,KAAK,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACpE,KAAK,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACzC,KAAK,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxC,KAAK,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAExC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,IAAI,CAAC;IACpB,aAAa,EAAE,IAAI,CAAC;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,IAAI,CAAC;IACnB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,IAAI,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,KA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