• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Account Position

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

    Account Position

    Can someone please clarify:

    I understand that there can be only 1 strategy position per symbol:

    http://ninjatrader.com/support/helpG...us/?editor.htm

    but a real account can have multiple position objects:

    http://ninjatrader.com/support/helpG...us/?editor.htm

    so how is a strategy synchronized with an account with multiple positions?

    #2
    Hello delTik,

    Thanks for your post.

    Regrettably your links refer only to the NS editor page.

    With reference to: http://ninjatrader.com/support/helpG..._account_p.htm
    Account Position
    An Account Position is the position you actually hold in a real-time trading account, whether it is a NinjaTrader internal simulation account (Sim101) or your live real-money brokerage account.

    Strategy Position
    A Strategy Position is a virtual position that is created by the entry and exit executions generated by a strategy and is independent from any other running strategy’s position or an Account Position.

    So you can have multiple strategies running on the same account and instrument and they will each hold a virtual strategy position while in the account you will only have one position, long, short or flat.

    You may also what to review: http://ninjatrader.com/support/helpG..._positions.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      ok thanks.

      so if my account is initially both long EURUSD and short EURUSD and I want to synchronize so the strategy is exactly the same then I end up with 2 strategies? if so when calling EnterLong, ExitLong etc. do I need to reference which strategy I'm referring to?

      Comment


        #4
        Hello delTik,

        Thanks for your reply.

        On the same instrument you can only have one account position, of flat, short or long. With 2 strategies on the same instrument, each strategy can have its own virtual position which may or may not match the account position.

        For example with two strategies called A & B running on the same instrument. Starting from no position, if A goes long then the strategy will be long and your account position will be long. If strategy B goes short, strategy B will be short, strategy A will be long and your account position will be flat. To help see how this works, I recommend that using the sim101 account you apply the strategy SampleMACrossover to two different timeframes (just to get different entry and exit points between the two) of the same instrument, Watch the strategies tab to see the virtual strategy positions then check the account position in the account tab.

        For your question, "if so when calling EnterLong, ExitLong etc. do I need to reference which strategy I'm referring to?" In the strategies, the entry and exit methods are relative to that strategy and will not effect the virtual position of the other strategy but will impact your account position.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          getting there slowly but not sure why there is an account position and a strategy position (I understand what they are but not why there isn't just an account postition).

          I could really use an overview or something?

          if I call EnterLong am I submitting an order to the strategy and the live account?

          if I call ExitLongLimit am I submitting a limit order to the strategy and the live account?

          if I call Position.Account.CancelAllOrders am I cancelling all orders in the strategy and the live account?

          Comment


            #6
            my view is that I can have multiple strategies to the same instrument using same a/c. I don't want my strategy A to mess with my strategy B orders. personally, I will not call Position.Account.CancelAllOrders unless I encounter a disaster

            Comment


              #7
              ok thanks.

              so several strategies (e.g A,B,C) may be running all using the same account. that makes sense.

              1. if strategy A calls EnterLong then a buy order is subitted against the current account?
              2. if strategy B calls ExitLongLimit then a limit order is submitted against the current account?
              3. if strategy C calls Position.Account.CancelAllOrders then a cancel all unfilled orders is submitted against the current account?

              i.e. their purpose is to fire orders at the current account and Strategies A,B,C do not remember the calls made (unless coded in C#) ... they're unaware of EnterLong calls and only know they're long when an execution event is raised? same goes for the current account?

              I'm trying to build a structure to manage order submissions/acceptance/executions/cancellation (with events) but unsure of who's doing what?

              may be NT have an overview somewhere?
              Last edited by delTik; 05-30-2016, 08:22 AM.

              Comment


                #8
                you can use a addon which has access to all orders submitted in the NT ecosystem

                Comment


                  #9
                  thanks again junkone.

                  Trying to build a picture of how the whole thing works e.g if the strategy is enabled and is unaware of an existing stop order in the current account. will the strategy receive an event if the stop order is executed?

                  i.e. does the account fire events at the strategy and when?
                  Last edited by delTik; 05-31-2016, 01:51 AM.

                  Comment


                    #10
                    I think you have to review the startup options.
                    http://ninjatrader.com/support/helpG..._positions.htm

                    Comment


                      #11
                      Hello delTik,

                      Thanks for your replies.

                      To assist in your learning of strategies, besides using the sim101 account and testing your ideas, you can also refer to working examples in the forums reference section that have been converted to NT8. Here is the general list: http://ninjatrader.com/support/forum...splay.php?f=30
                      Paul H.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by manugarc, Today, 01:15 PM
                      0 responses
                      0 views
                      0 likes
                      Last Post manugarc  
                      Started by JMont1, Today, 11:42 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post JMont1
                      by JMont1
                       
                      Started by ryanmercado, Today, 10:04 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post ryanmercado  
                      Started by uiwislth, Yesterday, 11:25 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post uiwislth  
                      Started by Steve L, Yesterday, 10:04 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post Steve L
                      by Steve L
                       
                      Working...
                      X