PureBytes Links
Trading Reference Links
|
At 01:42 PM 05/03/99 , you wrote:
>At 02:01 PM 5/3/99 EDT, you wrote:
>>I discovered that TradeStation "does not always" properly exit at the
last swing low with a strength of 1 when the following code is used:
>>
>>If MarketPosition = 1 then ExitLong at SwingLow(1,L,1,50) stop;
>>
>
>I would first suspect that your exit isn't happening because
MarketPosition is not 1 on the bar where you need to place the stop order.
Market position has the annoying quality that it is not +1 until the bar
following a fill.
>
I beg to differ - The @MarketPosition function will be set correctly on
the bar of entry UNLESS you enter on an MOC (Market On Close) order. Your
EasyLanguage code is evaluated, in the paradigm of the software, moments
prior to the close of the market allowing you to generate MOC orders for
the current bar as well as any intra-bar order (Market, Stop or Limit) for
the next bar.
Now, it is perfectly true, and SOME people have called this a "bug", that
you can not know on the bar PRIOR to the fill in order to place an order
for the bar of entry but that pretty much emulates real world trading. And
real life as well!
>
>Therefore you can't use it as a basis for placing an exit order to stop
you out on the bar of an entry or for the bar following an entry.
>
The @MarketPosition Function will and always has worked "correctly" for
the bar following entry. I do not agree with this statement!
>
>Take a look and see if the exits fail on trades where you should get out
on the bar following the bar of entry. If so, it's the MarketPosition
latency that's responsible.
>
>If you can, just do away with the marketposition test entirely. You'll
find in many cases you don't need to test for being long at all before
exiting. Just use the exit order by itself with no test.
>
This is a very good thought. Unless you are using @EntryPrice,
@BarsSinceEntry or another Position Function dependant upon the entry you
do not HAVE to test for @MarketPosition.
However, I have created thousands of professional systems (well MANY, MANY
hundreds at the least) and I almost ALWAYS use the @MarketPosition
function. 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.
>
>Mike G.
>
Samuel
Samuel K. Tennis Vista Research
129 Staff Drive voice: 1(850) 243-5105
Ft. Walton Beach, FL 32548 fax: 1(850) 301-2884
skt@xxxxxxxxxxxxxxxxxx http://www.vista-research.com/
***** EasyLanguage Spoken Here *****
|