Volume display new high/low

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17486 quote
    yoannyoann
    Participant
    New

    Hi,

    Hi,

    I’m considering to change to PRT. I just want to make sure that the only “special” indicator I’m using (mt4) is available.

    The “indicator” comes from Gail Mercer and color volume bars depending on if it is a new high/low. It is not complicated but I cannot program. I’ve the code for mt4, but I assume that it cannot be copy/paste into PRT.

    See page 3 in this pdf for a better clarifycation.

    Volume-Divergence.pdf
    #17488 quote
    NicolasNicolas
    Keymaster
    Legend

    If this indicator is not copyrighted, it can be converted to PRT. If you have the source file (.mq4), I can have a look at the code between 2 other requests 🙂

    #17605 quote
    yoannyoann
    Participant
    New

    Superb, thanks!

    I’ve attached the file.

    specVolume.mq4
    #17619 quote
    NicolasNicolas
    Keymaster
    Legend

    Please find below the mt4 version translated to prorealtime code:

    //PRC_Spec Volume | indicator
    //30.11.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted and adapted from Metatrader4 version
    //http://www.prorealcode.com/topic/volume-display-new-highlow/
    
    if(High>High[1] and Low>=Low[1]) then  //made higher high and higher low -> high bar
    upvol = Volume
    downvol = 0
    neutralvol = 0
    elsif(High>High[1] and Low<Low[1]) then //made higher high and lower low -> neutral bar or outside bar
    upvol = 0
    downvol = 0
    neutralvol = Volume
    elsif(High<=High[1] and Low<Low[1]) then //made lower high and lower low -> low bar
    upvol = 0
    downvol = Volume
    neutralvol = 0
    elsif(High<=High[1] and Low>=Low[1]) then //made lower high and higher low -> inside bar
    upvol = 0
    downvol = 0
    neutralvol = 0
    endif
    
    return upvol coloured(0,0,255) as "up volume", downvol coloured(255,0,0) as "down volume", neutralvol coloured(128,128,128) as "neutral volume"

    Will be posted to the Library too. Of course you’ll need Volume for the indicator to work (not the case for forex CFD contracts for instance ..). See screenshot attached of the indicator’s result on DAX30.

    spec-volume-indicator-prorealtime.png spec-volume-indicator-prorealtime.png volume-indicator-prorealtime.png volume-indicator-prorealtime.png
    #17642 quote
    NicolasNicolas
    Keymaster
    Legend

    Indicator added to the Library : volume divergence indicator

Viewing 5 posts - 1 through 5 (of 5 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

Volume display new high/low


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
yoann @yoann Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/29/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...