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 techgetgame, Yesterday, 11:42 PM
      0 responses
      8 views
      0 likes
      Last Post techgetgame  
      Started by sephichapdson, Yesterday, 11:36 PM
      0 responses
      2 views
      0 likes
      Last Post sephichapdson  
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,613 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Yesterday, 05:56 PM
      0 responses
      10 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      20 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Working...
      X