Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto trading, order types, order quantity, MBTrading

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

    Auto trading, order types, order quantity, MBTrading

    1) position size - I used quantity 10000 in a automated strategy with a live license on a MBTrading FOREX demo account, and it correctly entered 10000 units. The documentation says I should have used 1.0 to get 10000 but this is incorrect. What is the deal with quantity and live strategies?

    2) How do you set Ninja so it won't close open orders on stopping a strategy nor open new orders on starting a strategy

    3) When will Ninja support Trailing stop and OCO type orders that will run on the broker system. Practially every broker system supports Trailing Stop and OCO (MBT calls the OCO types a TTO order) that will run on the brokers servers, yet Ninja doesn't allow them for some very odd reason. I know that the MBTrading programming API does support entering these order types, so Ninja could in fact have had this ability for a long time now.

    4) All of the problems between Ninja and the MBTrading interface that cause you to have to stop and restart strategies or Ninja itself cause significant issues with orders (see my questions #2 and #3)

    5) How do you control how far back in history data an automated strategy can look at? It seems that when I start a strategy, it is first running on history data first, yet I have no idea how far back it is looking or how to limit this.

    #2
    PipSqueak, thanks for your post!

    1. This is expected for live trading strategies on Forex, you want to enter the unit quantity as default quantity when you start your strategy, so 10000 - a mini lot....

    2. Please check the 'NinjaScript' options in the 'Strategies' tab options for this - http://www.ninjatrader-support.com/H...tegiesTab.html

    3. Unfortunately I don't an ETA for adding TTO orders, this has been suggested before and is on our list for future consideration.

    4. I'm not sure what you refer to by 4, if you loose connection to the order server, you would need to reconnect manually, reconnecting to the perm server should work automatically and should not affect the running strategies then.

    5. It would be either the Chart lookback chosen when you create the chart, or the default chart lookback entered under Tools > Options > Data
    BertrandNinjaTrader Customer Service

    Comment


      #3
      On #3 what about Trailing Stops that run at the brokers system?

      On #4, does this mean that I can control the "history lookback" by starting a strategy from a chart that has the history I want the strategy to see, instead of starting it from the Control Center's Strategies tab?

      Originally posted by NinjaTrader_Bertrand View Post
      PipSqueak, thanks for your post!

      1. This is expected for live trading strategies on Forex, you want to enter the unit quantity as default quantity when you start your strategy, so 10000 - a mini lot....

      2. Please check the 'NinjaScript' options in the 'Strategies' tab options for this - http://www.ninjatrader-support.com/H...tegiesTab.html

      3. Unfortunately I don't an ETA for adding TTO orders, this has been suggested before and is on our list for future consideration.

      4. I'm not sure what you refer to by 4, if you loose connection to the order server, you would need to reconnect manually, reconnecting to the perm server should work automatically and should not affect the running strategies then.

      5. It would be either the Chart lookback chosen when you create the chart, or the default chart lookback entered under Tools > Options > Data

      Comment


        #4
        PipSqueak, accepted or working orders at the exchange or on MBT's servers - http://www.ninjatrader-support2.com/...ead.php?t=5349

        You're correct on 4.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Sorry, but I can't tell from that link about where Trailing Stops are running. With MBTrading will a trailing stop run on MBT's server's or my own PC? If it's running on my PC, then my questions/issues with OCO below apply to Trailing Stops as well.

          Part of my question is also a suggestion. Although all of the brokers support OCO at their own servers, at all but 2 of them they are running on your own PC. For safety, we need the option to have OCO's run at the brokers servers, even if some of Ninjatrader's enhanced functionality can't be used.

          Also, it seems that the 2 brokers where OCO at the broker is supported are primarily used for trading equity's, where it isn't supported at the primarily forex/futures brokers. I'm curious why 2 have it and the others don't, even though all of the brokers support OCO on their own servers.

          Originally posted by NinjaTrader_Bertrand View Post
          PipSqueak, accepted or working orders at the exchange or on MBT's servers - http://www.ninjatrader-support2.com/...ead.php?t=5349

          You're correct on 4.

          Comment


            #6
            Originally posted by PipSqueak View Post
            1)

            3) When will Ninja support Trailing stop and OCO type orders that will run on the broker system. Practially every broker system supports Trailing Stop and OCO (MBT calls the OCO types a TTO order) that will run on the brokers servers, yet Ninja doesn't allow them for some very odd reason. I know that the MBTrading programming API does support entering these order types, so Ninja could in fact have had this ability for a long time now.
            This is not accurate. Specific to MBT, there are several reasons why we did not support TTO, one of them was due to the limitation that the bracket must be sent in at the same time in one method call vs sending a sequence orders tied together which is how NT internally works.
            RayNinjaTrader Customer Service

            Comment


              #7
              For added clarification on my question, I'm talking about orders from within a strategy where SetProfitTarget() and SetStopLoss() or SetTrailingStop() are used.

              When SetTrailingStop() is used, will the trailing stop run on my PC or on MBT's server? From the link, it sortof sounds like it will be on MBT's server, but I'm not sure, so wanted someone to spell it out for me.

              On my suggestion, if SetProfitTarget() and SetStopLoss() are used then information needed to enter an OCO order is known at the time EnterLong() or EnterShort() are called. Similar with SetTrailingStop().

              Originally posted by PipSqueak View Post
              Sorry, but I can't tell from that link about where Trailing Stops are running. With MBTrading will a trailing stop run on MBT's server's or my own PC? If it's running on my PC, then my questions/issues with OCO below apply to Trailing Stops as well.

              Part of my question is also a suggestion. Although all of the brokers support OCO at their own servers, at all but 2 of them they are running on your own PC. For safety, we need the option to have OCO's run at the brokers servers, even if some of Ninjatrader's enhanced functionality can't be used.

              Also, it seems that the 2 brokers where OCO at the broker is supported are primarily used for trading equity's, where it isn't supported at the primarily forex/futures brokers. I'm curious why 2 have it and the others don't, even though all of the brokers support OCO on their own servers.

              Comment


                #8
                PipSqueak, yes the stop order would be at MBT's / exchange server, however OCO would be simulated locally on your PC.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Okay, I have tried this again and the Trailing Stop is NOT on the MBT server as indicated in your last reply. My original question of where "Trailing Stops" actually run was correct. Ninja places a standard Stop order and does the trailing itself by continuing to change the order. This is NOT what I am asking for, I want the Trailing Stop to be submitted to MBT as a native Trailing Stop, whereby I can turn my computer off, or more likely Ninja can crash like it did sometime after submitting that order, and the Trailing Stop is still running on their server.

                  Trailing Stop and OCO type orders are two of the most important functions needed to remain profitable. If Ninjatrader itself didn't crash or lock up, and if the connection between Ninja and MBT didn't drop out every day forcing you to close and restart Ninja and your strategies then it would be somewhat less of an issue.

                  The MBT API clearly supports this functionality, as well as OCO type orders, which MBT calls TTO. All orders are submitted though the same "submit" interface, so there is no problem to submit an order as a native trailing stop order or a native TTO (OCO) order.

                  For your developers, I have listed the order types from the MBT API which are Trailing Stop: When the order is submitted, set lOrdType to the type of order being placed, i.e., VALUE_MARKET_TRAIL, VALUE_STOPLMT_TRAIL, VALUE_STOP_TRAIL, or VALUE_TRAILING_STOP. In the case of using the Ninja strategy call to SetTrailingStop(), the order type would be set to VALUE_STOP_TRAIL.

                  Likewise, for OCO capability, the order can be a native MBT server based OCO when submitted as TTO using one of the following order types: VALUE_LIMIT_TTO, VALUE_MARKET_TTO, VALUE_STOPLMT_TTO, VALUE_STOP_TTO, VALUE_TTO_ORDER.

                  They have a PDF describing the functionality of their natively supported order types at: http://www.mbtrading.com/f/MBTrading...EntryGuide.pdf

                  Comment


                    #10
                    PipSqueak, sorry for the confusion - please take a look at Ray's earlier post and the disclaimer when you set up the MBT connection - unfortunately the TTO orders are not supported.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Could you explain what part is not accurate? Their API supports submitting a Trailing Stop or a TTO (OCO) after a postion is opened. Thus the Trail or OCO can be done sequentially, i.e. open poisition, then submit Trail or TTO. There is no limitation in their API forcing you to submit the Trail or bracket prices at the same time as the order to open.

                      Originally posted by NinjaTrader_Ray View Post
                      This is not accurate. Specific to MBT, there are several reasons why we did not support TTO, one of them was due to the limitation that the bracket must be sent in at the same time in one method call vs sending a sequence orders tied together which is how NT internally works.

                      Comment


                        #12
                        Originally posted by PipSqueak View Post
                        Could you explain what part is not accurate? Their API supports submitting a Trailing Stop or a TTO (OCO) after a postion is opened. Thus the Trail or OCO can be done sequentially, i.e. open poisition, then submit Trail or TTO. There is no limitation in their API forcing you to submit the Trail or bracket prices at the same time as the order to open.
                        Sure, you said that nearly every broker supports trailings stops --> This is not accurate.
                        RayNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by lightsun47, Today, 03:51 PM
                        0 responses
                        5 views
                        0 likes
                        Last Post lightsun47  
                        Started by 00nevest, Today, 02:27 PM
                        1 response
                        9 views
                        0 likes
                        Last Post 00nevest  
                        Started by futtrader, 04-21-2024, 01:50 AM
                        4 responses
                        45 views
                        0 likes
                        Last Post futtrader  
                        Started by Option Whisperer, Today, 09:55 AM
                        1 response
                        14 views
                        0 likes
                        Last Post bltdavid  
                        Started by port119, Today, 02:43 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post port119
                        by port119
                         
                        Working...
                        X