Another update, and another recognition of something in the code that had me scratching my head and rethinking things.
- updated to pine v6
- converted moving average functions to switch operators to cut out a bunch of code
- added a second signal line similar to my other indicators. This allows using one signal line to smooth the RO, which I will refer to as the smoothed RO, and having an additional signal line to be the signal line on that smoothed RO, or, if your fancy is to have two signal lines, then by all means....
- I should clarify about the smoothed RO vs the og RO. The RO is simply a user-selected moving average applied to a calculation done on each bar, called the TVB or true value of a bar. Certain MAs, such as the Hull, or Jurik, being extremely smooth themselves don't require further smoothing, but things like an SMA, EMA and others can, in my opinion, benefit by some smoothing. Depending on your preference of moving average you perhaps should or perhaps should not use a smoothed RO. The default settings are a 21 period EMA smoothed by a three period SMA, and an eight period EMA as a signal line.
- I've organized the code in the script to better reflect TradingView's recommendations
- updated the divergences portion of code to TV's most recent version
- changed default color pallet
- removed color gradients. Sorry, your indicator won't be quite as pretty now, but I'm doing a lot of these updates to clean up the UI of the indicators, part of which is eliminating color inputs, and in order to eliminate color inputs, because of the way pinescript handles coloring, I had to cut out color.gradient.
- added a color by timeframe option that allows the user to select an alternate timeframe for coloring, so that the indicator reflects that alternate timeframe's location by color. Example: you're on an hourly chart and you set the color timeframe to a 4h chart and the color reference to Centerline. The indicator is well above the centerline but it is still red, indicating that it is still bearish on the 4h. You're looking for shorts here most probably.
That is all, I think!
Enjoyyyyy