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

AccountStatus LiquidationOnly on real account

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

    AccountStatus LiquidationOnly on real account

    Hello,
    i built an Add On that set Account in LiquidationOnly in times range of the day.
    In the SimAccount, the liquidation state enabled blocks all the buttons for insert order and return this alert (attached file : block.png), but when i use a real account, the buttons allow to insert order also if the account is on liquidationonly enabled.
    There is a problem with the account?​
    Attached Files

    #2
    Hello MatteoMetrica,

    Thank you for your post.

    An Account Status is typically communicated to NinjaTrader via your broker, but in the case of a SimAccount there is no broker and all risk settings and statuses are set locally. For this reason, you are able to change the status of the Sim account as desired. In the case of a live account, I suspect that only your broker would have the power to change the account status to LiquidationOnly. For Add Ons, you could subscribe to account status update events and set logic in the OnAccountStatusUpdate method as described here:



    If you have certain criteria or times when you wish for your live account status to change, you would need to contact your broker directly for additional assistance since the risk settings are managed by your broker.

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

    Comment


      #3
      Thanks for your reply.
      The broker is Ninja Clearing, how can i unlock this feature for my real account?

      There is a way to lock the buttons in DOM and chart trader via code through AddOns?

      Comment


        #4
        Hello MatteoMetrica,

        Thank you for your reply.

        I don't believe it is possible to set your account to liquidation only during certain time ranges. If you have an account-based inquiry, please take advantage of the "Contact Us" section in our help center to ensure your request is routed and addressed appropriately. The help center may be found here:


        Additionally, regarding the ability to lock buttons in the SuperDOM and/or Chart Trader, any NinjaScript logic that modifies or limits the user interface and platform's functions is not supported. This is because these behaviors could prevent users from managing their live accounts and could have negative consequences. Since you are creating an addon, if you are making your own window with its own trading buttons you could control those how you'd like although we are unable to make any suggestions as to how to lock the buttons from the native order entry windows (SuperDOM, Chart Trader, etc).

        That being said, it sounds like your ultimate goal is to prevent positions from being opened during a certain time range. If you have automated strategies or addons that submit orders, one available option is to add logic that adds a time filter to limit the trading hours. We have a reference sample demonstrating that concept here:



        Another option, if you are looking to stop the user from placing manual trades outside of a certain time range, would be to set up an alert that warns the user the time range for trading has ended. You could suggest something such as closing open positions and then enabling Global Simulation Mode. This would be a user-friendly way to allow the trader to manage any open positions, then they could enable global simulation to prevent themselves from placing any unintended trades on their live account.

        Please let me know if you have any additional questions or concerns.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          thank you for your support.

          i need to prevent my traders error on manage risk. I would like to disable all entry order (automatic or manual) when they exceed a percentage of loss of their account, but at the same time i would like that they can close their position.

          So the LiquidationOnly state was the perfect way to do it. If there is an unsupported method to do it, can you show me also via mail or private message?

          I tried Global Simulation Mode but the problem is that traders can't close their position or they can't place stoploss or target order.during global simulation mode.

          Thank you for your time

          Comment


            #6
            Hello MatteoMetrica,

            Thank you for that information.

            NinjaScript could be utilized to stop a NinjaScript strategy or add on to stop submitting orders after a certain PnL in the account (see links below). Controlling the ability to submit entry orders on the account as a whole (outside of the strategy or addon) would need to be managed by the broker directly, as they have access to adjust your account's risk settings on the backend. Since your account is with NinjaTrader Clearing, please utilize our help center to submit a request with details of what you are looking for with the daily loss limit and we would be glad to assist you further:




            To add logic to a NinjaScript strategy/add on that would stop submitting orders once the PnL reaches a certain point, you could use one of the methods below to check the PnL and set a bool that controls your trading logic so that trades no longer fire.

            Reference sample for stopping a single strategy from submitting trades once a PnL condition is met: https://ninjatrader.com/support/help...nce_user_d.htm

            Accessing the account's realized PnL or UnrealizedPnL by subscribing to AccountItemUpdate events and using the OnAccoutnItemUpdate() method:



            I sincerely appreciate your time and patience. Please don't hesitate to reach out if we may be of further assistance.
            Emily C.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by alifarahani, Today, 09:40 AM
            0 responses
            1 view
            0 likes
            Last Post alifarahani  
            Started by Gerik, Today, 09:40 AM
            0 responses
            1 view
            0 likes
            Last Post Gerik
            by Gerik
             
            Started by RookieTrader, Today, 09:37 AM
            0 responses
            4 views
            0 likes
            Last Post RookieTrader  
            Started by KennyK, 05-29-2017, 02:02 AM
            3 responses
            1,282 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by AttiM, 02-14-2024, 05:20 PM
            11 responses
            184 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X