• 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

Getting block order price

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

    Getting block order price

    How do I identify if the e.Volume which contains a block order occurred at the bid or ask as shown in the T&S? I am drawing text of the block size at the e.Price but the bid/ask is not matching what is shown in T&S.

    if(+ e.Volume >= BlockSize
    && GetCurrentAsk() >= e.MarketData.Ask.Price)

    {
    draw text at price
    }

    if(+ e.Volume >= BlockSize
    && GetCurrentBid() <= e.MarketData.Bid.Price)

    {
    draw text at price
    }

    #2
    Hello brucelevy,

    Below is a link to an example script that demonstrates how to replicate the information shown in the time and sales window called TnSPrints.
    http://ninjatrader.com/support/forum...730#post473730

    This script pics a color based on if it was bid or ask.
    You can add to this condition to add to the print, or change the color again when the volume is above a certain amount.

    if (e.Price >= askPrice && e.Volume >= 100)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks,

      I am using the following however in market replay both the bid and ask blocks are all printing as blocks at the ask.

      //Block order at the ask
      if (e.Price >= askPrice && e.Volume >= BlockSize)
      {
      prints a green box with the block size
      }

      //Block order at the bid
      if (e.Price <= bidPrice && e.Volume >= BlockSize)
      {
      prints a red box with the block size
      }
      Last edited by brucelevy; 09-21-2016, 11:45 PM.

      Comment


        #4
        Hello brucelevy,

        Print the values in the action block.
        {
        Print(string.Format("{0} | e.Volume: {1} >= BlockSize: {2}", e.Time, e.Volume, BlockSize));
        }

        What is the output that you are getting for this? (This should only print when the condition is true)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bubblegum, Today, 01:13 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by TraderYoda, Today, 03:33 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by fredfred, Today, 03:41 AM
        4 responses
        14 views
        0 likes
        Last Post fredfred  
        Started by pjsmith, Today, 02:56 AM
        0 responses
        5 views
        0 likes
        Last Post pjsmith
        by pjsmith
         
        Started by ntbone, Yesterday, 08:10 PM
        0 responses
        13 views
        0 likes
        Last Post ntbone
        by ntbone
         
        Working...
        X