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 TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        541 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        7 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        14 views
        0 likes
        Last Post TradeForge  
        Working...
        X