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:



    but a real account can have multiple position objects:



    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.

                    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 trilliantrader, 04-18-2024, 08:16 AM
                      7 responses
                      27 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by samish18, 04-17-2024, 08:57 AM
                      17 responses
                      64 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by rocketman7, Today, 02:12 AM
                      2 responses
                      17 views
                      0 likes
                      Last Post rocketman7  
                      Started by briansaul, Today, 05:31 AM
                      1 response
                      13 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by PaulMohn, Today, 03:49 AM
                      1 response
                      12 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Working...
                      X