Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Get X value for candles

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

    Get X value for candles

    Guys,

    I've got really tedious issue with getting x value of each bar. I want to draw rectangles or boxes to be spreaded at each side of the candles on the chart.

    I used ChartControl.GetXByBarIndex property to identify x value for the rectangles to drawn on each bar. on the current running bars the ninja draws rectangles well, however it shifts all of them to the next opening bar which is the thing that I don't want. I want rectangles on each candle when it starts to tick.

    I tried to store x index value for each bar in sortedList type but ninja behave unexpectedly and rectangles disappear immediately. I've attached two pictures describing what I am saying here.




    Regards
    Attached Files

    #2
    Hi there, unfortunately some of the methods your are using are unsupported. Maybe some of the other community members can help you out.

    Couldn't you just use an array to hold the x-values of interest? Now I'm not particularly familiar with SortedLists, but it seems like that would be overkill for just storing a simple x integer value.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Austin View Post
      Hi there, unfortunately some of the methods your are using are unsupported. Maybe some of the other community members can help you out.

      Couldn't you just use an array to hold the x-values of interest? Now I'm not particularly familiar with SortedLists, but it seems like that would be overkill for just storing a simple x integer value.

      Yes I tried using arrays, arraylists, and dataseries, however the issue gets more complicated as the rectangles shrink to very tiny barely seen behind the text in the top left corner of chart.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by geddyisodin, Today, 05:20 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Max238, Today, 01:28 AM
      3 responses
      32 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by timko, Today, 06:45 AM
      2 responses
      13 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by habeebft, Today, 07:27 AM
      0 responses
      5 views
      0 likes
      Last Post habeebft  
      Started by Tim-c, Today, 03:54 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X