Not readily finding reference library material on the topic.
protected override void OnBarUpdate()
{
//Add your custom indicator logic here.
double candleHi = Math.Max(High[0], Low[0]);
double candleLo = Math.Min(High[0], Low[0]);
double body = Math.Abs(Open[0] - Close[0]);
Value[0] = ((body / (candleHi - candleLo)) *100);
double percent = Value[0];
if statements follow...
all else is confirmed in order, i.e. was chart load tested prior to adding any OnBarUpDate logic.
The Log reports nothing but on trying to load onto a chart the chart freezes & never recovers [until I shut down and remove the indicator file manually].
What am I missing here; or perhaps direct me to a library reference please sir?

Thanx!
JM


Comment