Announcement

Collapse
No announcement yet.

How to draw High/Low channel lines from prior week

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to draw High/Low channel lines from prior week

    Hello,
    Assume I'm viewing a daily bar chart of some symbol. I'd like see two horizonal lines across the current week's price bars.
    One line is the high of the previous week and the other is the low of the previous week.
    I'd actually like to be able to configure the HL channel lines to be for some specified week in the past. I.e. not just last week but from any N week ago.
    I thought (almost 100% sure) I'd seen code for this but can't locate.

    Does this ring a bell to anyone? Thought I'd check before starting from scratch. Thanks

  • #2
    rlewkov
    There are a number of ways you can do that.
    The simplest (albeit more limited) is using the OHLC built-in study which allows you to plot the OHLC values based on a number of intervals, weekly included. The limitation is that you can only plot the current and/or prior week's values
    Beyond that you can simply use the high() and low() functions passing to them the weekly interval and the bar index of the week you wish to plot. See the EFS KnowledgeBase for the syntax (complete with examples) required to do this.
    In addition search the EFS forum as there are many examples that others - myself included - have posted based on similar requests
    Alex


    Originally posted by rlewkov View Post
    Hello,
    Assume I'm viewing a daily bar chart of some symbol. I'd like see two horizonal lines across the current week's price bars.
    One line is the high of the previous week and the other is the low of the previous week.
    I'd actually like to be able to configure the HL channel lines to be for some specified week in the past. I.e. not just last week but from any N week ago.
    I thought (almost 100% sure) I'd seen code for this but can't locate.

    Does this ring a bell to anyone? Thought I'd check before starting from scratch. Thanks

    Comment

    Working...
    X