X.AssignValueColor(if abc then x.color('down') else x. Reference the plot name with the color reference, in the assign( formula ) Here is another way of assigning colors to a plotted line. The 2nd one is incorrect, and not needed. The 1st one is correct, with the plot name before it. I changed the ema8 formula, by adding close as the 1st parameter, and it worked. This is often indicated by an oscillator value moving within 50/-50. It is possible to identify when a retracement is present in a trend. The main oscillator value above 0 indicates that the price is above the SuperTrend. It wasnt plotting correctly with the multiple aggregations. The indicator is in a range of (-100,100) with values closer to 100/-100 indicating a stronger trend. I noticed the 2nd part of this, close < ema8, is always 0.ĭef Neg_State = close < ST and close < ema8 Īddchartbubble(1, low*0.997, ema8, color.magenta, no) Īnd it was always 8, not the average of the price. Code: SuperTrend Multiple Time Frames Mobius V I pulled this study down from MyTrade for a reason. You are using MovAvgExponential incorrectly.