PureBytes Links
Trading Reference Links
|
Samuel Tennis writes:
> The times that I do NOT use @MarketPosition are for exits that
> are specifically for the bar of entry and then I will usually be testing
> for "(@MarketPosition <> +01)".
>
> There is no problem, and never has been to my knowledge, with the
> @MarketPosition function.
Here's the gotcha (assume daily data):
if whatever then buy on close; {filled Monday MOC}
if marketposition = 1 then exitlong at (entryprice - 10) stop;
The earliest your stop will be filled is on the open Wednesday. If the
market crashes on Tuesday (the bar AFTER entry), you are hosed.
Better to use your own vars:
if whatever then begin
buy on close; {filled Monday MOC}
ep = close;
mp = 1;
end;
if mp = 1 then exitlong at (ep - 10) stop;
That one will get you out on Tuesday if it crashes. Or, as Mike G.
points out, forget the mp var altogether. It's not needed. ALL the
built-in position functions suffer from this "feature." Code your own if
you want to be able to exit on the bar following an on-close entry.
--
Dennis
"It's not a bug, it's a feature."
|