i've got this indicator and need to call it from mine.
here is the code of the indicator i have to call:
protected override void OnBarUpdate()
{
if (CurrentBar < 1)
{
Down.Set(0);
Up.Set(0);
return;
}
Up.Set(Close[0] > Open[0] ? Close[0] - Open[0] : 0);
Down.Set(Close[0] < Open[0] ? Open[0] - Close[0] : 0);
IMI_.Set((SUM(Up, Length)[0] / (SUM(Up, Length)[0] + SUM(Down, Length)[0])) * 100);
if (ShowSignal && CurrentBar > AvgLength)
Signal.Set(SMA(IMI_, AvgLength)[0]);
}

Comment