• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData Updates using DrawTextFixed

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

    OnMarketData Updates using DrawTextFixed

    Hi,

    I am after any suggestions as to how I can use DrawTextFixed within OnMarketData to display the most recent updates to bid ask last? I have attempted ChartControl.Refresh however there still appears to be a difference of 1 update. When using Print the updates are of course being seen as expected.

    Regards,
    suprsnipes

    #2
    Hello suprsnipes,

    Thank you for writing in.

    You shouldn't need to do anything except utilizing DrawTextFixed() to update your text as every call of OnMarketData() will call DrawTextFixed() again.

    I've provided a script sample that demonstrates this. The sample displays both bid and ask on the chart and it matches the bid and ask updates on the Chart Trader.

    If this is not the case with your own script, can you please provide your script so I may test on my end?

    To export your script do the following:
    1. Click File -> Utilities -> Export NinjaScript
    2. Enter a unique name for the file in the value for 'File name:'
    3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
    4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


    Below is a link to the help guide on Exporting NinjaScripts.
    http://www.ninjatrader.com/support/h...nt7/export.htm
    Attached Files
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Thanks for your response. Add e.Volume to your code and you will see what I am referring too.

      suprsnipes.

      Comment


        #4
        Hello suprsnipes,

        Thank you for the additional information.

        You'll want to lower your chart's display update interval. This specific property can be found by right-clicking in your chart and selecting Properties.

        This property will be within the Window category. Please note that a value of 200 ms or less (0.2) will be CPU intensive and can adversely affect performance especially in high volatile market activity.

        For more information about the chart properties window, please take a look at the NinjaTrader help guide at this link: http://ninjatrader.com/support/helpG...properties.htm

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Thanks I have tried this also, same outcome 1 update behind.

          Comment


            #6
            Hello suprsnipes,

            For additional clarification, can you please provide a video of the behavior that you are seeing?

            Here is a link to a third party software called Jing that would allow you to record a video: https://www.techsmith.com/jing.html
            Zachary G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fredfred, Today, 03:41 AM
            2 responses
            5 views
            0 likes
            Last Post fredfred  
            Started by TraderYoda, Today, 03:33 AM
            0 responses
            0 views
            0 likes
            Last Post TraderYoda  
            Started by pjsmith, Today, 02:56 AM
            0 responses
            2 views
            0 likes
            Last Post pjsmith
            by pjsmith
             
            Started by ntbone, Yesterday, 08:10 PM
            0 responses
            9 views
            0 likes
            Last Post ntbone
            by ntbone
             
            Started by chrislou, 08-28-2015, 03:27 AM
            14 responses
            2,882 views
            0 likes
            Last Post nkhoi
            by nkhoi
             
            Working...
            X