Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar to bar indicator

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

    Bar to bar indicator

    Hi!
    I want to create an indicator that will allow me to specify the beginning and ending bars. I'd like to point at a bar to indicate the start or end. Can you point me toward a similar example?
    Thanks,
    Molrris

    #2
    Hello mornel,

    Thanks for your post.

    I am not sure I fully understand exactly what you are trying to accomplish. So I may accurately assist, please answer the following questions.

    Are you wanting to get the Open price and Close price of bars on the chart?

    Do you want to get the first bar of a trading session and last bar of a trading session?

    Would you like to get the first bar and last bar on a chart window?

    I look forward to assisting further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      I'm laughing Brandon. I want to do the one method you didn't ask.
      I'm looking at my 5k tick chart right now. It is 15:01 now
      I want to click on a bar, say the one painted at 10:16:11 and it draws a line from then until now or the current bar. It could be the close for that bar. If I know the bar I can figure out the value of close.
      I think it would be like an Anchored VWAP beginnning at th bar or a Volume Profile anchored to the bar. Those two examples come to mind.
      Does that make sense?

      Morris

      Comment


        #4
        Hello Morris,

        Thanks for the clarification.

        Below is a link to an example of printing the price and time from mouse click points.
        https://ninjatrader.com/support/foru...624#post792624

        When accessing series information outside of a data driven method, TriggerCustomEvent() must be called, or the Bars.GetValueAt()/.GetClose()/etc must be used.
        https://ninjatrader.com/support/help...ustomevent.htm
        https://ninjatrader.com/support/help...getvalueat.htm
        https://ninjatrader.com/support/help...8/getclose.htm

        Please note that since this requires using custom C# logic to detect mouse click events to get the information of the bar that is clicked this goes beyond the support we would be able to provide in the Support department.

        To find more information about detecting mouse clicks in C#, you could do a Google search for something like 'OnMouseClick event C#'.​

        This forum thread will be open for other community members to share their insights on the topic.

        Please let me know if I may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        563 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X