Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What are the best practices for protecting your account balances?

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

    What are the best practices for protecting your account balances?

    I'm super excited about the script I just completed. I'm starting to become confident and let it run on a live account. But First! In what ways can I protect my account?

    Examples:
    • This bot is running without myself monitoring and the strategy just doesn't go well and my account goes down X amount. How could I stop this script from running?
    • I have a position and I lose internet, so I am disconnected. Can this position be closed in some way in order to prevent a large unexpected loss?
    • It's running through the night and my script runs into some unexpected error that causes the script to hang, or just prevents further orders from going through. Can existing positions be closed?
    • Stop the script from placing orders at specific time in the future? For example, when the roll date gets close.
    • Notifications for drawdowns, connectivity, etc?
    I'm looking for a really good account security plan here. I want to prevent a massive drawdown due to error, or things no longer going to plan, etc. I'm looking for best practices here. Thanks.

    #2
    Hello brettcomardelle93,

    Logic can be implemented into the script to stop trading after a certain amount of loss or gain (or other custom criteria you would like). See the example below for a demonstration of how something like this would be coded.
    https://ninjatrader.com/support/foru...ples#post93881

    Once the internet connection is lost, NinjaTrader can no longer communicate with the broker to submit or manage orders. Immediately call your broker to manage positions and orders.
    http://ninjatrader.com/support/forum...833#post520833

    If the script hits an order error (such as a rejection) the RealtimeErrorHandling can allow the strategy to keep running.
    https://ninjatrader.com/support/help...orhandling.htm

    If the script hits a C# logic runtime error, the script will be disabled and there is no way to prevent this. (NinjaTrader disables the strategy instead of allowing the entire platform to crash)

    Yes, you can use logic to ensure the Time of the bars is less than a specific date. Try using the Strategy Builder to set this up and take a look at the generated code.
    https://www.youtube.com/watch?v=HCyt...tu.be&t=43m30s

    Notifications for strategy performance and connectivity can be sent as long as NinjaTrader has access to the internet.
    https://ninjatrader.com/support/foru...546#post792546
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    119 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    82 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X