I am trying to create a new study that tracks the spike highs.
As follows:
if( (high(-2) > high(-1) && high(-2) > high(-3)) ){
var aSpikeHi = high(-2);
}
But my results return:
SpikeHi undefined
SpikeHi undefined
SpikeHi undefined
SpikeHi undefined
SpikeHi 1318
How do I get the results to look like this:
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
Any help would be great.
Thanks
Aengus
As follows:
if( (high(-2) > high(-1) && high(-2) > high(-3)) ){
var aSpikeHi = high(-2);
}
But my results return:
SpikeHi undefined
SpikeHi undefined
SpikeHi undefined
SpikeHi undefined
SpikeHi 1318
How do I get the results to look like this:
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
SpikeHi 1318
Any help would be great.
Thanks
Aengus
Comment