Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

possible to detect if trade is on Bid or Offer

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

    possible to detect if trade is on Bid or Offer

    Is it possible to detect if a trade is on the bid or offer?

    #2
    GKonheiser,

    Thank you for your post.

    You can compare the Close[0] to the GetCurrentAsk() or GetCurrentBid() to determine if the the last price was Bid or Ask.

    Example -
    Code:
    if(Close[0] == GetCurrentBid())
    {
    //do something here
    }
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      is there a reference to trade ? as what im looking for is biuld an indicator based on % of trades in a 5min bar that were traded on the bid or offer.

      IE if(Trade[0] == CurrentBib)
      {
      counter +=
      }

      Would have to use 1 tick time frame i think.

      Comment


        #4
        GKonheiser,

        It sounds like you want to use something line a buy and sell volume indicator. We do already offer something like this call BuySellVolume.

        You can view the source code by going to Tools -> Edit NinjaScript -> Indicator -> BuySellVolume

        Let me know if this is the answer you are looking for.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        669 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        378 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X