Greetings,
I was hoping someone could help clear up a little confusion I'm having.
Lets take the following snippet of code.
My understanding of the preceeding code is that in every new bar, a debug message will be printed for us, and the close() price will be plotted on our chart.
So, after loading it on the chart, it seems to plot all of the previous bars correctly; But doesn't update the chart when new bars occur. The formula output box seems to still print our message when a new bar occurs though. Why doesn't our returned close() value get drawn on the chart?
Is there something I'm missing? There must be...
Thanks in advance,
Joshua C. Bergeron
I was hoping someone could help clear up a little confusion I'm having.
Lets take the following snippet of code.
PHP Code:
function preMain()
{
}
function main()
{
if (getBarState() == BARSTATE_NEWBAR)
{
debugPrintln("hi new bar");
return close();
}
}
So, after loading it on the chart, it seems to plot all of the previous bars correctly; But doesn't update the chart when new bars occur. The formula output box seems to still print our message when a new bar occurs though. Why doesn't our returned close() value get drawn on the chart?
Is there something I'm missing? There must be...
Thanks in advance,
Joshua C. Bergeron
Comment