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

Unmanaged Orders (FXCM) + other suggestions

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

    Unmanaged Orders (FXCM) + other suggestions

    Good morning,

    First of all congratulations on your work developing the NT8 platform, I've appreciated the enhancements coming out with the updates - stability and functionality continue to improve.

    I've been coding strategies specifically to work with FXCM, my preference would be to use Managed order types however there are certain limitations with this. Correct me if I'm wrong but with managed orders setting a stop-loss and take-profit does not then produce OCO orders held natively on FXCM's servers? for this reason I must go Unmanaged.

    For the most part my Unmanaged order management seems to be working. Trades are entered in two units (StopMarket), both have the same initial stop-loss (StopMarket), the first also has a profit-target (Limit) which is OCO with the stop-loss. Trailing-stop algos are successfully updating the order levels, the OCO also works.

    However I've noticed that in FXCM Trade Station, all orders appear as either 'entry' orders or OCO... for example; with a Long position, I would expect an order to Sell should be detected by their platform as an 'Exit' type orders, but at this stage it is not. Similarly, for Short positions I would expect BuyToCover type orders would also be detected as 'Exit' orders not 'Entry.

    A while ago, I put in a request for us to be able to take advantage of the complex type OCO, or allowing nested profit-target and stop-loss orders which trigger once the parent order becomes activated - resulting in a position in the market (this has a clear advantage for a disconnect event: as any entry orders held with the broker have automatic stop-loss protection if triggered regardless of the NT8 platform status). Interactive Brokers also have facilities for this order type (Attached).

    Has there been any progress in enhancing the Managed and Unmanaged order types? are there any planned improvements to these order methods at all?

    For the Managed order types, it would be great to be able to utilise an OCO field, as I could then return my order management coding back to Managed, which would simplify everything somewhat and make it more robust. I prefer not to have the NT8 platform handling the interaction of profit-targets, stop-loss's and position sizes etc.

    Also for Managed order types, why not let the user determine the label for these? rather than just calling them 'Profit target' and 'Stop loss', because I run up to 10 strategies at once it's very helpful for me to be able to see which orders belonged to which initial signal. In other words, we just need a few more potential arguments in the Managed order methods() to cater for the above.

    Finally I've noticed with Chart Trader attached, we can see order levels. It would be fantastic if there was just a simple boolean selection in a menu somewhere to be able to show working order levels on the chart, and maybe a few user options to change colours or font sizes etc? cTrader is a great example of this sort of functionality.

    Many thanks for your time, and keep up the great work!

    best regards,
    Chris Sellers

    #2
    Hello Chris,

    Thank you for your note.

    With NinjaTrader 7, when using the managed approach, SetStopLoss() and SetProfitTarget() do use OCO. You can check this by looking at the orders while they are active on the Orders tab of the Control Center in the OCO field. If there is an OCO string visible for that order, that order is using OCO. The OCO in the managed approach is managed by the backend.
    These order types do not allow the signalName to be set as there is logic happening in the background that uses the order name. You are able to use a fromEntrySignal to tie the stop loss and / or profit target to a specific entry that has a signalName that identifies that order.

    Using Exit orders such as ExitLongLimit, does not allow the use of OCO, however, it does allow you to use a signalName that will name and identify that order.

    A signalName can also be provided with the unmanaged approach which can be used with OCO by providing an OCO string.

    I am not able to comment on how the order types will appear in another trading platform, however, in NinjaTrader a buy entry will be a Buy order, a sell entry is a SellShort, a buy exit is a BuyToCover, and a sell exit is a Sell. You can confirm these order types in the Orders tab of the Control Center.

    If you find that OCO is not appearing in the OCO column for SetStopLoss/SetProfitTarget orders or if you find that the order types are not appearing in NinjaTrader 7 correctly on the Control Center, please let me know and we can investigate.

    Regarding the logic with your orders and OCO, you mentioned you have put in a feature request. Did the tech you were working with provide you with a tracking ID for that request? If so, what is the ID? (I can check on this for you)
    As far as having orders that are submitted when one set of orders fill, cancel, or are exited, this is possible and you can do this using logic in your script. However, this would not continue to work if NinjaTrader was shut off, disconnected, or your computer was allowed to sleep or hibernate.
    Having orders that do this would require changes to the brokerage servers that handle order routing and possibly to the exchange itself.
    Who is your broker?
    Have you contacted your broker and requested that the order system be changed to allow for event logic such as triggering order submissions when another order fills or is cancelled?

    With Level II information, there are indicators that are made by 3rd party developers that provide Level II information on the chart. You can also create any custom indicator you would like to display any information available to the NinjaScript on the chart as well.
    Please let me know if you would like a member of the NinjaTrader Business development to follow up with you with a list of professional NinjaScript consultants that could create this or any other script at your request.
    Last edited by NinjaTrader_ChelseaB; 03-22-2016, 07:41 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your detailed response ChelseaB,

      My original request for enhanced order types/methods is under id number SFT-1091.

      I can summarise here in two parts;

      1- Why aren't we able to utilise OCO orders with Exit() style Managed order methods? is this an 'under the hood' limitation? I'm confused why that would be - because the other style of Managed orders SetStopLoss(), SetProfitTarget() automatically detects the presence of the Profit target and Stop-loss orders from the same signal and ties them together with OCO server side. This is really what I'm after.

      For example the method ExitLongStopMarket has the following arguments (int quantity, double stopPrice, string signalName, string fromEntrySignal).

      I would really like to see the platform automatically detect an OCO situation from the same entry signal utilising Exit() order methods being a Profit target and a Stop-loss.

      2- Also there definitely isn't a broker side limitation in nesting orders. I know you aren't in a position to comment on other platforms however FXCM allows 'entry-stop-target' orders through Trading Station II (which NT8 interfaces with), and this is also the most basic function in MT4. I realise there isn't really such a thing as a SL and PT value with a position but its a way of representing those orders in a simplified way...

      I hope this clarifies things. Many thanks again for your time!

      Comment


        #4
        Hello cjdsellers

        Thank you for providing the SFT.

        This refers to Atomic orders which are handled by the brokerage servers of TWS and FXCM. The request to allow for NinjaTrader to send these order types for brokers that have this kind of logic setup on the brokerage servers.

        This has not yet been implemented. It will be up to our development to decide if and when any request is implemented. We do highly appreciate the suggestion.


        Regarding allowing Exit methods to have an OCO overload parameter, I have submitted a feature request for this on your behalf.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you Chelsea

          Please let me know the id number for that Exit method OCO feature, as I'm very interested in being able to utilise that, and from what I've seen on the forum that question has been asked several times already.

          Comment


            #6
            One other thing in case anyone else was following, I discovered more options for displaying order levels in Chart Trader by right clicking it on the chart and selecting Properties (colour and line style options), then when I select Chart Trader (Hidden) from the Properties in the top menu bar - it just displays the order levels exactly as I wanted.

            Comment


              #7
              Hello cjdsellers,

              Our development has not yet provided a tracking ID for this item. Once I have a tracking ID I will update this thread with that ID.
              We appreciate your patience.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hello cjdsellers,

                Your feature request to allow custom OCO strings to be set in order methods, is being tracked with ID# SFT-1291.

                We highly appreciate your feedback. Please let me know of any other suggestions you may have for the NinjaTrader platform.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by geddyisodin, Today, 05:20 AM
                6 responses
                34 views
                0 likes
                Last Post geddyisodin  
                Started by trilliantrader, Today, 03:01 PM
                0 responses
                3 views
                0 likes
                Last Post trilliantrader  
                Started by pechtri, 06-22-2023, 02:31 AM
                9 responses
                122 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by frankthearm, 04-18-2024, 09:08 AM
                16 responses
                67 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by habeebft, Today, 01:18 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X