I am setting up an Indicator Variable (name of Indicator) such as:
GHPInd m_TM;
Then in the OnStateChange (and I have tried Configuration, DataLoaded and Historical) I assign the indicator to this variable:
m_TM=GHPInd();
And tried:
m_TM=GHPInd(Bars);
OnBarUpdate()
RawPlot[0]=m_TM[0];
I Also tried this to see if the interim assignment was wrong but got the same results:
RawPlot[0]=GHPInd()[0];
In the OnBarUpdate() I simply copy the primary data from m_TM into the plot (Prior to my filtering) and the data is corrupted some how. It is almost like the GHPInd is not getting the same data stream.
I have tried this connected to NTBroker with "Tick Replay" checked for the Data Series. I also gave up thinking it was something I was doing wrong and simply went to the "Play Back" connection. In both cases I got different results. In the chart below, both RED lines should be the same function. One is the primary (Bottom panel) and the middle panel is the output of the "Indicator within an Indicator" I described above.
They both should be equal. The primary indicator does use the "OnMarketData()" callback. The passthrough indicator does not use the OnMarketData() callback.
I am stuck trying to pass data from one Indicator to another. I didn't try this with something like SMA, but I would hope there isn't much different.
Comment