I am working on developing an indicator based on two moving averages. The values are stored in Value[0] (plotUp) and Value[1] (plotDown). I am using IF statements to alter the color of these lines based upon weather one is above the other. The lines for these values are plotted correctly, and the color of the lines are also correct.
I am attempting to use the same color pattern to shade the area between the two line, again, alternating the color based on weather one line is above another. I am using Draw.Region for this purpose. The color of the shading is correct, however, its not shading between the lines. It looks displaced to the left for some reason. The same values that I am using to draw the lines are being passed into the Draw.Region method. I have modified the values in the StartBarsago and endBarsAgo variables and it doesn't seem to change its placement.
Here is the code:
{
Draw.Region(this, "ePlotDn", CurrentBar, 0,plotDown, plotUp,null, _downColor, _DownOpacity);
}
else
{
Draw.Region(this, "ePlotUp", CurrentBar, 0, plotUp, plotDown, null, _upColor, _UpOpacity);
}
Comment