• 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

Detect Horizontal Scrolling / "Play Icon"

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

    Detect Horizontal Scrolling / "Play Icon"

    Hi,

    i'm developing my own Volume Flow Indicator. I works good, but i try to do some improvements.

    When showing current bar/price (i use tick charts and bars), the chart is scrolling vertical with the price to see the current price bar on the chart window. that's default on all charts.
    When i scroll back to the past(horizontal scrolling), i will get this "play icon" in the top right corner, thats clickable to scroll to the current bar.

    Is it possible with ninja script to get the info, that i have scrolled to the past? I need this, to turn off my "auto centering mode". When i watch the current bar, auto centering mode is working perfectly to have at least the current bar centered on screen. But when i scroll to the past, i want to turn off the centering OR i want to centering the last bar to the right, that would be the best option. but turning off would be ok.

    So, is it possible to find out that my chart is not showing the current bar because i scrolled to the past?


    Greetings,
    Tom

    #2
    Hello Tom299,

    Thank you for writing in and welcome to the NinjaTrader Support Forum!

    What you can do is compare the value of CurrentBar to the value of this undocumented code: this.LastBarIndexPainted.

    If this.LastBarIndexPainted is less than CurrentBar, this would denote that the CurrentBar isn't being painted on the chart and, therefore, you have scrolled back.

    For more information about CurrentBar, please take a look at this help guide link: https://ninjatrader.com/support/help...currentbar.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hi Zachary,

      thank you very much, it works fine with LastBarIndexPainted :-)


      One more question: is it possible to react on the event when the user clicks the "F" in the upper right scale to reset zooming etc? I would like to center and resize my indicator at this point too.


      Greetings,
      Tom

      Comment


        #4
        Hello Tom299,

        I do not know of a way how this can be accessed in NinjaTrader 7.

        However, NinjaTrader 8 will allow one to access this property. NinjaTrader 8 provides documentation on both ChartPanel and ChartScale classes:
        http://ninjatrader.com/support/helpG...chartpanel.htm
        http://ninjatrader.com/support/helpG...properties.htm

        You'd be able to access this with YAxisRangeType, Fixed being the enum value that denotes an "F" appearing on the chart.

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Thank you for this info

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by mreanuzlazx, Today, 01:30 AM
          0 responses
          1 view
          0 likes
          Last Post mreanuzlazx  
          Started by xinepev, Today, 12:33 AM
          0 responses
          3 views
          0 likes
          Last Post xinepev
          by xinepev
           
          Started by sun0781, Yesterday, 05:02 PM
          0 responses
          7 views
          0 likes
          Last Post sun0781
          by sun0781
           
          Started by ronhb107, 09-12-2019, 10:09 AM
          4 responses
          43 views
          0 likes
          Last Post Mr.Trader  
          Started by rwilliam, Yesterday, 03:55 PM
          0 responses
          4 views
          0 likes
          Last Post rwilliam  
          Working...
          X