I apply the following script to a chart of type $tick,1
I am returned with the 3 period channel for $tick, not es #f. Any help is appreciated, this is a neat feature.
PHP Code:
function preMain() {
setStudyTitle("MikeTest");
}
var upD = null;
var lowD = null;
var count = 0;
function main()
{
var tempref = ref(-1);
if (count == 0)
{
count++;
upD = upperDonchian(3, "high", sym("ES #F, 1"));
lowD = lowerDonchian(3, "low", sym("ES #F, 1"));
}
if (getBarState() == BARSTATE_NEWBAR)
{
debugPrintln("upd: " + upD.getValue(0) + " lowD: " + lowD.getValue(0));
}
}
Comment