Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dealing with poor connection to brokerage

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

    Dealing with poor connection to brokerage

    Hi

    Two nights ago my automated strategy was disabled due to bad connection with the broker. on average this happens at least once every other hour with my broker and they're showing no interest in rectifying this (see log). At the time It left an open position and 2 pending stop orders. When the connection came back, it cancelled the stop orders but left the open position running well into risky territory.

    I have read the relevant thread on syncing account positions.

    My strategy's start.behavior was set to "wait until flat" - which i understand would leave the open position running. My requirements are:

    1. minimize lost connection
    2. should the lost connection happen again, that my strategy retains all orders and position as before the disconnect
    3. If the strategy must synchronize virtual and physical positions by force, that it kills all pending orders AND open positions.
    4. Keep the strategy running with as little user intervention as possible.

    On top of that I would also like to put a hard stop on open positions at 3:10am and be flat till 5am without disabling my strategy.

    I have proceeded to do the following

    1. Run my strategy and ninjatrader from virtual private server
    2. Uncheck Option > strategy > on connection loss> cancel exit and entry orders (this was never checked off before)
    3. Option > strategy> on connection loses > set strategy to "keep running"
    4. Set auto-close at 3:00am to close all position

    My questions are
    1. Is it still necessary to run start.behavior as WaitUntilFlat, synchronize to achieve my objectives?
    1. It seems to me that the error handling in my strategy did include "close position" (look closely on the red circle at 1:32am), but it was not executed. Why did it not send a close order?
    2. If I set my strategy to "keep running" under lost connection, will it still be disabled when open positions are auto-closed?
    3. Is there a way to do auto-close without disabling strategy?
    4. What other ways might the strategy be disabled without user intervention?

    thank you
    Attached Files
    Last edited by linterstellar; 09-22-2021, 12:37 AM.

    #2
    Hello linterstellar ,

    Thank you for your note.

    Is this a strategy you have custom programmed yourself?

    Please follow the steps below to manually attach your log and trace files to an email to platformsupport[AT]ninjatrader[DOT]com with "ATTN CHRIS S 3275112" in the subject line so I may investigate this matter further.
    • Open your NinjaTrader folder under Documents.
    • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    • Send the 2 compressed folders as attachments to this email.
    • Once complete, you can delete these compressed folders.
    I look forward to your reply.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Lopat, 03-05-2023, 01:19 PM
    4 responses
    166 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by f.saeidi, Today, 12:14 PM
    0 responses
    1 view
    0 likes
    Last Post f.saeidi  
    Started by giulyko00, Today, 12:03 PM
    0 responses
    4 views
    0 likes
    Last Post giulyko00  
    Started by AttiM, 02-14-2024, 05:20 PM
    12 responses
    213 views
    0 likes
    Last Post DrakeiJosh  
    Started by cre8able, 02-11-2023, 05:43 PM
    3 responses
    238 views
    0 likes
    Last Post rhubear
    by rhubear
     
    Working...
    X