Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Risk Management Tools

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

    Risk Management Tools

    Hi Ninja Team,

    Your assistance is highly appreciated, I am a day trader and I trade with created custom automatic strategies (created in Ninja script) , in some case, I trade by myself on the same account and enter regular orders (long, short - not with a strategy).

    Due to some bad experience, I want to create some risk management tool for myself and I am wondering what tools or restrictions can be implemented, please see the next parameters that I want to restrict :

    Parameters to check:
    • Limit number of trading per day (distinguish between strategy entries to manual entries ( distinguish between strategy entries to manual entries - how can I do it? , e.g not limit for strategy, limit only for manual trades by the user)
    • Limit the time frame that manual trading can be done (distinguish between strategy entries to manual entries - how can I do it? , e.g not limit for strategy, limit only for manual trades by the user)
    • Limit Max loss per day
    • Limit Max profit per day
    • Exit all session and make sure no command left open

      Important Note:
      1 .For all points , I don't want to restrict it for the automatic strategies (for example, the strategy can take as many trades it can, I want to restrict it only for specific user to not enter manual trades above the limit).
      2. I want to make sure that both types of trades can be done on the same account (not to open new accounts for each of the trade types)
      3. I also trades with Apex (Ritimich accounts) - can it be implemented on those accounts as well?

    Questions:
    1. What are the current tools you have?
    2. Is there any way to distinguish between strategies to manual trades?
    3. If it is not possible, is there any way I can create such a script/tool by myself? how do you suggest doing it? (for example, I can distinguish the entry names, but how can I restrict it with a script/tool)?
    4. One more important thing, i want this restriction to not be editable on the same day (for example, I set some rules to limit up to 5 trades and then I reached the trades and I want to create more, I don't want to have the option to go the portal and change it to 10 and then to keep trading,

    My goal is to restrict it via password or if there is any restriction it will be locked for the same day, only the day after the rules can be changed)
    Last edited by Mizrahi09; 12-21-2023, 04:30 AM.
    Mizrahi09
    NinjaTrader Ecosystem Vendor - Mizrahi09

    #2
    Hello Mizrahi09,

    Thank you for your post.

    I want to start by saying while it may be possible to restrict the ability to place manual trades via NinjaScript, that is not supported by our team as it inhibits the base intended functionality of the platform. If your account is with NinjaTrader Brokerage, there are some risk settings available in the account portal and they may also be locked until the end of the session so you may not go in and change the settings multiple times and keep trading. That said, the risk settings would apply to all trades on your account and would not be able to distinguish between manual trades and trades placed by an automated strategy. Risk settings may be accessed at https://account.ninjatrader.com/settings/accounts and include items such as daily loss limit, weekly loss limit, daily profit trigger, weekly profit trigger, etc. For more information:You mentioned that you trade with Apex (Rithmic) so I suggest reaching out to Apex/Rithmic for more information to see if there are risk settings in their portal as well.

    NinjaScript strategies only have visibility into orders placed by that same instance of the strategy. In order to access information about orders placed anywhere in the platform, including manually placed orders, you would need to utilize an AddOn type of approach with the Account class. The methods and properties available in the account class allow you to subscribe to execution, order, and position updates and also allow you to create/submit/change/cancel orders. More details may be found at the links below:When it comes to PnL limits and controlling automated trading, there is a reference sample that demonstrates halting a strategy once user-defined conditions are met here:


    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      I have a follow up question about this topic. Under tools>risk there are parameters which govern # of contracts you can trade. I've applied this to 20 for MNQ and other futures, but when I go to sim I do not see this feature being applied. Even after closing the program and opening it again.

      I also do not see a way to manage prop fund account drawdown at least with APEX as the prop account does not show on the Ninja trader user portal, therefore you can't apply draw down limits on them at least that I am aware.

      Also, when you set the drawdown from the user portal will the draw down apply to sim accounts as well?

      Comment


        #4
        Originally posted by RISKYBUSINEZZ View Post
        I have a follow up question about this topic. Under tools>risk there are parameters which govern # of contracts you can trade. I've applied this to 20 for MNQ and other futures, but when I go to sim I do not see this feature being applied. Even after closing the program and opening it again.

        I also do not see a way to manage prop fund account drawdown at least with APEX as the prop account does not show on the Ninja trader user portal, therefore you can't apply draw down limits on them at least that I am aware.

        Also, when you set the drawdown from the user portal will the draw down apply to sim accounts as well?
        The risk settings configured at Tools > Risk may only be applied to simulation accounts in the platform. These would not apply to your Apex account(s) and can only be added to a simulation account by editing the Sim account on the Accounts tab. For more info about risk templates for simulation accounts:


        Additionally, the NinjaTrader user portal risk settings only apply to accounts with NinjaTrader Brokerage. I mentioned that in my response:
        If your account is with NinjaTrader Brokerage, there are some risk settings available in the account portal and they may also be locked until the end of the session so you may not go in and change the settings multiple times and keep trading.
        As I previously instructed, I suggest reaching out to Apex to see if they have a way to apply any risk settings to your account through them:
        You mentioned that you trade with Apex (Rithmic) so I suggest reaching out to Apex/Rithmic for more information to see if there are risk settings in their portal as well.
        I am not aware if there is a separate portal for Apex specifically, or if there is something you can do through Rithmic related to your account. Your broker will have more information about risk settings that may be applied to your account, as this is not directly a NinjaTrader item.

        Thank you for your time and patience.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by Mizrahi09 View Post
          Hi Ninja Team,

          Your assistance is highly appreciated, I am a day trader and I trade with created custom automatic strategies (created in Ninja script) , in some case, I trade by myself on the same account and enter regular orders (long, short - not with a strategy).

          Due to some bad experience, I want to create some risk management tool for myself and I am wondering what tools or restrictions can be implemented, please see the next parameters that I want to restrict :

          Parameters to check:
          • Limit number of trading per day (distinguish between strategy entries to manual entries ( distinguish between strategy entries to manual entries - how can I do it? , e.g not limit for strategy, limit only for manual trades by the user)
          • Limit the time frame that manual trading can be done (distinguish between strategy entries to manual entries - how can I do it? , e.g not limit for strategy, limit only for manual trades by the user)
          • Limit Max loss per day
          • Limit Max profit per day
          • Exit all session and make sure no command left open

            By the way, while working on your trading strategies, you might find it helpful to explore tools that aid in managing goals and performance tracking, such as the OKR Аpp from Oboard. It can streamline your objectives and keep your trading aligned with your risk management goals.​

            Important Note:
            1 .For all points , I don't want to restrict it for the automatic strategies (for example, the strategy can take as many trades it can, I want to restrict it only for specific user to not enter manual trades above the limit).
            2. I want to make sure that both types of trades can be done on the same account (not to open new accounts for each of the trade types)
            3. I also trades with Apex (Ritimich accounts) - can it be implemented on those accounts as well?

          Questions:
          1. What are the current tools you have?
          2. Is there any way to distinguish between strategies to manual trades?
          3. If it is not possible, is there any way I can create such a script/tool by myself? how do you suggest doing it? (for example, I can distinguish the entry names, but how can I restrict it with a script/tool)?
          4. One more important thing, i want this restriction to not be editable on the same day (for example, I set some rules to limit up to 5 trades and then I reached the trades and I want to create more, I don't want to have the option to go the portal and change it to 10 and then to keep trading,

          My goal is to restrict it via password or if there is any restriction it will be locked for the same day, only the day after the rules can be changed)
          Hi there,

          It’s great to see you taking a proactive approach to managing your trading risk. Here are some thoughts on your parameters and questions:

          Parameters to Check:
          1. Limit Number of Trades Per Day: To distinguish between strategy and manual trades, you can create a naming convention for your manual entries in NinjaScript. For instance, prefix your manual trades with "MANUAL_" so that you can filter them easily in your scripts.
          2. Limit Time Frame for Manual Trading: Similar to the above, you can set specific time windows for executing manual trades using timestamps in your script. You could utilize NinjaScript's OnBarUpdate method to check if the current time falls within your defined trading hours before allowing a trade to execute.
          3. Max Loss and Max Profit Limits: You can implement these checks in your script by keeping track of your daily profit and loss using variables. If your loss exceeds your limit, you can prevent further manual trading until the next trading day.
          4. Exit All Sessions: You can set a command in your script to close all positions or disconnect the session when your limits are reached. This will ensure no commands are left open.

          Important Notes:
          • Keeping both strategy and manual trades on the same account is definitely possible, and with the above methods, you can implement your restrictions effectively.
          • Regarding your trades with Apex (Ritimich accounts), you would need to verify with their support team whether they support similar custom scripts, as some platforms have restrictions on custom automation.

          Questions:
          1. Current Tools: NinjaTrader offers built-in risk management tools, but customization through NinjaScript is often the best way to create specific rules.
          2. Distinguishing Trades: As mentioned, naming conventions and timestamps are effective methods.
          3. Creating Your Script/Tool: You can start by utilizing NinjaScript's documentation and community forums for code examples. Implementing checks for trade types based on naming or entry conditions can be done by modifying your script logic.
          4. Non-editable Restrictions: This is a bit more complex; you might need to create a script that runs checks on your defined parameters continuously and prevent changes once the trading day starts.

          If you're looking for further customization, consider diving into the NinjaTrader forums or the NinjaScript help documentation for more specific code examples. This could give you a solid foundation for building the tool you need.

          Good luck with your trading!

          Comment


            #6
            Setting up solid risk management in NinjaTrader 8 reminds me of public sector project management, where strict rules are in place to control risks. For stop-loss and take-profit, I use the SetProfitTarget and SetStopLoss methods, but I also add checks to adjust them dynamically based on volatility.Adding a daily loss limit and automatic trade halts can really help protect your account. You might also want to script alerts for unusual drawdowns to catch issues early.
            Last edited by AunkerSlave; 02-11-2025, 07:19 AM.

            Comment


              #7
              Hey, sorry for bumping post. Is there any tools that can help in time management that can help us to structure a day with AI? We want an app that offer time management with AI that must be able to plan a day effectively.
              Last edited by mikecolady; 03-19-2025, 08:28 PM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Dudley, Today, 09:52 AM
              2 responses
              10 views
              0 likes
              Last Post Dudley
              by Dudley
               
              Started by Johnny, Yesterday, 12:39 PM
              6 responses
              32 views
              0 likes
              Last Post Johnny
              by Johnny
               
              Started by Saronna, Today, 02:08 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by brucerobinson, Today, 07:08 AM
              2 responses
              16 views
              0 likes
              Last Post brucerobinson  
              Started by celtey, 03-21-2025, 09:46 AM
              6 responses
              80 views
              0 likes
              Last Post celtey
              by celtey
               
              Working...
              X