- Open, High, Low and Close (o, h, l, and c) are all calculated using an calculation based on a user input length/period, defaulted at 10.
- Candle colors are determined by using the same calculation on the ohcl4 and comparing it to the previous candle. Green candles have an ohlc4 greater than the previous candle, all other candles are red.
- The current price is plotted with the default blue line with an calculation with 1 period to allow customization of smoothing if necessary to identify trends.
DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.