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

Issue with GetCurrent

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

    Issue with GetCurrent

    I'm running a display box on a live chart, as shown in the image. The chart is a 60 min Bid EURUSD.

    Here is the code

    Code:
    string display = String.Format(Bid: {0:0.#####}", GetCurrentBid());
                NinjaTrader.Gui.Tools.SimpleFont myFont = new NinjaTrader.Gui.Tools.SimpleFont("Courier New", 12) { Size = 14, Bold = false };
                Draw.TextFixed( this, "bottom-left", display, TextPosition.BottomLeft, Brushes.White, myFont, Brushes.Black, Brushes.Black, 100 );
    And this from OnStateChange()
    Code:
    Calculate                                    = Calculate.OnEachTick;
    The chart shows the bid at 1.06208, but the display reads 1.06289. Why isn't it showing the correct bid?
    Attached Files

    #2
    Hello texasnomad,

    Thank you for your post.

    If you right click in the chart > select Data Series > is the 'Price Based on' parameter set to the Bid or the Last?

    I look forward to your response.

    Comment


      #3
      I've tried running it both on Bid and Last charts. I get the same issue.

      Comment


        #4
        Hello texasnomad,

        Thank you for your response.

        Is this an indicator we may test on our end? If so can you attach it to your response or send it in an email to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email?

        You can export your indicator by going to Tools > Export > NinjaScript Add On > Add > select your indicator > OK > Export > name the file 'NTsupport' > Save.

        The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your response.

        Comment


          #5
          File sent.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by martin70, 03-24-2023, 04:58 AM
          15 responses
          114 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by The_Sec, Today, 02:29 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by jeronymite, 04-12-2024, 04:26 PM
          2 responses
          30 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by Mindset, 05-06-2023, 09:03 PM
          10 responses
          265 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by michi08, 10-05-2018, 09:31 AM
          5 responses
          743 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X