need for a 'security()' call.
I have attempted to create the function example:
price data that's needed for your everyday indicators in a reliable fashion.
- Updated to remove potential repainting confusion with:
- Added ability to toggle the security() comparison overlay on and off.
..apologies for any confusion regarding the previous repainting option, it was intended for debugging purposes only at the time of writing.
Cheers - Jay.
- Cleaned up self-referencing ternary operations - there was no need to reference 'previous' values of self, just 'active' self.
- Added 'nz()' conversion checks where they might be necessary.
- Removed redundant bar-counting mechanic.
- Cleaned up some of the code comments.
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.