karlwancl / Trady

Trady is a handy library for computing technical indicators, and it targets to be an automated trading system that provides stock data feeding, indicator computing, strategy building and automatic trading. It is built based on .NET Standard 2.0.
https://lppkarl.github.io/Trady
Apache License 2.0
545 stars 184 forks source link

Rule bug? #112

Open brandtr opened 4 years ago

brandtr commented 4 years ago

Hi,

when I try to create a rule like: var buyRule = Rule.Create(ic => ic.IsBelowBbLow(20,2)).And(c=>c.IsFullStoOversold(14,1,3)).And(c=>c.IsFullStoBullishCross(14,1,3));

I get an error: System.InvalidCastException: '[A]Full cannot be cast to [B]Full. Type A originates from 'Trady.Analysis, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'D:\System\Desktop\Trady-master\Trady.Test\bin\Debug\netcoreapp3.1\Trady.Analysis.dll'. Type B originates from 'Trady.Analysis, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'D:\System\Desktop\Trady-master\Trady.Test\bin\Debug\netcoreapp3.1\Trady.Analysis.dll'.

It is caused when I use fullSto 2 times (for oversold and for bullishcross). Is this a known issue, or am I missing something here? Who can help me?

[Could it be related to having a .net core project?]

Thanks!