Text on candle stick and volume histogram

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66693 quote
    segie
    Participant
    Senior

    Good day,

    I found this code on the ProRealCode Library.  Need some help with the following.   When the bull line crosses over the bear line I would like to insert a “BULL” text on the:

    1. Corresponding volume bar or histogram on this indicator
    2. On the corresponding Price candle. I would like the “Bull” text to appear just above the candle stick.
    3. Vice versa for when the bear line crosses the bull line.

    All credit to the original designer of the code.

    ref=(close-low)/range
    volbull=ref*volume
    volbear=volume

    if close>=open then
    greenbarcount=1
    greenvolume=volume
    redbarcount=0
    redvolume=0
    else
    greenbarcount=0
    greenvolume=0
    redbarcount=1
    redvolume=volume
    endif
    //media volumi rossi e verdi per media mobile semplice
    mmred=summation[period](redvolume)/summation[period](redbarcount)
    mmgreen=summation[period](greenvolume)/summation[period](greenbarcount)

    return volbear coloured (205,0,0) style (histogram), volbull coloured (0,190,0) style (histogram), mmred coloured (255,0,0) as “Bear average”,mmgreen as “Bull average”

     

    Regards,

    Segie

    #66694 quote
    robertogozzi
    Moderator
    Master

    To write code, please use the <> “insert PRT code” button, to make code easier to read.

    Thank you.

    #66729 quote
    segie
    Participant
    Senior

    Hope this helps

     

    ref=(close-low)/range
     volbull=ref*volume
     volbear=volume
    
    if close>=open then
     greenbarcount=1
     greenvolume=volume
     redbarcount=0
     redvolume=0
     else
     greenbarcount=0
     greenvolume=0
     redbarcount=1
     redvolume=volume
     endif
     //media volumi rossi e verdi per media mobile semplice
     mmred=summation[period](redvolume)/summation[period](redbarcount)
     mmgreen=summation[period](greenvolume)/summation[period](greenbarcount)
    
    return volbear coloured (205,0,0) style (histogram), volbull coloured (0,190,0) style (histogram), mmred coloured (255,0,0) as “Bear average”,mmgreen as “Bull average”
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Text on candle stick and volume histogram


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by segie
7 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/29/2018
Status: Active
Attachments: No files
Logo Logo
Loading...