I wanted to code an indicator which changes the color of the volume bars based on criteria derived from the range / volume of each bar.
e.g.
Value2 = Volume *Range;
If Value2 = Highest(Value2,20) then BarColor = ClimaxColor;
BTW - This is taken from http://emini-watch.com/free-stuff/volume-indicator/
However when I try to program this in NT I can't get the Highest value of Volume * Range to compare to the current value as a result of a problem parsing the Value3 to the MAX() function.
EG:
double Value3 = Volume[0] * Range()[0];
if (CurrentBar < 1) // First bar?
{ // Yes.
Values[0].Set(Volume[0]); // Plot it as an "equal" volume.
return; // Done.
}
if (Value3[0] == MAX(Value3,20)[0])
Values[2].Set(Volume[0]); // Yes. Plot it as an "Churn" volume.
else
Values[0].Set(Volume[0]); // Yes. Plot it as an "equal" volume.
}
}
Can anyone help?
Thanks.
TiP2012
Comment