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

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.


    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 mjbatts91, Yesterday, 04:48 PM
        2 responses
        23 views
        0 likes
        Last Post mjbatts91  
        Started by pibrew, Today, 06:10 PM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by actualfacts.2021, 07-25-2021, 03:11 PM
        8 responses
        1,182 views
        0 likes
        Last Post linkcou
        by linkcou
         
        Started by reynoldsn, Today, 07:11 PM
        0 responses
        4 views
        0 likes
        Last Post reynoldsn  
        Started by needsomehelp147, 04-29-2024, 06:43 AM
        2 responses
        20 views
        0 likes
        Last Post needsomehelp147  
        Working...
        X