How to use custom indicator in another custom indicator? Need sample.

I have my own custom indicator, e.g. Indicator_slave, which I use in my second custom indicator, e.g. Indicator_master.In CalcNewValue() method of Indicator_master I'd like do get value of Indicator_slave on the same Index. But I always have value of Indicator_slave for Index = 0, only.

Based on your code it looks like what you want is for the value of Indicator_master to be the square of the "bar index" of the current bar. It would start at 0 for the first bar, then go 1, 4, 9, 16, 25, etc. I've modified the code to make it work like this and attach it.

The issue with the code is that index is a "lookback" value, where zero means the most recent bar. When running a system this will always be zero. If you drag the indicator onto a chart it would not be. I realize that this is confusing and am planning to make it simpler in a future version of RightEdge.

So the main change in the code was to use (Count - index - 1) instead of index in the calculations. I also got rid of the NewBar() override in Indicator_master, and updated the Reset() method there.

I made a new example. As far as I understand, there are two important things in this case, override NewSeries and the use of LookBack(index) instead of Current Property. The indicator value in this example does not matter, let it be simply the closing price. If my sample is written correctly, I could upload it to the examples (http://www.rightedgesystems.com/TradingSystems.aspx).

At the moment I have NinjaTrader and WealthLab. But they have some disadvantages that are essential for me. So I'm interested in using RE. But before I can start working with RE I have to make sure that I can do whatever I need quickly and easily and get the correct results.