Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is SlotIndex == BarIndex?

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

    Is SlotIndex == BarIndex?

    Hi,

    Just a quick question. I have a rectangle (System.Windows.Rect) of which I know the left and right X positions. To see which bars on my chart this represent, I do a chartControl.GetSlotIndexByX(myRect.X) for example. A couple of questions on this:
    • Why does the above method take an int as a parameter? Surely a mouse click for example is very rarely on exactly an int value on the chart
    • The method returns a double. Is the int part of this value the same as the BarIndex?


    I am trying to determine what range of bars in my chart the rectangle spans, hence my question.

    Any help would be greatly appreciated.

    Regards,
    John Steinberg
    Last edited by JohnSteinberg; 10-12-2016, 10:45 PM. Reason: Fixed typo

    #2
    Hello,

    Thank you for the post.

    I have reviewed the syntax and currently there is no exposed method specifically for what you are intending to use this for. Rather than getting a Bar index, this gets the bars Slot or space allocated for it. I had provided an example to development and this item was added as issue NTEIGHT-10552.

    There will be a specific method to correctly return an index of a bar from a given x value.This should be noted in the change log in the upcoming release.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you

      Hi Jesse,

      Thank you very much for the reply an support. I will be looking at upcoming release notes for the method.

      Regards,
      John
      Last edited by JohnSteinberg; 10-16-2016, 04:24 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Haiasi, 04-25-2024, 06:53 PM
      4 responses
      55 views
      0 likes
      Last Post effraenk  
      Started by ccbiasi, 11-23-2017, 06:06 AM
      5 responses
      2,199 views
      0 likes
      Last Post leodavis  
      Started by kujista, Yesterday, 12:39 AM
      2 responses
      14 views
      0 likes
      Last Post kujista
      by kujista
       
      Started by Austiner87, Yesterday, 11:24 AM
      2 responses
      12 views
      0 likes
      Last Post brucerobinson  
      Started by Rogers101, 05-05-2024, 11:30 AM
      3 responses
      21 views
      0 likes
      Last Post Rogers101  
      Working...
      X