BACKGROUNDCOLOR – known bug?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #88590 quote
    robdavrobdav
    Participant
    Veteran

    Hi

    I came across a potential issue when using BACKGROUNDCOLOR in that it doesn’t behave as I believe it should. I wanted to know if this intended behavior or a known issue.

    I have included some sample code to show the problem. If VerticalLines (in the code below/attachment) is set as a configurable variable on this indicator, it does not remove the BACKGROUNDCOLOR by toggling it on/off, whereas toggling DRAWARROW does.

    Thanks

    Rob

    DEFPARAM DRAWONLASTBARONLY = False
    
    // VerticalLines is a boolean, true or false toggle option as a variable for the indicator setting
    // Arrows is a boolean, true or false toggle option as a variable for the indicator setting
    
    // Donchian
    hh = highest[30](High)
    ll = lowest[30](Low)
    
    IF VerticalLines = 1 THEN
    
    // Long signal
    IF close = hh THEN
    BACKGROUNDCOLOR (10,255,10,50)
    ENDIF
    
    // Short signal
    IF close = ll THEN
    BACKGROUNDCOLOR (255,10,10,50)
    ENDIF
    
    ENDIF
    
    IF Arrows = 1 THEN
    
    // Long signal
    IF close = hh THEN
    DRAWARROW(barindex-1,hh) COLOURED (10,255,10,50)
    ENDIF
    
    // Short signal
    IF close = ll THEN
    DRAWARROW(barindex-1,ll) COLOURED (255,10,10,50)
    ENDIF
    
    ENDIF
    
    RETURN
    BACKGROUNDCOLOR-issue.itf
    #88651 quote
    NicolasNicolas
    Keymaster
    Legend

    You are right, I can replicate the issue, I will report it.

    robdav thanked this post
    #102182 quote
    NicolasNicolas
    Keymaster
    Legend

    I had confirmation that this bug is no longer present in the current version of PRT.

    robdav thanked this post
Viewing 3 posts - 1 through 3 (of 3 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

BACKGROUNDCOLOR – known bug?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
robdav @robdav Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/14/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...