Anchored VWAP scripts

Optuma Forums Optuma Scripting Anchored VWAP scripts

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #57277
    Darren
    • Topics: 74
    • Replies: 967
    • Posts: 1,041

    To calculate the distance from the anchored VWAP line for IPOs – and therefore be alerted when the level is crossed – use the following scripts.

    [Click here and here for other IPO posts.]

    Distance from A-VWAP as a Show View tool or watchlist column:

    The following can be added to a watchlist for A-VWAP crosses:

    This shows PTON crossing below, and WORK above:

    Capture

    To format the A-VWAP Cross column right-click on the header and change the Custom Labels to match the values in the script (ie ==1 is Above, etc):

    Capture

    #70951
    Darren
    • Topics: 74
    • Replies: 967
    • Posts: 1,041

    Here’s a script for breakouts above the AVWAP from the previous high. Based on Brian Shannon’s Tweet.

    The high has been defined using a 22 bar Pivot Label, ie there has to be 22 bars (1 month on a daily chart) of lower highs before and after the high. Change the value of $PL (line 3 below) to change the significance of the high.

    AVWAP Pivot Hi Crosses

    #70959
    Paul
    • Topics: 0
    • Replies: 3
    • Posts: 3

    I am pretty new to this kind of scripting. I did not succeed in getting this script plot anything with ShowPlot on a chart. Can anyone share a workbook with this example please?

    #70977
    Darren
    • Topics: 74
    • Replies: 967
    • Posts: 1,041

    Hi Paul,

    The above is a script for a scan, so it won’t plot anything. To automatically plot the AVWAP from a pivot high try this in a Show Plot:

    Workbook attached, with the scan formula in the watchlist column and the AVWAP plotted in blue from the 22 bar pivot high.

    Capture

    #70987
    Paul
    • Topics: 0
    • Replies: 3
    • Posts: 3

    Thank you Darren!

    #71033
    Julia
    • Topics: 1
    • Replies: 1
    • Posts: 2

    Hi,
    I tried to use the above script with the 22 day pivot, but changed the last line to Close() > R1 instead of Plot1= R1  in an attempt to scan for all stocks that are closing today above the AVWAP, but it doesn’t work, even though if I used the same script in the WL, it calculates the AVWAP correctly.
    Any reason why it doesn’t work on the scanner?     I’d like to scan for all stocks that are trading above a 3 month AVWAP for example.
    Thanks!
    Syd

    #71035
    Darren
    • Topics: 74
    • Replies: 967
    • Posts: 1,041

    I’m not sure what formula you are using but this will get you those trading above the VWAP from their 3 month high (as long as the high occurred at least 2 days ago to avoid those making new highs).

    Only 60 of the $SPX members are currently above their 3 month A-VWAP high, with $TSLA 15% above. Duplicate the scan formula above and change the last line to DIFFPCT(CLOSE(),R1) to display the percentage above in a watchlist or Show View.

    Image

    • This reply was modified 6 days ago by Darren.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest