Distanza in punti e in % dal VWAP

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #245355 quote
    Gabriele Battista
    Participant
    Senior

    Vorrei scrivere un indicatore che mi consenta di calcolare la distanza del close della candela dal VWAP in punti e in %. E’ possibile?

    #245376 quote
    Iván González
    Moderator
    Master

    Ecco qui

    //----------------------------------------------//
    // VWAP
    //----------------------------------------------//
    if day<>day[1] then
    d=1
    VWAP=typicalprice
    else
    d=d+1
    if volume >0 then
    VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
    endif
    sd = std[d](abs(typicalprice-vwap))
    endif
    //----------------------------------------------//
    // Distance
    //----------------------------------------------//
    dist=close-vwap
    distP=round((close/vwap-1)*100,2)
    //----------------------------------------------//
    RETURN distP  as "Dist%" style(histogram), 0
    robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Distanza in punti e in % dal VWAP


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
10 months, 2 weeks ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 03/27/2025
Status: Active
Attachments: No files
Logo Logo
Loading...