If I am day trading using a 1 minute scale, how do I find out the value of the 9:30AM opening bar?
Dan Kimel
Size:
Color:
In Wealth-Lab, bars are timestamped with the end-of-interval time. So, the ticks from 09:30:00.000 to 09:30:59.999 are given the timestamp 09:31. The closing value of the last bar of the chart is Close[Bars.Count -1];
See the WealthScript Programming Guide (Help menu) for instructions and many useful examples to learn from.
Size:
Color:
I understand that the very first bar is given at 09:31. But could you consider executing the strategy at the very first bar 09:30 so that I can place an order at 09:31? I have a strategy which does something based on the gap between the open price and the previous close price. Currently the strategy is running one minute behind and order is placed at 09:32 not the optimal 09:31.
Size:
Color:
A bar doesn't exist at 09:30, so there's no event to make it run then. When it executes at 09:31, alerts/orders are placed at 09:31, not at 09:32.
Size:
Color:
QUOTE:
When it executes at 09:31, alerts/orders are placed at 09:31, not at 09:32.
Am I missing something here? Because when the strategy executes at the very first bar which is at 09:31, it places an alert but for the next bar which is bar+1 therefore the earliest alert happens at 09:32 and an order is placed right away but it is at 09:32. Correct?
Size:
Color:
The order is executed sometime during the 09:32 bar. A Market order will be executed near the open of the 09:32 bar, for example at 09:31:01. Stop and Limit orders can be executed at any time during the bar depending on when the trigger price is hit.
Size:
Color:
Exactly. Somehow I think I got mixed up.
Size:
Color: