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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        46 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        14 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X