Announcement

Collapse
No announcement yet.

Simple closing price channel

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

  • Simple closing price channel

    I am trying to find or create a very simple study: a closing price channel. This would be similar to the "normal" Donchian channel, which displays a channel between the highest intraday highs and lowest intraday lows of the last n periods. However, I simply want a channel whose upper line is the highest CLOSE of the past n periods and whose lower line is the lowest CLOSE of the past n periods. I am guessing that this is exceedingly simple to do, but I have spent hours trying to attack this from many different angles to no avail.

  • #2
    denver11
    I think the attached does what you asked.
    The length of the lookback can be modified through Edit Studies (default is 20)
    Alex

    Attached Files

    Comment


    • #3
      1-day offset

      Alex--Thank you. That's outstanding. One comment and one question:
      1. The variables named "High" and "Low" are reversed in the formula. That was an easy fix.
      2. What is the best way to put a 1-day offset in there? I.e. if I have a 9-day lookback, I want to see if there was a breakthrough on the 10th day, which is the present day. I'm sure this is also very simple, but my only experience is with TradeStation. Thanks again. --Mike

      Comment


      • #4
        Mike
        In the efs replace var vPlot1 = close(); with var vPlot1 = close(-1);
        Alex

        Comment

        Working...
        X