Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bid/Offer Depth functions

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

    Bid/Offer Depth functions

    Hello, I am new to Ninja Script and want to know how deep is Ninja functions.
    Is it possible to set a function that read the Market Bid Depth or Market Offer Depth , and to react on it?
    Lets say something like:
    if ( MarketBidSize [0] < 100 )
    MarketSell();

    Basically if the bid size goes below 100 then sell the position.

    Thank you.

    #2
    Hello MrN1njaTrader,

    Thank you for your note.

    Yes, it is possible to write a script which reads the order book and then executes an order based off conditions, for example if the volume offered at the best offer is greater than 10, buy long.

    I used the following sample indicator and moved the logic over to a strategy, which will check if the current offer is greater than 10 and if so, will enter a long position.



    The sample strategy is attached.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello MrN1njaTrader,

      Thank you for your note.

      Yes, it is possible to write a script which reads the order book and then executes an order based off conditions, for example if the volume offered at the best offer is greater than 10, buy long.

      I used the following sample indicator and moved the logic over to a strategy, which will check if the current offer is greater than 10 and if so, will enter a long position.



      The sample strategy is attached.

      Please let us know if you need further assistance.
      Thank you!~ Very helpful!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      49 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      141 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
      275 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X