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

want to plot difference between Last Ask trade price and Last Bid trade price

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

    want to plot difference between Last Ask trade price and Last Bid trade price

    Hello,

    I want to plot difference between Last trade that happen at ask and Last trade that happen at the bid.

    So basically Last ask trade price - Last Bid Trade price.

    is it possible?

    Thanks in advance.

    #2
    Hello svadukia,

    Thanks for your post.

    I would suggest adding the platform indicator "Price line" to your chart. With this indicator you can plot Bid, Ask and Last lines of the live data.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello svadukia,

      Thanks for your post.

      I would suggest adding the platform indicator "Price line" to your chart. With this indicator you can plot Bid, Ask and Last lines of the live data.
      I don't want to plot current Bid and Ask.

      I want first take last trade price then see if that happens at bid or ask then take next last trade price and see if it happened at bid or ask.

      so after that Want to do Last Ask Trade price Minus Last Bid trade price.

      Hope you understand now.

      Comment


        #4
        Hello svadukia,

        Thanks for your reply.

        I'm not sure if you actually looked at the indicator but it will show the last line which will either be at the Bid or the Ask and you will always see the Last line and either the Bid or Ask which shows the difference between the two.

        If you look at the Ninjascript code for the Price Line indicator, it pulls the Bid/Ask/Last values from the OnMarketData() method so if you want to create your own indicator, that would show you how to collect the information to analyze. I am unsure how you would want to plot/show/express the difference data.

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_PaulH View Post
          Hello svadukia,

          Thanks for your reply.

          I'm not sure if you actually looked at the indicator but it will show the last line which will either be at the Bid or the Ask and you will always see the Last line and either the Bid or Ask which shows the difference between the two.

          If you look at the Ninjascript code for the Price Line indicator, it pulls the Bid/Ask/Last values from the OnMarketData() method so if you want to create your own indicator, that would show you how to collect the information to analyze. I am unsure how you would want to plot/show/express the difference data.
          Hello Paul,

          Thank you for your reply.

          Checked Price Line indicator. I Want to plot difference as a bar like we plot volume as a bar. Can It be done?

          Comment


            #6
            Hello svadukia,

            Thanks for your reply.

            Yes, it could be plotted as a bar.

            You may want to make a copy of the price line indicator and modify it to suit your purposes.



            Paul H.NinjaTrader Customer Service

            Comment


              #7
              thanks, paul for the reply.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by andrewtrades, Today, 04:57 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              6 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              436 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              8 views
              0 likes
              Last Post FAQtrader  
              Started by rocketman7, Today, 09:41 AM
              5 responses
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X