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

Manual closing positions generated by a NT estrategy

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

    Manual closing positions generated by a NT estrategy

    Hi and thanks in advance, i´ll try to explain the doubt that i have:
    I created two automated estrategies in NT8 with the strategy builder, so it can be possible that these strategies have "buy" and "sell" positions opened at the same time (at the same instrument).
    When this occurs, ¿is it possible to close each trade manually and individually?
    In "Positions" chart i got no information (maybe because if you are sold and bought at the same time it´s like you got no position).
    In "Orders" chart i got two lines, referring to these two actions (buy and sell), but the cancel button is not enabled.
    If i disable one or both strategies, in the "Strategies" chart, the living trades are not closed.
    In the "Accounts" chart you got the possibility to close all the living trades (but not individually).

    #2
    I think (unless something has changed), you will need TWO accounts to open opposing positions on the same instrument. If that is done, you would have TWO strategies running at the same time on different accounts. You can add a manual close position routine to each strategy and choose which one remains active.

    This is possible to do but IMO not very wise. If you don't have an edge, then entering opposing trades to catch a move will result in a loss in both accounts. You will essentially be 'guessing' which one will continue to be profitable.

    Comment


      #3
      Hello ALTEREGO,

      Thanks for your post and welcome to the forums!

      Thank you to member DavidHP for his input. You would indeed need two separate accounts to run two strategies on the same instrument to not have them affect each other's account position.

      Strategies will have both a virtual and account position and normally these are in sync with each other. In the situation you described (two strategies, same instrument and same account) then the actions of either strategy can affect the single account position. For example, strategy A goes long and strategy B goes short, the account position would be flat yet both strategies operate as if they are long and short and continue operating in their logic process and will continue placing orders to your account position.

      If you manually close the trade it will disable the strategy. Strategies are intended to run unattended and will not be aware of any other strategy.

      You are correct, if strategy A goes long and strategy B goes short, the short will close the long position so you will have no account position displayed on the positions tab. If you check the strategies tab, at that moment, it will show 1L and 1S for (strategy) position but the column "Acct position" will be flat.

      Please see the helpguide here for further references concerning strategy (virtual) position verses account position: https://ninjatrader.com/support/help..._account_p.htm
      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Thanks, David and Paul for your fast replies.
        You gave me the answer that I expected. So, in this case, is it possible to create two different accounts linked at the same license, data feed and funds?

        David, I agree with your advice, and i know it´s an uncommon affair. In fact, creating strategies takes sense to avoid precisely these kind of situations.
        In my case, strategy A went short, and when it got reasonable benefits, strategy B went long, that means I was "out" of the market, with the previously obtained benefits.
        After that, the market went up, so i lost the possibility to take benefits of strategy´s B trade.

        Comment


          #5
          Hello ALTEREGO,

          Thanks for your reply.

          Which broker are you using for your live account?
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            I still got no live account, but I decided to deal with NinjaTrader Brokerage.

            Comment


              #7
              Hello ALTEREGO,

              Thanks for your reply.

              In simulation then you can create additional accounts. Currently, you are using sim101. You can create as many sim accounts as you wish and test assigning different accounts to the strategies to validate the isolation.

              To create additional sim account(s), go to the Accounts tab and right mouse click and select "Add simulation account", name it as you wish, set the initial cash as you wish and then click OK.

              When you load your strategies, make sure you assign them to the preferred simulation account in the strategy parameters.

              When you are ready to discuss a brokerage account, please reach out to our brokerage team directly for assistance (this is outside of platform support). They can be reached at BrokerageSales[at]NinjaTrader[dot]Com.
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Paul View Post
                If you manually close the trade it will disable the strategy.
                This is true. If you MANUALLY close a trade it will disable the strategy.
                However, you can program ways to exit the trades by various methods controlled by the trader.
                These, are not recommended but possible.
                If you are not an advanced programmer in NinjaScript I would not recommend doing this.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Sparkyboy, Today, 10:57 AM
                0 responses
                3 views
                0 likes
                Last Post Sparkyboy  
                Started by TheMarlin801, 10-13-2020, 01:40 AM
                21 responses
                3,917 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by timmbbo, 07-05-2023, 10:21 PM
                3 responses
                152 views
                0 likes
                Last Post grayfrog  
                Started by Lumbeezl, 01-11-2022, 06:50 PM
                30 responses
                811 views
                1 like
                Last Post grayfrog  
                Started by xiinteractive, 04-09-2024, 08:08 AM
                3 responses
                11 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X