Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to track and reference entry prices within a strategy?

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

    Is there a way to track and reference entry prices within a strategy?

    Here's an example of what I'm trying to accomplish within an NT7 strategy:

    Let's say the strategy opens a long position... like a market order to buy 1 NQ contract at $11,850.25. Minutes later, that position hits the stop loss price and is closed out. How can I reference that losing trade so I can code my strategy to not take long trades around that same price area?

    How can I "save" and reference the (CalculationMode.Price, Position.AvgPrice) of losing trades so my strategy can look at them later and include that data in the logic that determines if a position should be opened? Determining the price area to avoid isn't my question, but what I can't figure out os how to get the strategy to look back at prior trades entry prices.

    If it matters, I'm using the managed order entry approach and would prefer not to use unmanaged if at all possible.

    Thanks in advance for any help or code samples.​

    #2
    Hi fredb987, thanks for posting. You can use the OnExecutionUpdate event to track every entry and exit that happens within the strategy. Typically, entries and exits are identified by their signal names which you create when calling an entry order.

    Here are some examples that demonstrate this well:



    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    553 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    100 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    543 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    546 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X