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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      41 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 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