Hi all, this is my attempt to construct a simple indicator. The code are attached below, the problem i have is too many down white arrows, when the condition is met.
May i request some help from this great community
1. what is the difference when using MovAvgExponential(low, 10) vs MovAvgExponential(close, 10). How does the LOW and CLOSE affect the plot?
2. From the pic, you noticed that there are lots of white down arrows, I would like to see only TWO white down arrows. How to amend this script to only plot TWO white down arrows, max 2, when the condition3_Dwn is met.
Thank you very much
@BenTen @markos Thanks for all the guidance....really appreciate it.
May i request some help from this great community
1. what is the difference when using MovAvgExponential(low, 10) vs MovAvgExponential(close, 10). How does the LOW and CLOSE affect the plot?
2. From the pic, you noticed that there are lots of white down arrows, I would like to see only TWO white down arrows. How to amend this script to only plot TWO white down arrows, max 2, when the condition3_Dwn is met.
Thank you very much
Code:
def Trend = MovAvgExponential(low, 10);
plot MA_color = Trend;
MA_color.AssignValueColor(if close > MA_color then color.green else color.red);
#CCI_
input length = 14;
input over_sold = -100;
input over_bought = 100;
def price = close + low + high;
def linDev = LinDev(price, length);
def CCI = if linDev == 0 then 0 else (price - Average(price, length)) / linDev / 0.015;
def ZeroLine = 0;
def condition1u = close > trend;
def condition2u = CCI crosses above over_sold;
plot pUp = condition1u and condition2u;# and trendup;
pUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
pUp.SetLineWeight(5);
pUp.AssignValueColor(Color.bLUE);
#
def condition3_Dwn = close < Trend;
plot Exit = condition3_dwn;
Exit.SetPaintingStrategy(PaintingStrategy.BOOLEAN_Arrow_Down);
Exit.SetLineWeight(1);
Exit.AssignValueColor(Color.WHITE);
@BenTen @markos Thanks for all the guidance....really appreciate it.
Last edited by a moderator: