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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          68 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          38 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          63 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          53 views
          0 likes
          Last Post CarlTrading  
          Working...
          X