It's so simple, I can't see what causes the problem with it in MC..
Instead of calling the function, I even put the code directly into the signal and it still didn't work.
Code: Select all
vars:Ebar(-9999); {entry bar}
if barssinceentry(0) = 0 then begin
Ebar = currentbar;
end;
EntryBarClose = C[currentbar-Ebar];