vwap strategy intraday timeframe help needed

Forums ProRealTime English forum ProOrder support vwap strategy intraday timeframe help needed

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

    Hiya

    I’m trying to set up this intraday strategy based on vwap, but I think I miss how to properly define trending days and inside days.

    Concept is: if price breaks out of previous day high or low, it will continue on that direction (maybe retesting those levels for confirmation of direction… not sure how to code this), so I’m setting a buy on weakness (low bollinger) ,a target based on 3std deviations from vwap (using prc vwap intraday indicator, as the built in vwap can’t be used in proorder apparently), and the vwap acts as a trailing stop.

    If the price action is between previous days high or low I’ll short on strenght (upper bollinger, and over 3 std devs from vwap )/buy on weakness(lower bollinger and under 3 std dev from vwap ) with vwap as a target.

    What does not seem to work is the definition of long/short days and inside/swing days, as I’ve seen the strategy going long/short also when price isn’t above or below previous days highs or lows..

    Any help will be much appreciated!

    Cheers

    A

     

    #160674

    You are only checking if the CURRENT prive (which is CLOSE) is within the yesterday’s boundaries, not if the WHOLE current day is within yesterday’s range. Try replacing line 31 with:

     

     

    1 user thanked author for this post.
    #161237

    Thanks for the reply, I’ve rearranged the code a bit, but another issue came out:

    Entered a long position with conditions defined in “longday” (so price was higher than the previous day high) but did not exit the position at vwap as supposed to. I think that’s because vwap was inside the previous day high and low, so maybe the system changed form “longday” to “swingday”. But still one of the condition to close longs on inside days is for the price to be above vwap (as a target), so I’m not sure what the code reads in this case, eventually the code closed the position with the stoploss, so it completely ignored the stops also for the inside day strategy as price did pass below vwaps low 3 std dev.

    I’ve attached a picture with my comments, and the new code above.

    Cheers!

    A

     

    #161247

    I suggest that you append these lines to your code:

    (and you may add more) they will help you spot any wrong value at any given bar in the variable window that ProBackTest opens (only when GRAPH is used).

     

     

    1 user thanked author for this post.
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