I have an indicator, in this case named KayButtons. I have "private IntSeries buttonCode;" in variables, have "buttonCode = new IntSeries(this);" in protected override void Initialize(), and in protected override void OnBarUpdate(), have "buttonCode.Set(1) or buttonCode.Set(2) or buttonCode.Set(3), depending on certain conditions. I also have the code below in properties:
[Browsable(false)]
[XmlIgnore()]
public IntSeries ButtonCode
{
get { return buttonCode; }
}
By the way, I am still a novice in NTScripts / C#. I just make do by nicking and amending snippets of codes here and there. What I wanted to do was access the value of buttonCode.Set from another of my indicators, in this case named KayStopLines3. So in KayStopLines3, I have the following code in protected override void OnStartUp(), if (KayButtons.ButtonCode == 1)
Unfortunately, I get the following error when I try to compile it:
'NinjaTrader.Indicator.Indicator.KayButtons()' is a 'method' which is not valid in this given context
Could I please request your assistance in resolving this error please?
Many thanks
Dan
Comment