(from TASC magazine, August 2008 issue).
The Premium Oscillator was introduced by technical analyst Lee Leibfarth.
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.
col = val>-maxLevel and val<-minLevel?color.new(#f4a560, 0) : val<-maxLevel ? color.new(#ff0000, 0) : val>minLevel and val<maxLevel? color.new(#32cd32, 0): val>maxLevel ? color.new(#006400, 0) : color.new(#a9a9a9, 0) //line 28
it was missing "and val<maxLevel" on line 28.