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

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 ezekilany, Today, 01:10 AM
    0 responses
    3 views
    0 likes
    Last Post ezekilany  
    Started by usjavaburn, Today, 12:59 AM
    0 responses
    3 views
    0 likes
    Last Post usjavaburn  
    Started by heatherjmarshalls, Today, 12:56 AM
    0 responses
    2 views
    0 likes
    Last Post heatherjmarshalls  
    Started by Nicholewatkinsi, Yesterday, 10:53 PM
    0 responses
    6 views
    0 likes
    Last Post Nicholewatkinsi  
    Started by dward123, 01-02-2024, 09:59 PM
    4 responses
    176 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Working...
    X