Distanza in punti e in % dal VWAP

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #245355 quote
    Gabriele BattistaGabriele 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álezIván González
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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álezIván González
1 year, 5 months ago.

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