I am just starting out with c# and I am trying to get my head around chainning indicators.

As a starting project I have chosen the ema crossover strategy.

What I am trying to do is simple:

take the two emas, calculate the difference between them, calculate an ema of that difference and finally cross the difference with its ema to generate a signal.

emaShort = EMA(symbol, 10, Resolution.Daily); emaLong = EMA(symbol, 50, Resolution.Daily); //Here is where things dont work my way // What is intended is to get the difference between fast and slow //ema and then get the ema of that difference. emaDelta = emaShort.Minus(emaLong); emaDeltaEma = emaDelta.EMA(5);

when I use those variables (emaDelta and emaDeltaEma) in the trading logic below, I get the error message that they dont exist in the context. Obviously I have to register them. But where and how exactly do I do that?

Being able to chain indicators together is a very fine thing and my trading logic relies on this very heavily, it would help me very  much if you could give me a helping hand here.

Andreas.