Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modify OHLC bars look

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Modify OHLC bars look

    I want to modify the OHLC bars look so that the open and close line segments are almost 100% width of the bars and the bar body remains very thin.
    Currently when I make the bars wider by using <SHIFT><CTRL><up arrow> and <down arrow> then when the bars get wider body of the bar gets way to wide so that it becomes fuzzy and outgrows the actual prices of the highs and lows of the bar. If the body of the bar remains very thin while the open and close segments of the bar are much longer than what is currently reasonable with NT then it's easier to read the OHLC values both when zoomed in or when zoomed out. I don't know why you are making the bars fuzzy when widening and I don't expect you to change your code but I'd like to make my own version of the OHLC bars as a bars add on.

    If you could give me a hint and let me know if I could reuse your bars code and maybe what section of the code to work on to keep the bars body very thin while making the Open and Close segments almost 100% width of the bar to bar spacing.
    I've attached a png (top pic) showing what I'm trying to get from NT - as you can see the open segment of the new bar almost touches the close segment of the previous bar.
    I've also attacched a png (bottom pic) of what NT looks like when I size the bar for ~100% bar spacing and you can see that the bar body is taking up about 1/3 of the total available horizontal space for the bar and I want to modify that so the bar body remains very thin or the thinnest setting possible.

    thanks

    Click image for larger version

Name:	bars-wide.png
Views:	16
Size:	10.5 KB
ID:	1123891


    Click image for larger version

Name:	ninja-bars2.png
Views:	17
Size:	28.7 KB
ID:	1123893
    Attached Files

    #2
    Hello dtl-saw, thanks for posting.

    The ChartStyle is what you would need to modify. See the original "OHLC" chart style within the Chart Styles of the editor. You may make a copy of this script and modify it. The important part of the code is in the OnRender method. Please review this code and let me know if any questions come up.

    Kind regards.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by KirkHammett, Yesterday, 11:15 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by soon123, Yesterday, 11:12 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Unsuitable, Yesterday, 06:30 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Tuxstuff215, Today, 06:32 AM
    0 responses
    10 views
    0 likes
    Last Post Tuxstuff215  
    Started by sandman, Today, 04:58 AM
    0 responses
    7 views
    0 likes
    Last Post sandman
    by sandman
     
    Working...
    X