Hello at all,

im the new guy here. Encountered Zorro Trader the first time about 2 years ago. Since then learning lite-c and trying to code something useful (if i find the time through work and family). Mostly simple things like EMA crossover etc. I have no coding expirience beforehand.

Currently Im curious about the japanese charts (Ichimoku indicator and Haiken Ashi bars). I managed to get the Ichimoku indicator on the charts, but failed so far to change the normal bars to Haiken Ashi Bars.
In fact i just copypasted the code snippet from the help file that looks like that below,
but the result ends with:

2_haiken_ashi_bar_test compiling.......
Error in 'line 11:
'Close' undeclared identifier
< Close[0] = (Open[0]+High[0]+Low[0]+Close[0])/4;
>.

And hereĀ“s the code:

Code
function run()
{
	set(LOGFILE|PLOTNOW);
	
	BarPeriod = 1;

	// Haiken Ashi Bars
int bar(vars Open,vars High,vars Low,vars Close)
{
  Close[0] = (Open[0]+High[0]+Low[0]+Close[0])/4;
  Open[0] = (Open[1]+Close[1])/2;
  High[0] = max(High[0],max(Open[0],Close[0]));
  Low[0] = min(Low[0],min(Open[0],Close[0]));
  return 8;
}

}


I already tried #include <default.c>, did not work.
Then i tried to declare it/them before with "vars Close = priceClose();", didnt help either.
Obviously Im missing something important.
I would appreciate if someone has already worked with Special Bars and could give me a hint.
Thanks in advance.