Show Plot – Intraday High/Low with ATR

Optuma Forums Optuma Scripting Show Plot – Intraday High/Low with ATR

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #60525
    AvatarAnnette
    • Topics: 2
    • Replies: 1
    • Posts: 3

    Hello,

    I am trying to plot two intraday levels… the intraday high – 20 day ATR and the intraday low + the 20 day ATR. So far I have:

    X1 = VALUEWHEN(HIGH(Day(PERIODAMOUNT=1)));
    X2 = VALUEWHEN(LOW(Day(PERIODAMOUNT=1)));
    X3 = ATR(Day(PERIODAMOUNT=1), BARS=20);
    Plot1 = X1 – X3;
    Plot2 = X2 + X3;
    Plot1.Color = Green;
    Plot2.Color = Red;

    I’ve tried different inputs (High/Low/HighestHigh/LowestLow) and not having any success.

    Appreciate any help. Thanks,
    Annette

    #60535
    DarrenDarren
    • Topics: 62
    • Replies: 503
    • Posts: 565

    Hi Annette,

    The HIGH() and LOW() functions are the values, so no need for the VALUEWHEN. You just to add/subtract the ATR value. Try this in a Show Plot:

    Here’s the plot on a daily and 15 minute chart of $FDX. You’ll see the values are slightly different as the intraday chart includes the pre- and post-market highs and lows, whereas the daily chart doesn’t.

    Capture

    1 user thanked author for this post.
    #60595
    AvatarAnnette
    • Topics: 2
    • Replies: 1
    • Posts: 3

    Brilliant, Thanks Darren!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close