I would like some help exposing indicator data to calling strategies. My knowledge of how properties work is not thorough enough and I'd appreciate any advice.
My indicator creates a list of objects whose properties I want to access from one or more strategies (in addition to series values). This is what I've tried. It compiles but I don't get the data I expect.
In the indicator file, outside the indicator class, but within the NinjaScript.Indicator namespace, I define a class SDZone, which has several properties I want strategies to access.
Instances of SDZone are created in the indicator and added to a list of SDZone defined in the indicator.
List<SDZone> zoneList … zoneList.Add( new SDZone(...) );
[Browsable(false)] [XmlIgnore] public List<SDZone> zoneList { get; set; }
private List<SDZone> stratZoneList; … stratZoneList = indicator.zoneList;
foreach ( SDZone z in stratZoneList ) { if ( z == null ) Print( "z == null" ); else Print( "This is z: " + z.sdZoneProp1.ToString() ); }
Any help would be welcome.
Cheers
Tony
Comment