Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position.AveragePrice

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

    Position.AveragePrice

    If a strategy is in a trade (not a live position)

    I enable the strategy - immediately submit order / sync account - opening a live position


    Is the Position.AveragePrice the price from the strategy or the price of the live position placed subsequently?

    Thank you



    #2
    Hi sdauteuil, thanks for your question.

    If the strategy does try to synchronize the account and order will be placed at the price level the would have entered at. So the Average price will be that of the last order placed historically.

    Please let me know if I can assist any further.

    Comment


      #3
      I have a strategy that triggers a trailing stop (an indicator is the stop value) when the price closes above X amount of ticks from the entry price or average price.
      Start TrailStop Price = Position.AveragePrice + TriggerTicks

      If the strategy is in a live trade which is closed early (maybe lost data connection) and I re-start the strategy would the Start TrailStop Price change.

      example ES Mini - Start the trailing stop after price rises 25 points


      Enter Strategy @ 3000.00 - Start TrailStop Price = 3025.00
      Strategy closes early
      Re-enter strategy and sync account @ 2950.00 - Will the Start TrailStop Price change to 2975.00 or remain at the 3025.00

      Comment


        #4
        Hi sdauteuil, thanks for your reply.

        Please allow me to set up a test to confirm the behavior. I will reply here once I finish the test.

        Thanks in advance for your patience.

        Comment


          #5
          Hi sdauteuil, thanks for your patience.

          Position.AveragePrice is updated when the strategy submits the synchronization order so the trailing stop will be calculated relative to the new AveragePrice value.

          Please let us know if we can assist any further.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          79 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          40 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          63 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          63 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X