I am newbie so I apologize in advance for my simple question.
I would like to create an autotrader for the tssupertrend. I have managed to get the indicator ( a striped down version of TSSupertrend without all the of choices just the bare necessities) attached to the strategy. I am placing print statements to see what values are being returned by the indicator to the Strategy. It appears i can see, in the strategy, a number of the plotted variables (via the Print Statement) but not the internal dataseries.
In other autotrader examples I have seen this section added....
in the properties section (where the parameters are specified) of the indicator:
[Browseable(false)]
[XmlIgnore()]
public DataSeries st_ATM_Series
{ get {Update();
return ST_ATM_SERIES }
}
print statements in the indicator show the correct values of the DataSeries ( as i can see them in the Output Window for the indicator when run without the strategy ).
However the print statements in the Strategy always return Zero for the passed DataSeries.
I am using the following syntax to do the print in the strategy ( in the onbarupdate):
Print("(sT_ATM_Series[0]="+XX_TSSuperTrend(10, 2.01, 14).sT_ATM_Series[0]);
However, these Print statements return the correct values in the Strategy and the indicator
Print("UpTrend = "+XX_TSSuperTrend( 10, 2.01, 14).UpTrend[0].ToString("0.00"));
Print("DnTrend = "+XX_TSSuperTrend( 10, 2.01, 14).DownTrend[0].ToString("0.00"));
Print("Close = "+Close[0].ToString("0.00"));
Could someone kindly provide some direction....
Thank you kindly in advance
Regards
Sam

Comment