Calculate DD from CSV
Forums › ProRealTime English forum › General trading discussions › Calculate DD from CSV
- This topic has 4 replies, 2 voices, and was last updated 1 month ago by
robertogozzi.
-
-
10/18/2025 at 8:31 AM #252714
Hello,
Simple question:
I want to calculate Maximum Drawdown (MDD) using data exported from the ProRealTime ProBacktest report (CSV file).
Is it possible for my external calculation to match the exact MDD value shown in the ProRealTime platform’s statistical report?
If so, what specific data field(s) do I need to ensure are included in the CSV export to achieve this match?
Thank you.
10/18/2025 at 10:55 AM #252717This is the calculation:
12345678910111213141516// DrawDown//ONCE Capital = 10000ONCE MaxPoint = 0ONCE MaxDD = 0//------------------------------------------// EQUITYEquity = Capital + StrategyProfitTempProfit = PositionPerf * PositionPrice / PipSize * PipValue // / abs(CountOfPosition)TempEquity = Equity + TempProfit//------------------------------------------// DrawDownMaxPoint = max(MaxPoint,TempEquity)DD = MaxPoint - TempEquityMaxDD = max(MaxDD,DD)DDperc = MaxDD * 100 / CapitalYou need to provide yourself the Capital, then you will have to provide what is needed to compute the following data:
- StrategyProfit
- PositionPerf
- PositionPrice
- PipSize
- PipValue
- CountOfPosition
1 user thanked author for this post.
10/18/2025 at 2:05 PM #25272210/18/2025 at 2:36 PM #252723Another qurstion in same subject
I’m backtesting a trading system designed to operate on a Daily (1 Day) timeframe (e.g., entry/exit signals are only generated at the close of the daily candle).
I want to calculate the most realistic Maximum Drawdown (MDD) for this strategy.
My question pertains to the resolution of the data required for this crucial metric:
Close-to-Close MDD: If I calculate MDD based only on the daily Close of the strategy’s equity curve, it will miss any deep pullbacks that occur intraday (floating P&L).
Intraday MDD: To capture the true worst-case scenario (Peak Equity to Trough Equity), is it best practice to analyze the strategy’s P&L using 1-minute (1m) historical data?
Specifically, for a strategy that only trades once a day, should the MDD reporting rely on high-resolution 1-minute data to accurately reflect the maximum potential adverse excursion (MAE) experienced by the open position?
Any insights into how professional backtesters or ProRealTime handles this distinction would be greatly appreciated.
Thank you!
10/18/2025 at 5:42 PM #252726As to the above list:
- StrategyProfit
you need to have prices and simulate a trade to know what the outcome would be (open, close, etc…) - PositionPerf
as for StrategyProfit, you need to have prices and simulate a trade to know what the temp outcome would be candle by candle (open, close, etc…) - PositionPrice
it’s the entry price of the simulated trade (or the average price if you accumulate positions) - PipSize
you know it, as it’s related to the instrument you want to trade, it’s usually 1 for indices and 0.0001 for FX pairs, but not for JPY pairs and for other assets like shares (make an idicator with the single line RETURN PipSize to know it - PipValue
same as above but replacing that line with RETURN PipValue - CountOfPosition
the number of positions traded in your simulation
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on 