Assuming you have that EMA_Line defined, here is what the code (in Advanced Mode) would look like:
.fctbNone{ color:#000000; }
.fctbStyle4{ color:#0000ff; }
.fctbStyle3{ color:#000000; }
.fctbStyle1{ color:#800000; }public void MainCalculation()
{
if ((Math.Abs(Open - Close) / (High - Low)) <= 0.2D && Low < EMA_Line)
{
SetColor("Main", Color.White);
}
else if ((Math.Abs(Open - Close) / (High - Low)) <= 0.35D && Low < EMA_Line)
{
SetColor("Main", Color.White);
}
}
NOTE: you are setting it to White in both situations - I assume you want to set it to different colors. You can change them as needed. Also, right now in the example I defined one named color ("Main"), so when you add the paintbar to the chart and look at the parameters, there will be a color box defaulted to White, but which you can change. That way you do not have to hardcode the color in the Paintbar definition. If you use 2 different names in the 2 IF statements above, then there will be 2 defined colors and you would be able to set them in the chart indicator parameters independently.