All I want to do is to backcolor the chart when the differences between two VMAs is greater than 2.
protected override void OnBarUpdate()
{VmaDifference.Set(VMA(34,34)[0]-VMA(500,14)[0]);
if (VmaDifference[1]<2
&& VmaDifference[0]>=2)
{
BackColorAll = Color.Green;
}
else if
(VmaDifference[1]>-2
&& VmaDifference[0]<=-2)
{
BackColorAll = Color.Green;
}
else
{
BackColorAll = Color.Blue;
}
Comment