Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connection-loss, Strategy keeps running but orders rejected?

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

    Connection-loss, Strategy keeps running but orders rejected?

    Hi Ninjas,

    All Ninja users know the more used native procedures for handling connection loss with Strategies and orders, basically Strategies are temporarily stopped as well as submitting orders until have again a connection re-established. Another important native NT procedure is dealing with orders rejections, where Strategy are fully stopped, orders are cancelled and positions are flattened.

    Here a situation that involves all of above but in an unexpected manner. I have 3 Strategies running "live simulations", real-time action but for account Sim101. Here the facts:

    - 12:54:47 am happens a connection loss, price-server and order-server, as programmed NT says: connection-loss but Strategies will keep running. Despite the connection loss, price data kept coming, therefore the Strategies worked as normal and triggered some orders.

    - 12:54:50 Orders from two Strategies are submitted but obviously with order-server down in IB ( interactivebrokers ) , these orders are rejected, and in consequence this kicked the "RealTimeErrorHandling", these two Strategies are stopped, cancelled all of their orders and flattened all of their positions.

    - 12:55:23 Connection is re-established, but obviously just one Strategy are running, the Strategy that didn't submit any order during the weird connection loss time.

    I've attached an extract of log file so you can see the register of facts.

    Here my question:

    1. How come during a registered price and order connection loss, if some price data sparks, the Algos are able to submit orders?
    This is obvious a big problem, cause if you have set that your Strategy will keep running or recalculate, they will continue to work and should submit any order as new data comes, this will kick "RealTimeErrorHandling" , thus you can expect Strategies full stopped for all session.

    Due to this condition I'll add a simple logic in my Strategies: "if not price and data connected, orders are stopped".

    My suggestion to NT developers: During a connection loss, if both : price and server data aren't fully connected, submitting orders should be stopped in order to avoid the "RealTimeErrorHandling; otherwise there will be always a potential sudden fully stop of strategies for all session.
    Attached Files
    Last edited by pstrusi; 10-15-2015, 05:58 AM.

    #2
    Hello pstrusi,

    Thank you for your post.

    I will forward your suggestion to our development team.

    You could set your own error handling with RealTimeErrorHandling: http://ninjatrader.com/support/helpG...orhandling.htm
    I believe you are aware of this, but thought I would add this for any one who reads this thread.

    Comment


      #3
      Hi Patrick, thanks for taking note of this.

      RealTimeErrorHandling is not the cause of the problem, it's just a consequence. As you can see, the real cause is that despite of a connection-loss is registered and current, and if you have set your Strategies to keeprunning or recalculate, they'll keep working, so, if any little price data comes in, meanwhile the "disconnection", but Orders-server are still down, the Strategies might submit orders ( according to its logic ) thus risking to kick the "RealTimeErrorHandling".

      So the solution to this are either one of this:

      1. Design your own internal logic in the Strategy, that if either price or order server are down, then avoid to submit any order.

      2. Actually NT developer team could amend this feature, and doing a reliable connection-loss handling.

      Thanks
      Last edited by pstrusi; 10-15-2015, 08:05 AM.

      Comment


        #4
        This suggestion has been given the id SFT-787.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mmenigma, Today, 02:22 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frankthearm, Today, 09:08 AM
        9 responses
        35 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by NRITV, Today, 01:15 PM
        2 responses
        9 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Started by maybeimnotrader, Yesterday, 05:46 PM
        5 responses
        26 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by quantismo, Yesterday, 05:13 PM
        2 responses
        21 views
        0 likes
        Last Post quantismo  
        Working...
        X