Trady icon indicating copy to clipboard operation
Trady copied to clipboard

Indicator on Indicator 'TInput TOutput not matched'

Open andyb1979 opened this issue 4 years ago • 1 comments

Hi there!

Does Trade support indicators on indicators?

If I try this ->

var rsi = new RelativeStrength(PrimaryPriceData, 14).Compute();
var emaOnRsi = new ExponentialMovingAverage<AnalyzableTick<decimal?>, AnalyzableTick<decimal?>>(rsi, tick => tick.Tick, 9).Compute();

Then I get an exception

System.ArgumentException: 'TInput, TOutput not matched!'
at Trady.Analysis.Infrastructure.AnalyzableBase`4..ctor(IEnumerable`1 inputs, Func`2 inputMapper)

Any ideas?

andyb1979 avatar Feb 13 '21 17:02 andyb1979

Take a look here .
If you map AnalyzableTick<decimal?> to IOhclv, it should work, I think. Like rsi.Compute().Select(c=> new Candle(c.DateTime, c.Tick, c.Tick....)

ridicoulous avatar Feb 13 '21 21:02 ridicoulous