♥ 0 |
Hi Pete, I had a previous question on the following Relative Strenght MA in this post https://www.hahn-tech.com/ans/relative-strength-ma-buysell-order/ Your help was appreciated! I’m trying to use it as a condition in a watchlist with the stochastic . Bullish Relative Strength MA and Stochastic would be in green, bearish in red and neutral is current. But i get a few “Can not call setDefaultColor” , could you help ? Also, when should plot statement be replaced with def and if yes why ? #Stochastic def Diff = MACD(fastLength, slowLength, MACDLength, averageTypeMacd).Diff; def slowMA = SimpleMovingAvg(“length” = 150).SMA[0]; input over_bought = 80; def SlowK = reference #Relative Strength plot value= if ma [0]> ma [1] and (SlowK > SlowD) then 1 else if ma [0] < ma [1] and (SlowK < SlowD) then -1 else 0 ; AssignBackgroundColor (if 1 then Color.GREEN else if -1 then Color.RED else color.current); Thank’s !
Marked as spam
|
Please log in to post questions.