vwap previous close line

Forums ProRealTime English forum ProBuilder support vwap previous close line

  • This topic has 11 replies, 2 voices, and was last updated 3 years ago by avatarkeks.

Tagged: ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • #179739

    Hi, I would like to draw a horizontal line on the intraday chart that represents last observed daily vwap level of previous session of trading. So in essense:

    line1 = dclose(1)
    return line1 coloured(255,255,255)

    Except I do not want dclose, instead want to see where daily vwap was at close previous session. Would anyone PLEASE let me know how I can create this?

     

    THANKS!!

     

    #179740

    There you go:

     

    1 user thanked author for this post.
    #179743

    THANKS!!!!

    I modified code slightly:

    Timeframe(Daily,UpdateOnClose)
    if volume > 0 then
    d = max(1, intradaybarindex)
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    Timeframe(default)
    return VWAP AS “Daily VWAP”

     

     

    #179744

    Hmm.. it seem to work for a bit then get calculation error and the indicator drops off the chart. Not sure what is wrong with code

    #179746

    in the attached pic the green is daily vwap, red is the code above… ideally i would like the red line to extend from where green on ends on previous day. strategy under development will build signals based on whether price remains above previous day vwap….

    #179748

    I am not getting any error with both of them.

    Anyhow, you are NOT calculating VWAP, your code simply returns TypicalPrice.

     

    1 user thanked author for this post.
    #179751

    I also got the error message now. I think it’s due to the high number involved summing up they daily volume*typicalprice for the intradaybarindex.

     

    #179752

    would it be easier/less calc to use last observed vwap level of previous session instead of calculating? In other words previous session daily vwap close… seem to be an lighter way to accomplish this however I am not sure how to code this

    #179754

    I did in my first reply.

     

    1 user thanked author for this post.
    #179838

    thanks again.

    would you be chance be willing to help me specify time interval of previous day session for the vwap calculation line to be based off?

    For example, let us assume I want to use index futures previous day vwap level during ordinary trading session only as an indicator on the following day trading session…

    #179841

    To make it work in a time interval the daily timeframe can’t be used.

    The code you wrote is almost correct, provided the TIMEFRAME keyword is removed. Then a time interval must be added:

    1 user thanked author for this post.
    #179871

    thanks so much for taking the time to update this code. Still this does not seem to give me a horizontal line marking previous end of session vwap level….

    the reason I like having this drawn is many of the securities I follow seem to trade differently based on whether they are above or below previous session vwap…

    I will try to figure out how to get an accurate line drawn using clues from your code, but so far still not where I would like to be!

Viewing 12 posts - 1 through 12 (of 12 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login