Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Update of Drawing Objects

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

    Update of Drawing Objects

    I'm new to Ninja, and one of my first little script projects leaves me with this problem:

    The plan is to draw a horizontal line on the chart representing the current bid/ask. Ninja apparently displays last trade price for the chart bar, and occasionally bid/ask will wander away from the last trade.

    I order the bid/ask lines to be drawn inside OnMarketData() event.

    The lines do not seem to be drawn/redrawn unless there is a change in the last price ( a tick) on the chart.

    How do I force an update of the chart when I draw/redraw a horizontal line?
    Attached Files
    Last edited by phylum; 05-27-2008, 01:04 PM.

    #2
    Your observation is correct. We currently do not support forced repaints of the chart from a script.
    RayNinjaTrader Customer Service

    Comment


      #3
      Well, put it on your "things to do" list, please...

      Comment


        #4
        Thanks for the suggestion. We will add it to the list for you.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Has that "to-do-item" been done yet?
          I've come across the same issue when calling DrawText() from within OnMarketData(). The chart doesn't update unless there's a new Tick coming in.
          I'm using 7.0.1000.9...

          Comment


            #6
            johanps68, welcome to our forums - that item is still active on our feedback list for future consideration, I've added your vote in here as well.

            Comment


              #7
              Actually, I found a way around this; the solution is to mimic the tricks in the BarTimer indicator. In essence, introduce a timer, trigger a custom event in the TimerEventProcessor() method, and then call
              ChartControl.ChartPanel.Invalidate();
              from within the custom event handler...

              Comment


                #8
                Hi johan, phylum,

                I just made a simple indicator, which shows current bid/ask level and updates if those are updated regardless tick data (based to Johan's hint). The PVBidAsk indicator is downloadable free of charge from http://pvoodoo.com/IndicatorList.html

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Mindset, 04-21-2026, 06:46 AM
                0 responses
                118 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by M4ndoo, 04-20-2026, 05:21 PM
                0 responses
                166 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by M4ndoo, 04-19-2026, 05:54 PM
                0 responses
                85 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by cmoran13, 04-16-2026, 01:02 PM
                0 responses
                130 views
                0 likes
                Last Post cmoran13  
                Started by PaulMohn, 04-10-2026, 11:11 AM
                0 responses
                88 views
                0 likes
                Last Post PaulMohn  
                Working...
                X