satyarishi
New member
I am trying to add a Custom Column in Watchlist that would indicate when 8 moving exponential crosses 20 moving average exponential..
def mvgcoup = MovingAvgCrossover(length1 = 8, length2 = 20, averageType1 = "EXPONENTIAL", averageType2 = "EXPONENTIAL");
def mvgcodwn = MovingAvgCrossover(length1 = 20, length2 = 8, averageType1 = "EXPONENTIAL", averageType2 = "EXPONENTIAL");
plot buy_ind = mvgcoup;
#AssignBackgroundColor(if mvgcoup then Color.DARK_GREEN else if mvgcodwn then Color.DARK_RED else color.black);
Whats missing is the I would like to paint column as Label " Buy" with "color Green" and append it with "Number of Candles since the condition met"
For eg: Buy : 7 ( 7 candle sticks formed since the last time it gave Buy Signal )
Likewise I would like to add label "Sell" with red color and appended with number of candles since the condition met.
Appreciate your help with AssignBackgroundColor and AssignLabel statements as described above
def mvgcoup = MovingAvgCrossover(length1 = 8, length2 = 20, averageType1 = "EXPONENTIAL", averageType2 = "EXPONENTIAL");
def mvgcodwn = MovingAvgCrossover(length1 = 20, length2 = 8, averageType1 = "EXPONENTIAL", averageType2 = "EXPONENTIAL");
plot buy_ind = mvgcoup;
#AssignBackgroundColor(if mvgcoup then Color.DARK_GREEN else if mvgcodwn then Color.DARK_RED else color.black);
Whats missing is the I would like to paint column as Label " Buy" with "color Green" and append it with "Number of Candles since the condition met"
For eg: Buy : 7 ( 7 candle sticks formed since the last time it gave Buy Signal )
Likewise I would like to add label "Sell" with red color and appended with number of candles since the condition met.
Appreciate your help with AssignBackgroundColor and AssignLabel statements as described above