VWAP Code not working on longs

Forums ProRealTime English forum General trading discussions VWAP Code not working on longs

Viewing 4 posts - 1 through 4 (of 4 total)
  • #232077

    Hi,

     

    I have taken the VWAP code logic used by PRT and have a simple trading system to buy when close is below VWAP. I am running this on US 500 DFB on a 15M timeframe. The code works as an indicator but when I am trying to use it to build a trading strategy it is not returning any executions which is incorrect. Can you see any error in the code posted below

     

     

    #232081

    Is it due to day always being different to day[1] and so d will always = o and so vwap will always = 0 using d = 0 in the formula below …

     

    #232083

    it’s not the other way round

     

    #232084

    Perfect – thanks

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

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