Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 sidlercom80, 10-28-2023, 08:49 AM
      167 responses
      2,260 views
      0 likes
      Last Post jeronymite  
      Started by warreng86, 11-10-2020, 02:04 PM
      7 responses
      1,362 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Perr0Grande, Today, 08:16 PM
      0 responses
      5 views
      0 likes
      Last Post Perr0Grande  
      Started by elderan, Today, 08:03 PM
      0 responses
      9 views
      0 likes
      Last Post elderan
      by elderan
       
      Started by algospoke, Today, 06:40 PM
      0 responses
      10 views
      0 likes
      Last Post algospoke  
      Working...
      X