Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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

    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 Tim-c, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        2 views
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,771 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        945 views
        0 likes
        Last Post spwizard  
        Working...
        X