Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Position.MarketPosition and Position.AvgPrice

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

    Using Position.MarketPosition and Position.AvgPrice

    Hello,

    My strategy involves using limit orders 4 ticks away from market price when condition is TRUE to take long or short.

    1. Will the following the condition below become TRUE if long limit order is pending awaiting to be filled? Or will it become TRUE only if long limit order is filled?

    2. Does the Position.AvgPrice only consider filled orders and not pending orders waiting to be filled?


    // if in a long position and 15 ticks from entry, bring stop to breakevem
    if (Position.MarketPosition == MarketPosition.Long && High[0] >= Position.AvgPrice + 15* TickSize)

    (adjust stop to breakeven code)

    I am trying to make sure my break even code is not getting executing for limit pending orders.

    Thank you for the help

    #2
    Hello simple_goodoboy,

    Thanks for your post.

    Correct, Position will only reflect a filled entry order.

    From the helpguide on Position: Definition: The Position object holds data related to a currently held position by a strategy.
    Reference: http://ninjatrader.com/support/helpG...m?position.htm

    Edit: Added helpguide info and reference.
    Last edited by NinjaTrader_PaulH; 03-30-2017, 07:33 AM.

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello simple_goodoboy,

      Thanks for your post.

      Correct, Position will only reflect a filled entry order.

      From the helpguide on Position: Definition: The Position object holds data related to a currently held position by a strategy.
      Reference: http://ninjatrader.com/support/helpG...m?position.htm

      Edit: Added helpguide info and reference.
      Thank you Paul.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      49 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      141 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      275 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X