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 raffu, Today, 11:41 AM
                0 responses
                1 view
                0 likes
                Last Post raffu
                by raffu
                 
                Started by carnitron, 04-27-2024, 08:42 PM
                2 responses
                19 views
                0 likes
                Last Post carnitron  
                Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
                13 responses
                52 views
                0 likes
                Last Post cmtjoancolmenero  
                Started by sgordet, Today, 10:40 AM
                0 responses
                2 views
                0 likes
                Last Post sgordet
                by sgordet
                 
                Started by RaygunWizzle, Today, 09:30 AM
                2 responses
                22 views
                0 likes
                Last Post bltdavid  
                Working...
                X