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 TheWhiteDragon, 01-21-2019, 12:44 PM
      4 responses
      541 views
      0 likes
      Last Post PaulMohn  
      Started by GLFX005, Today, 03:23 AM
      0 responses
      2 views
      0 likes
      Last Post GLFX005
      by GLFX005
       
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      11 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      7 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      14 views
      0 likes
      Last Post TradeForge  
      Working...
      X