I'm playing around with a study that takes its input from another study. My code below doesn't seem to plot anything. Am i doing something wrong?
TIA
------------------------------------
// Indicator to plot Donchian channel over Accumulation/Distribution
var accDistSeries = null;
var upperBandSeries = null;
var lowerBandSeries = null;
function main()
{
if( getBarState() == BARSTATE_NEWBAR )
{
accDistSeries = accDist();
upperBandSeries = upperDonchian( 10, accDistSeries );
lowerBandSeries = lowerDonchian( 10, accDistSeries );
val1 = accDistSeries.getValue(0);
val2 = upperBandSeries.getValue(0);
val3 = lowerBandSeries.getValue(0);
return new Array( val1, val2, val3 );
}
return;
}
TIA
------------------------------------
// Indicator to plot Donchian channel over Accumulation/Distribution
var accDistSeries = null;
var upperBandSeries = null;
var lowerBandSeries = null;
function main()
{
if( getBarState() == BARSTATE_NEWBAR )
{
accDistSeries = accDist();
upperBandSeries = upperDonchian( 10, accDistSeries );
lowerBandSeries = lowerDonchian( 10, accDistSeries );
val1 = accDistSeries.getValue(0);
val2 = upperBandSeries.getValue(0);
val3 = lowerBandSeries.getValue(0);
return new Array( val1, val2, val3 );
}
return;
}
Comment