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

Close different from Bid

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

    Close different from Bid

    While trading forex I print the Close[0], ask and bid values (by the GetCurrentBid and GetCurrentAsk methods). To my surprise, the Close[0] value was different from both the ask and the bid values. I thought the Close[0] should be equal to the current bid value. Can you please explain me the difference between the Close[0] and bid.

    Thanks

    #2
    Hello,
    Can you clarify if you are calling Close[0] in OnBarUpdate with CaculateOnBarClose set to false or true?
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      CalculateOnBarClose = false

      Comment


        #4
        Hello,
        What data provider are you using for forex?
        I look forward to your reply.
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          I use demo account of FXCM

          Comment


            #6
            Hello,
            I have not seen this occur yet using FXCM and testing on a $EURUSD 1 minute chart.
            So that we may investigate this further can you provide a snippet of your code that you are using to determine that the Close is different the the Bid price. Also please provide what instrument you are using to reproduce this.
            Cody B.NinjaTrader Customer Service

            Comment


              #7
              I have attached a simple strategy which was run for a short while on 10 range bid chart on EURNZD and its output file. In the output file you can see that the close is different from the bid.

              Thanks
              Attached Files

              Comment


                #8
                Hello kiss987,

                Thank you for your response.

                It is possible for the close price to update outside the Bid or Ask or in between both the Bid and Ask. Close is the last traded price, where as Bid and Ask are the price of the last traded Bid or Ask Level. Trades can still occur outside the Bid or Ask.

                Comment


                  #9
                  Thank you for your reply.

                  I'm not sure I completely understood you... Can you please elaborate on that? Perhaps an eample with numbers will help

                  Comment


                    #10
                    Hello kiss987,

                    Thank you for your response.

                    A simple way to think of it is there only a certain number that can be bought at the current Ask or sold to the current Bid. If you needed to buy or sell more you would need to do so at a different price level if your trade occurred at that different price from the current Bid or Ask it would be the Last price level.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Shansen, 08-30-2019, 10:18 PM
                    25 responses
                    949 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by JonesJoker, 04-22-2024, 12:23 PM
                    8 responses
                    41 views
                    0 likes
                    Last Post JonesJoker  
                    Started by timko, Today, 06:45 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post timko
                    by timko
                     
                    Started by Waxavi, 04-19-2024, 02:10 AM
                    2 responses
                    39 views
                    0 likes
                    Last Post poeds
                    by poeds
                     
                    Started by chbruno, Yesterday, 04:10 PM
                    1 response
                    44 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Working...
                    X