OPEN-SOURCE SCRIPT
Aktualisiert

Candle State (The Strat)

17 683
This script identifies the 2 different Candle States for use in #TheStrat.

Candle Up - The close of the current candle is greater than the close of the previous candle.
Candle Down - The close of the current candle is less than the close of the previous candle.

Though this script is extremely simple it is a teaching aid for #TheStrat.
The script also assists in the identification of up and down candles with gaps where the color of candle will not always match the Candle State.

Analysis of the candle types can help you define actionable signals and draw broadening formations.

Disclaimer: All scripts from this account are for informational purposes only and do not produce buy or sell recommendations.

© 2020 Crinklebine
Versionshinweise
Implemented to the correct logic to be compliant with #TheStrat guides.

The source is open and viewable for review, critic and for you to extend or change.

Disclaimer: All scripts from this account are for informational purposes only and do not produce buy or sell recommendations.

© 2020 Crinklebine
Versionshinweise
Removed version label
Versionshinweise
Updated Candle State to support Pine Script v6.
This version modernizes the script and improves Type 3 candle rendering so shape order now follows candle direction more clearly: on red candles the red marker appears on top, and on green candles the green marker appears on top. This makes outside bar state visuals easier to read at a glance while preserving the original Candle State behavior.
Versionshinweise
The Candle State script was updated so it rounds the current candle’s OHLC values, and the previous candle values used for comparison, to 2 decimal places before any candle-state logic runs. This was done because TradingView charts may appear rounded to 2 decimals, while the internal values have been observed to contain 3 decimal places. The plotting logic did not change — only the values being compared were changed from raw prices to rounded prices.
Versionshinweise
Decided to back out of the rounding plan as this messes up Forex and others. Will have to accept that Tradingview rounds charts. Accept the data as it is.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.