I have Add(PeriodType.Minute, 10);
How can I use that elsewhere in the script without having to reference it by: BarArray[1]?
to be more clear what i'd like to be able to do is 'rename it' so that I can say something like:
if (SMA(20)[0] > SMA(TenMinSeries, 20)[0])
rather than
if (SMA(20)[0] > SMA(BarsArray[1], 20)[0])
also,
i'm trying to apply a BarsArray to a Rising function as follows but don't know how.
protected override void OnBarUpdate()
{
if(CurrentBars[0] <= BarsRequired ||
CurrentBars[1] <= BarsRequired ||
CurrentBars[2] <= BarsRequired)
return;
if(BarsInProgress == 0)
{
//check ten minute SMA status
if(Rising(SMA(25))) //this obviously won't work, how to apply BarsArray[1]?
{
//do something
}
}
}

Comment