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.
Comment