Sell or buy at vwap?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #122118 quote
    Bankman
    Participant
    New

    Hi,

    I’m new to ProRealTime and i hope my problem is easy to solve for some of you.

    I wonder if its possible to ad a sell condition to my long position when price crosses the daily vwap?

    Its easy to add the condition for MA for example, but i can’t get it to work with vwap, even though its possible to add the condition with an alarm..

    Any help is greatly appreciated!

    #122119 quote
    GraHal
    Participant
    Master

    You talking manual trade or auto trade?

    If auto trade then be loads easier all round if you post your code?

    #122120 quote
    Bankman
    Participant
    New

    Okey,

    // conditions to exit long positions
    indicatorl = Average[50](close)
    c2 = (close CROSSES OVER indicatorl)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF

    so this is how it looks for MA50. I basically want the same thing, but with vwap daily. I tried to change it to vwap but it didn’t work.

    #122121 quote
    fifi743
    Participant
    Master
    moy = (high+low+close)/3
    W = (moy*Volume)/Volume
    return w

    The vwap formula is just that.

    GraHal thanked this post
    #122122 quote
    GraHal
    Participant
    Master

    Bankman … remember there is no volume on Fx.

    There is volume on Indexes and Shares.

    #122152 quote
    Vonasi
    Moderator
    Master

    Also bare in mind that VWAP resets at the start of a day and is very volatile until there is a decent sized data sample to calculate the average on so if you trade early in the day expect any VWAP based exit to be easily hit.

    #122230 quote
    Nicolas
    Keymaster
    Master

    VWAP formula is:

    d = max(1, intradaybarindex)
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)

    (reset on each new day).

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

Sell or buy at vwap?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Bankman @bankman Participant
Summary

This topic contains 6 replies,
has 5 voices, and was last updated by Nicolas
5 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/14/2020
Status: Active
Attachments: No files
Logo Logo
Loading...