Hi AndrewAMD,
thank you for your quick response. Yes, i have reade the manual Tutorial, Error Messages and a lot of other useful things.
As i mentioned
I already tried #include <default.c>, did not work.
Then i tried to declare it/them before with "vars Close = priceClose();", didnt help either.
(^here i have forget to write the series beforehand, i just noticed. but in code was correct)
i thought this is clear to understand.
So the code with declarations looked like this:
function run()
{
set(LOGFILE|PLOTNOW);
BarPeriod = 1;
vars Open = series(priceOpen());
vars High = series(priceHigh());
vars Low = series(priceLow());
vars Close = series(priceClose());
// 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;
}
}
Anyway it gives the same error, just with another error line number of course:
2_haiken_ashi_bar_test compiling.......
Error in 'line 17:
'Close' undeclared identifier
< Close[0] = (Open[0]+High[0]+Low[0]+Close[0])/4;
>.