Painting indicators below price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #227936 quote
    jagui
    Participant
    New

    Is there a way to plot indicators below price candles?

    For example, when a moving average line cross a candle, the candle is painted below the MA line and not above, as I would like. Other platforms have options to paint indicators below price. Is this possible with PRT?

    #227938 quote
    GraHal
    Participant
    Master

    I must be misunderstanding your question … see attached, when any MA crosses below price then price appears above the MA?

    Screenshot-2024-02-11-193756.png Screenshot-2024-02-11-193756.png
    #227940 quote
    jagui
    Participant
    New

    Sorry for being unclear… what I mean is that I would like the price candles to be painted above all indicators, so that they don’t get partially covered by indicators… the price candles should cover the indicators. This way the charts remains enough clear-looking, even if there are many indicators on it.

    A programmer would describe this by saying that price candles should have an higher z-index than indicators.

    GraHal thanked this post
    #227941 quote
    JS
    Participant
    Senior

    Hi,

    Do you mean something like that…?

    jagui thanked this post
    Scherm­afbeelding-2024-02-11-om-21.07.25.png Scherm­afbeelding-2024-02-11-om-21.07.25.png
    #227943 quote
    jagui
    Participant
    New
    Yes, exactly.
    #227944 quote
    JS
    Participant
    Senior

    “A programmer would describe this by saying that price candles should have an higher z-index than indicators”

    That’s right, the “z-index” is called here: “alpha” value for transparency purpose (alpha value varies from 0 to 255)

    When you set the alpha values for the indicator lower than the alpha values of the candles, the indicator hides behind the candles…

    MA20=Average[20](Close)
    
    If Close>Open then
    DRAWCANDLE(open, high, low, close) Coloured(0,255,0,255)
    Else
    DRAWCANDLE(open, high, low, close) Coloured(255,0,0,255)
    EndIf
    
    Return MA20 Coloured(0,0,255,200) Style(Line,5)
    GraHal and Iván González thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Painting indicators below price


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
jagui @jagui Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by JS
2 years ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 02/11/2024
Status: Active
Attachments: 2 files
Logo Logo
Loading...