I've added an indicator TSS to my primary chart in Initialize(). I also want to access it in the other time frame BPI=1. How do i call TSS values for the 2nd time frame (BPI=1)?
TSS.UpTrend[3] retrieves the value from 3 bars ago, for the primary timeframe
but it won't allow me to use TSS.UpTrend[3][0]
{main strategy....}
protected override void Initialize()
{
if (_debug) Print(" Begin Initialize() section");
Add(TSSuperTrend(atrLength, MovingAverageType.HMA, plFactor, 1, SuperTrendMode.ATR));
TSS=TSSuperTrend(atrLength, MovingAverageType.HMA, plFactor, 1, SuperTrendMode.ATR); //sds usually ATR
Add(PeriodType.Tick, 90); // adds a xx Tick bar to strategy
namespace NinjaTrader.Indicator
{
[Description("TSSuperTrend Indicator developed by TradingStudies.com (Version 2.3)")]
public class TSSuperTrend : Indicator
{
private SuperTrendMode _smode = SuperTrendMode.ATR;
private int _length = 14; // ATR/DT; TSS strat uses 100; 5 much better for CL
private double _multiplier = 2.01; // 2.618;
//sds private MovingAverageType _maType = MovingAverageType.WMA;
private MovingAverageType _maType = MovingAverageType.HMA;
private int _smooth = 1; // 14
...
protected override void Initialize()
{
Add(new Plot(Color.Green, PlotStyle.Hash, "UpTrend"));
Add(new Plot(Color.Red, PlotStyle.Hash, "DownTrend"));
Comment