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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          144 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          71 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          125 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          79 views
          0 likes
          Last Post PaulMohn  
          Working...
          X