Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Intrabar Unrealized Max Drawdown

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

    Intrabar Unrealized Max Drawdown

    What is the best way (available options?) to capture data for the intrabar unrealized max drawdown? I understand the Max Adverse Excursion (MAE) gives you the maximum amount the price action moves against you compared to your entry position price while you are in the trade. I am not looking for that metric. What I am attempting to capture is within 1 bar (say a 1-minute bar as an example), what is the maximum amount the price action moves against you from a "peak value", not your entry position. For example, let's say your entry position "price" is "10." On a long position, if the price moves up to 20 and then back down to 11 (still above your entry price), before continuing up to hit your "profit target" of "25." The value I am looking to capture is 9 (20 - 11 = 9).

    #2
    Hello,

    Thank you for your post.

    NinjaTrader does not provide a calculation for the drawdown of an open position, but we do provide a calculation for Max Drawdown for closed trades in the SystemPerformance collection.

    For what you have described, you would need to develop a custom calculation and track each PnL after each rise or fall.Here is the formula for Max. Drawdown:
    Drawdown = local maximum realized profit – local minimum realized loss
    Max Drawdown = single largest Drawdown
    You can also find an example performance metric, SampleCumProfit, within the PerformanceMetrics folder in the NinjaScript Editor.

    Please let me know if I may be of any further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    71 views
    0 likes
    Last Post PaulMohn  
    Working...
    X