Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position update event not received for eval account

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

    Position update event not received for eval account

    When I test the simulation account I do get the position update event when the account is flat, but the same is not fired when the account is flat...


    What even is going to fire when the account is flat for evalation account ?
    I am using blunox propfirm here


    Simulation account log
    Code:
    
    2024-08-05 08:32:24:637|1|32|Chart Trader submitting order without strategy
    2024-08-05 08:32:24:660|1|32|Order='8e4b968aedad4c61aff426e1298a00be/Sim101' Name='' New state='Submitted' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:786|1|32|Order='8e4b968aedad4c61aff426e1298a00be/Sim101' Name='' New state='Accepted' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:788|1|32|Order='8e4b968aedad4c61aff426e1298a00be/Sim101' Name='' New state='Working' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:816|1|32|Order='8e4b968aedad4c61aff426e1298a00be/Sim101' Name='' New state='Filled' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=1 Fill price=17435.5 Error='No error' Native error=''
    2024-08-05 08:32:24:818|1|8|Execution='10041e37a64b4987a8c47f8d63d16e20' Instrument='MNQ SEP24' Account='Sim101' Exchange=Default Price=17435.5 Quantity=1 Market position=Short Operation=Operation_Add Order='8e4b968aedad4c61aff426e1298a00be' Time='08/05/2024 08:32:24'
    
    Order Filled ---- Short position added
    
    2024-08-05 08:32:24:840|1|32|Order='2b95f25c3d214a5dba944e01b2e45f49/Sim101' Name='SLTP1' New state='Submitted' Instrument='MNQ SEP24' Action='Buy to cover' Limit price=0 Stop price=17445.5 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beSL' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:864|1|32|Order='1baae803e1f74b13b9b62c0808fca605/Sim101' Name='TP1' New state='Submitted' Instrument='MNQ SEP24' Action='Buy' Limit price=17433.5 Stop price=17433.5 Quantity=1 Type='Limit' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beTP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:869|1|64|Instrument='MNQ SEP24' Account='Sim101' Average price=17435.5 Quantity=1 Market position=Short Operation=Operation_Add
    2024-08-05 08:32:24:945|1|32|Order='2b95f25c3d214a5dba944e01b2e45f49/Sim101' Name='SLTP1' New state='Accepted' Instrument='MNQ SEP24' Action='Buy to cover' Limit price=0 Stop price=17445.5 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beSL' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:977|1|32|Order='1baae803e1f74b13b9b62c0808fca605/Sim101' Name='TP1' New state='Accepted' Instrument='MNQ SEP24' Action='Buy' Limit price=17433.5 Stop price=17433.5 Quantity=1 Type='Limit' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beTP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:24:979|1|32|Order='1baae803e1f74b13b9b62c0808fca605/Sim101' Name='TP1' New state='Working' Instrument='MNQ SEP24' Action='Buy' Limit price=17433.5 Stop price=17433.5 Quantity=1 Type='Limit' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beTP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:28:124|1|32|Order='1baae803e1f74b13b9b62c0808fca605/Sim101' Name='TP1' New state='Filled' Instrument='MNQ SEP24' Action='Buy' Limit price=17433.5 Stop price=17433.5 Quantity=1 Type='Limit' Time in force=DAY Oco='TP18e4b968aedad4c61aff426e1298a00beTP' Filled=1 Fill price=17433.5 Error='No error' Native error=''
    2024-08-05 08:32:28:125|1|8|Execution='e422e9023d69406f9f720cf6b6cf1635' Instrument='MNQ SEP24' Account='Sim101' Exchange=Default Price=17433.5 Quantity=1 Market position=Long Operation=Operation_Add Order='1baae803e1f74b13b9b62c0808fca605' Time='08/05/2024 08:32:28'
    
    Order filled --- long position added
    
    2024-08-05 08:32:28:129|1|32|Order='2b95f25c3d214a5dba944e01b2e45f49/Sim101' Name='SLTP1M1' New state='Cancel submitted' Instrument='MNQ SEP24' Action='Buy to cover' Limit price=0 Stop price=17445.5 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11baae803e1f74b13b9b62c0808fca605' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:32:28:134|1|64|Instrument='MNQ SEP24' Account='Sim101' Average price=0 Quantity=0 Market position=Flat Operation=Remove
    
    position Update call back received and with account is flat
    
    2024-08-05 08:32:28:248|1|32|Order='2b95f25c3d214a5dba944e01b2e45f49/Sim101' Name='SLTP1M1' New state='Cancelled' Instrument='MNQ SEP24' Action='Buy to cover' Limit price=0 Stop price=17445.5 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11baae803e1f74b13b9b62c0808fca605' Filled=0 Fill price=0 Error='No error' Native error=''
    
    ​

    Evaluation account log
    Code:
    2024-08-05 08:27:55:102|1|32|Chart Trader submitting order without strategy
    2024-08-05 08:27:55:125|1|32|Order='7f73dc33ef6446efb484dab369f6a4e0/BX37460-09' Name='' New state='Submitted' Instrument='MNQ SEP24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:133|1|32|Order='1900932502/BX37460-09' Name='' New state='Accepted' Instrument='MNQ SEP24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:135|1|64|Instrument='MNQ SEP24' Account='BX37460-09' Average price=17510 Quantity=1 Market position=Long Operation=Operation_Add
    2024-08-05 08:27:55:142|1|32|Order='1900932502/BX37460-09' Name='' New state='Working' Instrument='MNQ SEP24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:169|1|32|Order='1900932502/BX37460-09' Name='' New state='Filled' Instrument='MNQ SEP24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=DAY Oco='' Filled=1 Fill price=17510 Error='No error' Native error=''
    2024-08-05 08:27:55:174|1|8|Execution='1714120|1900932502|1900932502' Instrument='MNQ SEP24' Account='BX37460-09' Exchange=Globex Price=17510 Quantity=1 Market position=Long Operation=Operation_Add Order='1900932502' Time='08/05/2024 08:27:56'
    
    Order Filled ---- Long position added
    
    
    2024-08-05 08:27:55:217|1|32|Order='c6e50da6d10f43a3912851f406fdd43c/BX37460-09' Name='SLTP1' New state='Submitted' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=17500 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11900932502SL' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:219|1|32|Order='1900932503/BX37460-09' Name='SLTP1' New state='Accepted' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=17500 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11900932502SL' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:252|1|32|Order='c63e4459c7f24774a04beebbc9d63bae/BX37460-09' Name='TP1' New state='Submitted' Instrument='MNQ SEP24' Action='Sell' Limit price=17512 Stop price=17512 Quantity=1 Type='Limit' Time in force=DAY Oco='TP11900932502TP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:253|1|32|Order='1900932505/BX37460-09' Name='TP1' New state='Accepted' Instrument='MNQ SEP24' Action='Sell' Limit price=17512 Stop price=0 Quantity=1 Type='Limit' Time in force=DAY Oco='TP11900932502TP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:55:254|1|32|Order='1900932505/BX37460-09' Name='TP1' New state='Working' Instrument='MNQ SEP24' Action='Sell' Limit price=17512 Stop price=0 Quantity=1 Type='Limit' Time in force=DAY Oco='TP11900932502TP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:58:199|1|32|Order='1900932503/BX37460-09' Name='SLTP1' New state='Working' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=17500 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11900932502SL' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:58:200|1|64|Instrument='MNQ SEP24' Account='BX37460-09' Average price=17510 Quantity=1 Market position=Flat Operation=Remove
    2024-08-05 08:27:58:201|1|8|Execution='1714247|1900932503|1900932503' Instrument='MNQ SEP24' Account='BX37460-09' Exchange=Globex Price=17499.5 Quantity=1 Market position=Short Operation=Operation_Add Order='1900932503' Time='08/05/2024 08:27:59'
    2024-08-05 08:27:58:203|1|32|Order='1900932505/BX37460-09' Name='TP1' New state='Cancel submitted' Instrument='MNQ SEP24' Action='Sell' Limit price=17512 Stop price=0 Quantity=1 Type='Limit' Time in force=DAY Oco='TP11900932502TP' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-08-05 08:27:58:252|1|32|Order='1900932503/BX37460-09' Name='SLTP1' New state='Filled' Instrument='MNQ SEP24' Action='Sell' Limit price=0 Stop price=17500 Quantity=1 Type='Stop Market' Time in force=DAY Oco='TP11900932502SL' Filled=1 Fill price=17499.5 Error='No error' Native error=''
    
    Order Filled ---- Short position added (account is flat with this trade)
    
    2024-08-05 08:27:58:279|1|32|Order='1900932505/BX37460-09' Name='TP1' New state='Cancelled' Instrument='MNQ SEP24' Action='Sell' Limit price=17512 Stop price=0 Quantity=1 Type='Limit' Time in force=DAY Oco='TP11900932502TP' Filled=0 Fill price=0 Error='No error' Native error=''
    ​

    #2
    Hello Kdevineni,

    The position update events can vary between brokers, if you are using IB or Rithmic it is not suggested to use position update events as the order of operation may not be in the correct order based on the brokers API. If you are trying to drive logic based on position changes I would suggest using either OnExecutionUpdate to look for order fills or using OnBarUpdate and the strategies Position object.

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello Kdevineni,

      The position update events can vary between brokers, if you are using IB or Rithmic it is not suggested to use position update events as the order of operation may not be in the correct order based on the brokers API. If you are trying to drive logic based on position changes I would suggest using either OnExecutionUpdate to look for order fills or using OnBarUpdate and the strategies Position object.
      OnExecutionUpdate --> how do we determine the account positions are flat , as it always get the number of filled number.

      Comment


        #4
        Hello Kdevineni,

        When using OnExecutionUpdate you would need to check for your exit order execution and that the full quantity was filled. For example you entered with 2 quantity, in OnExecutionUpdate you will get up to 2 updates depending if there is a partial fill, to know it was finished you check if the orders fill quantity matches the total quantity. There is an expanded sample that shows checking for a full fill in the following link. If you are using 1 quantity there is no chance of a part fill so you would just have to check for the exit orders execution.


        https://ninjatrader.com/support/helpGuides/nt8/using_onorderupdate_and_onexec.htm

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello Kdevineni,

          When using OnExecutionUpdate you would need to check for your exit order execution and that the full quantity was filled. For example you entered with 2 quantity, in OnExecutionUpdate you will get up to 2 updates depending if there is a partial fill, to know it was finished you check if the orders fill quantity matches the total quantity. There is an expanded sample that shows checking for a full fill in the following link. If you are using 1 quantity there is no chance of a part fill so you would just have to check for the exit orders execution.


          https://ninjatrader.com/support/helpGuides/nt8/using_onorderupdate_and_onexec.htm

          In this situation where we track the account positions in the OnExecutionUpdate event, when the account is flat how to get the updated account balances & PnL...

          If I get the account balances and PnL during this event ,getting the values prior to this execution,

          Please advice on how to get the updated PnL & balances during OnExecutionUpdate event

          Comment


            #6
            Hello Kdevineni,

            I would suggest using OnBarUpdate for tracking any PnL or account values, OnBarUpdate is the event which will be required to be called for items like the Position object or other account values to be updated. OnExecutionUpdate is just called when an execution happens which can be used to drive further logic like submitting targets or knowing when an exit order has filled to reset variables. OnBarUpdate would generally be used for any other use case like entering or doing logic which requires account/pnl values.

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello Kdevineni,

              I would suggest using OnBarUpdate for tracking any PnL or account values, OnBarUpdate is the event which will be required to be called for items like the Position object or other account values to be updated. OnExecutionUpdate is just called when an execution happens which can be used to drive further logic like submitting targets or knowing when an exit order has filled to reset variables. OnBarUpdate would generally be used for any other use case like entering or doing logic which requires account/pnl values.
              Jesse

              I am working on AddOn, mainly tracking the order and execution events. How do I subscribe to the OnBarUpdate event ?

              Comment


                #8
                Hello Kdevineni,

                You can subscribe to an instruments live data from an addon however if the intention of the addon is to work with many instruments that may or may not be helpful. Unfortunately there is not much I can suggest if the broker in question is not providing position updates in certain cases or the updates are out of order. You can find a sample of subscribing to data here: https://ninjatrader.com/support/help...arsrequest.htm


                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                561 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                325 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                547 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X