PureBytes Links
Trading Reference Links
|
Has anyone seen this strange behavior regarding the use of "Marketposition"
in TS2k and know of a workaround? Don't know if it behaves the same way in
TS4 or not. Omega will not even recognize it as a problem, but I need a
workaround badly.
My code says:
MP = marketposition;
If (MP <> MP[1] and MP <> 1 ) then dothis(...);
My system exits on the close, and I'm using the above approach to tell me
when to "dothis." I want to "dothis" the day after the actual exit. I would
expect this equation to be evaluated each bar and be resolved to true the
day after the system exits from long to flat. The problem is that if the
day after the exit is a holiday, the equation is actually resolved to be
true twice. It is resolved to be true the first trading day after the
holiday, as you would expect, but it also is resolved be true the actual
day of the exit. If there is no subsequent holiday, it is never resolved to
be true on the day of the exit, which I understand is the normal behavior.
i.e. if the system exits on 7/3/85, the conditional expression above is true
on both 7/3/85 and 7/6/85 using EOD data. If it exits on 7/6/85, it
resolves to be true on 7/7/85 only.
How else can one determine that the system has exited other than using this
approach? I have used this approach for a long time and never picked up on
this behavior before.
Thanks for any ideas,
Larry
|