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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        56 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X