I have NinjaTrader 8.0.9.0 and I'm trying to reference the Redis library. I used NuGet in Visual Studio to download StackExchange.Redis v1.2.6 which installed the Redis library to bin/Custom/packages/StackExchange.Redis.1.2.6/lib/net45/StackExchange.Redis.dll
I then used the following code in my NinjaScript
using StackExchange.Redis;
.
,
.
protected override void OnStateChange()
{
if(State == State.SetDefaults)
{
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
}
}
Basically I'm trying to establish a connection with my local Redis DB. The code compiles fine in NinjaScript Editor. However, when I open up the indicator window, I do not see the indicator listed and I get the following error message in the NinjaScript Output window.
10/17/2017 23:13:57: Current State is State.SetDefaults
10/17/2017 23:13:58: Current State is State.Configure
Indicator 'SampleLevel2Book': Error on calling 'OnStateChange' method: Could not load file or assembly 'StackExchange.Redis, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Indicator 'SampleLevel2Book': Error on calling 'OnStateChange' method: Could not load file or assembly 'StackExchange.Redis, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Can you shed some light on how to resolve this issue please?
Thanks,
Clement
Comment