PureBytes Links
Trading Reference Links
|
You have the wrong model of how TradeStation works.
Conceptually, your code runs after the close of a bar and before the
start of the next bar. (There is a special case if you refer to the
"Open of next bar")
On daily data, for example, your code would run at night after the
market closes but before it opens the next day. You code must
generate orders for the next day.
So you will have to figure out how to generate orders for the next
bar using the data on the bar that just ended.
Bob Fulks
At 3:27 AM -0700 9/25/01, pooltreatments@xxxxxxxxxxxx wrote:
>Lets say I am using 30 min bars in my strategy.
>
>I want to test the current bar to see if it takes out the high of the
>last bar with an IF statement.
>
>If it Does, I want to immediatly go LONG.
>
>The high could be taken out with the first 2 mins of the bar opening
>so i CANNOT wait untill the next bar to go long!
>
>Most of the ways to enter a position do so on the NEXT bar. The
>only one I could find that enters this bar is BUY but ...
>
>· Orders can be generated for:
>this bar on Close <----------------------------------this is no use!
>next bar at Market
>next bar at PRICE Stop
>next bar at PRICE Limit
>
>
>· Limit orders can only be executed on the next bar
>
>How do you go LONG this bar at h[1] ??
>Regards
>Mike
|