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

advanced order handling

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

    advanced order handling

    first question: Is there a type of order which maintains it BBO (best bid and offer)?
    second question: In case I am offering/asking in several options (different series of same asset and exercise date) all orders will be canceled in case just one was completed?
    The main idea is to keep submitting several Best Bid after any OFFER was completed (and vice versa) and keep the position at zero (at least in delta terms). As soon as the position get to zero, several bids and offers will takeplace, as soon as one is completed (supposing a bid) every others are cancelled and the cycle begins again with several offers taking place.

    #2
    Hello dafonseca,

    I am not quite clear what you are asking.

    Are you asking if is is possible to submit a limit or stop limit, or stop market order at the price closest to the last price (is this what you mean by best price?) and continue changing the price of this order to the current 1st level of bid or ask until the order fills?

    At any time in real-time you can call GetCurrentAsk() and GetCurrentBid(). This would return the bid or ask that is closest to the last.

    However, the last price will be at either the last bid or the last ask price depended on which last had a fill.

    To directly answer you question. I am not aware of any order that when placed automatically stays at the bid or the ask. However, with logic you can detect the ask or bid at any of the 10 levels and change your price to any of these incoming prices.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      To be more clear.

      supposing AAPL market is 110.00 bid 110.15 offer.
      I want to get the best bid or offer buy 110.01 and sell 110.14..In case the market offers at 110.14 I want to offer at 110.13.. same for the bid..
      doI have to compare my order with the return of GetCurrentAsk() and GetCurrentBid().and cancel my order in case > or < than????
      tick by tick?
      I hope there must be some BBO best bid and offer type of order already programmed.

      Comment


        #4
        Hello dafonseca,

        No, there is not an order type like this already programmed, you would need to control it with logic.

        GetCurrentBid() + 1 * TickSize
        GetCurrentAs() - 1 * TickSize

        In a managed script, calling the order with the same tag name and a different price will submit a change order to the brokerage instead of checking the state, cancelling, wait for the cancellation to be confirmed, and then submitting a new order at the new price.

        In an unmanaged script, call ChangeOrder() with the IOrder.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Interesting!
          How can I get more info about managed and unmanaged scripts.

          Comment


            #6
            Hello dafonseca,

            Below is a link to the help guide on the managed approach and unmanaged approach.

            Managed - http://ninjatrader.com/support/helpG...d_approach.htm

            Unmanaged - http://ninjatrader.com/support/helpG...d_approach.htm

            Within these sections are each of the methods available to this approach.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rhyminkevin, Today, 04:58 PM
            0 responses
            16 views
            0 likes
            Last Post rhyminkevin  
            Started by lightsun47, Today, 03:51 PM
            0 responses
            6 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            14 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            49 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            15 views
            0 likes
            Last Post bltdavid  
            Working...
            X