I wrote indicator that display two MFI Values
1. MFI that based on 1 min input , which is the main DataSeries (BarsInProgress = 0)
2. MFI that based on 5 min input , (BarsInProgress = 2)
So far is OK.
I wrote second Indicator that used these values of the first Indicator.
The problem is that sometimes the value of the 5 Min MFI is Wrong and doesn't match the value of the first indicator which is right.
When I debug the second indicator and enter to the first indicator I saw that the MFI 5 min got wrong value.
The First indicator look like this:
protected override void OnBarUpdate()
{
if(CurrentBars[0] < m_mfiPeriod ||
CurrentBars[1] < m_mfiPeriod )
{
return;
}
if (BarsInProgress != 0)
return;
// 1 min DataSeries
double mfiTrigTmFrm = MFI(BarsArray[0], 15)[0];
// 5 min DataSeries
double mfiHTmFrm = MFI(BarsArray[1], 15)[0];
SigPlotS.Set(mfiTrigTmFrm);
SigPlotL.Set(mfiHTmFrm);
}
The second Indicator look like this:
protected override void OnBarUpdate()
{
MfiPlotS.Set(KobiTmFrmMfiSigInd().SigPlotS[0]);
MfiPlotL.Set(KobiTmFrmMfiSigInd().SigPlotL[0]);
}
Thanks, Kobi:
Comment