UP DOWN DAY 10 DAY VOLUME RATIO

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #177639 quote
    Alfy
    Participant
    Average

    Hi guys, i wonder if anyone can help. I’m looking to create a ratio of total volume on up days (close>close [1]) of the last 10 trading days to the volume on the down days in the last 10 trading days. Can anyone help please?

    Thanks in advance and best regards

    #177671 quote
    robertogozzi
    Moderator
    Master

    There you go:

    //N = 10                                        //10  bars
    UP  = summation[N](Volume * (close > close[1]))
    DN  = summation[N](Volume * (close < close[1]))
    //R = UP / DN                                   //simple Ratio
    R   = UP * 100 / (UP + DN)                      //%
    RETURN R AS "Ratio Up/Down %"

    If you import the attached ITF file the variable N is already declared. If you prefer copying & pasting the above code, then uncomment line 1.
    You can change the type of ratio simply swapping comments between lines 4 and 5.

    Alfy and Nobody thanked this post
    Ratio-UpDown.itf
    #177676 quote
    Alfy
    Participant
    Average

    Thanks so much Roberto!

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

UP DOWN DAY 10 DAY VOLUME RATIO


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Alfy @alfy Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Alfy
4 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/15/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...