Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

print Above ask Above bid from T & S

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

    print Above ask Above bid from T & S

    print Above ask Above bid from T & S

    Hello, How can I get this print
    analog from T&S columns (filters)

    Above ask
    Above bid

    Need a real example of how I can get it

    #2
    Hello memonolog,

    Thank you for your reply.

    I'm assuming you're meaning how to find which updates are below the bid, not above it, since that would also include ones above the ask. You can get this data within OnMarketUpdate(). I'm attaching an example indicator that will print the most recent ask/bid updates to the NinjaScript Output window if they are above ask or below the bid.

    Please let us know if we may be of further assistance to you.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello memonolog,

      Thank you for your reply.

      I'm assuming you're meaning how to find which updates are below the bid, not above it, since that would also include ones above the ask. You can get this data within OnMarketUpdate(). I'm attaching an example indicator that will print the most recent ask/bid updates to the NinjaScript Output window if they are above ask or below the bid.

      Please let us know if we may be of further assistance to you.
      Thanks for the basic example, but the data from the T&S does not match the results of this script. The question remains open, how exactly the data is filtered and how to get it in the printout from T&S, I am interested in how to get what is issued under
      Above ask
      Below bid

      Comment


        #4
        I want to get the result in printout only Above ask Below bid:

        Code:
        protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
        {
        if (marketDataUpdate.MarketDataType != MarketDataType.Last)
        return;
        
        if (marketDataUpdate.Price > marketDataUpdate.Ask)
        {
        AboveWhich = "Above Ask";
        
        Print("Above Ask" + " / " + marketDataUpdate.Volume);
        }
        else if (marketDataUpdate.Price < marketDataUpdate.Bid)
        {
        AboveWhich = "Below Bid";
        
        Print("Below Bid" + " / " + marketDataUpdate.Volume);
        }
        
        //Print(string.Format("{0:HH:mm:ss} | last: {1:0.00}, ask: {2:0.00}, bid: {3:0.00} | volume: {4} | color: {5}", marketDataUpdate.Time, marketDataUpdate.Price, marketDataUpdate.Ask, marketDataUpdate.Bid, marketDataUpdate.Volume, AboveWhich));
        }
        but nothing

        Comment


          #5
          Hello memonolog,

          Thank you for your reply.

          We've checked on this with our development team and it looks like the T&S window actually involves comparing against Level 2 data. I've created an example of printing just the ask and bid rows that are above or below the current bid or ask price. The attached is just a modification of the SampleLevel2Book indicator found here:

          https://ninjatrader.com/support/help...vel_ii_dat.htm

          Please let us know if we may be of further assistance to you.


          Attached Files
          Kate W.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Kate View Post
            Hello memonolog,

            Thank you for your reply.

            We've checked on this with our development team and it looks like the T&S window actually involves comparing against Level 2 data. I've created an example of printing just the ask and bid rows that are above or below the current bid or ask price. The attached is just a modification of the SampleLevel2Book indicator found here:

            https://ninjatrader.com/support/help...vel_ii_dat.htm

            Please let us know if we may be of further assistance to you.

            I don’t understand what has to do with this level 2 and the book, if I need past transactions

            Below I am attaching a picture from the TS of what I need to get.

            Click image for larger version

Name:	TS.png
Views:	28
Size:	101.5 KB
ID:	1130550

            Comment


              #7
              Hello memonolog,

              Thank you for your reply.

              The information from the development team is simply that the way in which the T&S window gets those values is by checking level 2 data against the current bid and ask prices. The example provided is simply one way to display that information. You would need to work with that logic on your end to display the orders like the T&S window.

              Please let us know if we may be of further assistance to you.
              Kate W.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by POTTER16, Today, 03:31 PM
              0 responses
              8 views
              0 likes
              Last Post POTTER16  
              Started by enricbcn, 05-08-2018, 01:36 AM
              78 responses
              43,521 views
              1 like
              Last Post Wessel
              by Wessel
               
              Started by Wessel, Today, 12:50 PM
              0 responses
              8 views
              0 likes
              Last Post Wessel
              by Wessel
               
              Started by asmmbillah, Today, 12:39 PM
              0 responses
              8 views
              0 likes
              Last Post asmmbillah  
              Started by dtmtradingco, Today, 12:30 PM
              0 responses
              7 views
              0 likes
              Last Post dtmtradingco  
              Working...
              X