• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GoTo/Jump to Bar - Scroll horizontally

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

    GoTo/Jump to Bar - Scroll horizontally

    How can i jump to a specific bar (Number or date) per ninja script? I have added 2 Buttons in the menustrip (PREVIOUS, NEXT) and want to use them as trigger. Like "same time - next day". In the existing code i have a list which is holding the prior chosen bar datetimes.
    Finally i want to press the buttons and the chart/cursor moves to/over the target bar and displays the related values of the bar in the data box.

    Thanks for some hints, links or code snippets!

    #2
    Hello Koepisch,
    Welcome to the forum and I am happy to assist you.

    You can play with the charts Horizontal Scroll bar with the below code, but let me add, this beyond what we can officially support.

    Code:
    HScrollBar hs = (HScrollBar)ChartControl.Controls["scrChart"];
    http://msdn.microsoft.com/en-us/libr...scrollbar.aspx

    To know the specific bar you can use the GetBar function. Please refer to our help guide to know more about it.
    http://www.ninjatrader.com/support/h...tml?getbar.htm
    Joydeep M.NinjaTrader Customer Service

    Comment


      #3
      Thanks,

      unfortunately i've tried this already and i can "move" the scrollbar but without moving the chart. So it seems that isn't possible this way. I try using SendMessage.

      Regards
      Koepisch

      Comment


        #4
        Originally posted by Koepisch View Post
        Thanks,

        unfortunately i've tried this already and i can "move" the scrollbar but without moving the chart. So it seems that isn't possible this way. I try using SendMessage.

        Regards
        Koepisch
        Hello Koepisch, can you share some code on this? please

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by dariuszszyc, Today, 09:08 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by Sadat, Today, 09:09 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by login_dejavu, Today, 07:57 AM
        4 responses
        17 views
        0 likes
        Last Post login_dejavu  
        Started by Lender, Yesterday, 05:15 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by rcmcd, Today, 07:52 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Working...
        X