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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X