I am new to Ninjatrader and program trading, I was trying to create a simply indicator to test my concept. So I had created a c# dll using .net framework 4.5, really a normal one, no other third party code inside.
And I added this dll to ninjatrader editor reference and compiled without issue.
Here is the code, really simply, create custom object and print the high value :
protected override void OnBarUpdate() { // Add your custom indicator logic here. XTrading.Comp.Bar b = new XTrading.Comp.Bar( Time[0], (decimal)Open[0], (decimal)Close[0], (decimal)High[0], (decimal)Low[0], (int)Volume[0] ); Print(b.High); }
Could anyone give me some advise whats goes wrong?
Comment