Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnPositionUpdate and EnterLong/EnterShort

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

    OnPositionUpdate and EnterLong/EnterShort

    Usage setting stops/targets during OnPositionUpdate and position Flat

    If the position was short and EnterLong is called the position is closed first
    then a long entered -

    Will the OnPositionUpdate fire during EnterLong or afterwards?
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    #2
    MicroTrends, if you reverse, first the EnterLong() would be called and then you'd see two OnPositionUpdates(), one for getting flat (Close Position), the next for long.

    Comment


      #3
      In terms of flow the event fires after the EnterLong has completed

      thank you
      Last edited by MicroTrends; 05-13-2010, 05:27 AM.
      MicroTrends
      NinjaTrader Ecosystem Vendor - micro-trends.co.uk

      Comment


        #4
        Yes, this is correct.

        Comment


          #5
          I believe the best place to reset the stop is when flat onOrderUpdate - OrderState.PendingSubmit

          I will test with that.

          Thank your for your help :-)
          MicroTrends
          NinjaTrader Ecosystem Vendor - micro-trends.co.uk

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          95 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          50 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          31 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          36 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          72 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X