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.
            BertrandNinjaTrader Customer Service

            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 fx.practic, 10-15-2013, 12:53 AM
                5 responses
                5,406 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by Shai Samuel, 07-02-2022, 02:46 PM
                4 responses
                98 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by DJ888, Yesterday, 10:57 PM
                0 responses
                8 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by MacDad, 02-25-2024, 11:48 PM
                7 responses
                160 views
                0 likes
                Last Post loganjarosz123  
                Started by Belfortbucks, Yesterday, 09:29 PM
                0 responses
                9 views
                0 likes
                Last Post Belfortbucks  
                Working...
                X