Any way to have empty space on right of the chart even when scrolling ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #253967 quote
    0309
    Participant
    New

    Hi,

    I noticed that there is an option to set the empty space on right of the chart, after the last bar ( for example 20% ), but that applies after the last bar / traded price only.

    I was wondering if there is an option to have this empty space even when scrolling horizontally through the chart ? ( If I remember correctly this option existed in NinjaTrader platform).

    If there is no option, any way to “hide” or “cover” price for  X% of the screen on the right side by the mean of a custom indicator ( though based on documentation, I am not sure what to use to achieve it) ?

    Thank you !

    #253986 quote
    Iván González
    Moderator
    Master

    Hi! I think, as you correctly stated, it's not possible to maintain the right margin. Only from the last bars onwards.

    2025-11-26_16-11.png 2025-11-26_16-11.png
    #254013 quote
    0309
    Participant
    New

    Thank you for the reply still.

    I actually found a very simple way to achieve it.

    If some day anyone would like to achieve similar result, here is what I did :

    FOR i = 0 TO 80 DO
    DRAWVLINE(-400 + i*5) ANCHOR(TOPRIGHT, XSHIFT, YSHIFT) COLOURED(30,30,30,255) STYLE(line,5)
    NEXT
    
    RETURN

    (I used FOR loop but basically what we are doing is drawing a vertical line every 5 unit of X axis like this :

    DRAWVLINE(-400)ANCHOR(TOPRIGHT, XSHIFT, YSHIFT)coloured(30,30,30,255)style(line,5)
    DRAWVLINE(-395)ANCHOR(TOPRIGHT, XSHIFT, YSHIFT)coloured(30,30,30,255)style(line,5)
    DRAWVLINE(-390)ANCHOR(TOPRIGHT, XSHIFT, YSHIFT)coloured(30,30,30,255)style(line,5)

    etc… until 0 )

    You can modify the -400 value depending from where you wish to hide the price, and then adapt.

    At first I tried with DRAWRECTANGLE and FILLCOLOR or BORDERCOLOR and COLOURED, but unfortunately it colored only background and did not cover price and indicators. But DRAWVLINE worked just fine.

    So now I can scroll through the chart and having this seemingly “empty space”.

    robertogozzi, PeterSt and Iván González thanked this post
    hide-right-side-of-the-chart.png hide-right-side-of-the-chart.png
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Any way to have empty space on right of the chart even when scrolling ?


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
0309 @0309 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by 0309
3 months ago.

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