• 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 NinjaCustomer, Today, 12:57 AM
        1 response
        3 views
        0 likes
        Last Post NinjaCustomer  
        Started by lancasterstephen, Today, 12:09 AM
        1 response
        3 views
        0 likes
        Last Post lancasterstephen  
        Started by liltr3d, Yesterday, 10:52 PM
        0 responses
        3 views
        0 likes
        Last Post liltr3d
        by liltr3d
         
        Started by Longhornmark, Yesterday, 08:25 AM
        3 responses
        13 views
        0 likes
        Last Post bltdavid  
        Started by mohdhm, Yesterday, 04:09 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Working...
        X