Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText using OnMarketData

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

    DrawText using OnMarketData

    Hi,

    I'm trying to use DrawText with data calculated using OnMarketData which prints to the output screen correctly but doesn't seem to update via the DrawText method correctly and is somewhat delayed?

    Any reason as to why this would be?

    suprsnipes

    #2
    Hi, yes we would expect this difference to be seen - would suggest to review this thread where the same issue was discussed - http://www.ninjatrader.com/support/f...d.php?p=284863

    Comment


      #3
      I checked out the post but don't quite understand how to implement...
      Originally posted by johanps68 View Post
      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...
      . The other suggestion is a .dll and not much help either. Are there any other posts that I can look at obtaining a solution for this?

      Comment


        #4
        Actually after your suggestion I came across this...which seems to have made an improvement, thanks Bertrand.

        Originally posted by NinjaTrader_JC View Post
        Hello CuriProgrammer,

        For ChartControl.Refresh() you may want to try to put this inside of your OnMarketData event. For example:

        if (e.MarketDataType == MarketDataType.Bid){
        BidPrices[0] = e.Price;
        if(ChartControl != null) ChartControl.Refresh();
        }


        As for a supported method to do this you may use the a Plot and change the style to a Bar plot do something like the same for this. A good example is the "BuySellVolume" indicator that comes loaded inside of NinjaTrader.

        Let me know if that works for you.

        suprsnipes

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        311 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        350 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X