OpenW (Function)
The OpenWseries function allows you to reference the weekly Open of a previous week in an intraday chart (minute
Syntax
OpenW(PeriodsAgo)
Returns (Double)
The weekly open price from a specified number of weeks ago. If there is not enough data, the function will return –1.
Parameters
Name |
Type |
Description |
PeriodsAgo |
Numeric |
Sets the number of weeks back to reference a previous week’s open price. (0 = This week's current open) |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous weekly open. For example, if you want to look back at the open of 15 weeks ago on a 30-minute chart, you must have at least 16 full weeks of 30-minute bars in the chart.
The value for the PeriodsAgo input parameter should always be a whole number greater than or equal to 0. Setting PeriodsAgo to 0 returns this week’s current open.
Example
In order to place a buy limit order at the open of the previous week you would write:
Buy Next Bar at OpenW(1) Limit;