Console.write compiles but does not write to an accessible screen in NT8
I understand from hints in other threads that I can somehow use Print in my custom class to print to Output 1.
Here is an outline of my code where "TestIndic" is an indicator using my custom class and "TestCommon" is my common custom class.
namespace NinjaTrader.NinjaScript.Indicators.MyCommon { public class TestCommon { int Param1; double Param2; double myMagic = 1; public TestCommon (int param1, double param2) { Param1 = param1; Param2 = param2; } } public double DoGreatStuff ( ISeries<double> price ) { Print ( String.Format( " The Magic : ",myMagic ) ); // <---- ??? Print is out of scope in TestCommon -- How do I use Print in my custom Class ??? return price[0] * myMagic; } } namespace NinjaTrader.NinjaScript.Indicators { public class TestIndic : Indicator { public int MyParam1 = 1; public double myParam2 = 2.0; public double myResult; public TestCommon myTest; protected override void OnStateChange() { if (State == State.DataLoaded) { myTest = new TestCommon ( MyParam1, MyParam2 ); } } protected override void OnBarUpdate() { myResult = myTest.DoGreatStuff ( Close ); } } }
Thank you in advance for your help
Comment