I am trying to plot the slope of HoltEMA. I already have the slope and HoltEMA indicators. Both the indicators are attached.
I want to achieve the following by either writing a brand new indicator or by adding a code snippet in existing Slope indicator.
- Whenever the value of HoltEMA's slope is more than 5 bar color turns yellow and if less than -5, bar color turns blue
I added the following code the existing slope indicator, but I am not able to accomplish what I want.
if (PlotUp[0] >=5)
{
BarColor = Color.Yellow;
}
if (PlotDn[0] <=-5)
{
BarColor = Color.Blue;
}
Can someone please help me with what am I doing wrong here.
Very much appreciate your help in advance.
Comment