OpenM (Function)
The OpenMseries function allows you to reference the monthly Open of a previous month in an intraday chart (minute
Syntax
OpenM(PeriodsAgo)
Returns (Double)
The monthly Open price from a specified number of months ago. If there is not enough data, the function will return –1.
Parameters
Name |
Type |
Description |
PeriodsAgo |
Numeric |
Sets the number of months back to reference a previous month’s Open price. (0 = This month's current Open) |
Remarks
You must have enough intraday data in the chart in order to look back and reference any previous monthly Open. For example, if you want to look back at the Open of 11 months ago on a 60-minute chart, you must have at least 12 full months of 60-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 month’s current Open.
Example
In order to place a buy limit order at the Open of the previous month you would write:
Buy Next Bar at OpenM(1) Limit;