9:30 opening bar
Author: dankimel
Creation Date: 5/14/2009 4:21 PM
profile picture

dankimel

#1
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
profile picture

Cone

#2
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.
profile picture

kazuna

#3
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.
profile picture

Cone

#4
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.
profile picture

kazuna

#5
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?
profile picture

Cone

#6
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.
profile picture

kazuna

#7
Exactly. Somehow I think I got mixed up.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).