Detailed Report nothing like Equity Curve
Forums › ProRealTime English forum › ProOrder support › Detailed Report nothing like Equity Curve
- This topic has 5 replies, 3 voices, and was last updated 4 years ago by GraHal.
-
-
05/25/2020 at 7:20 PM #133223
Anybody any ideas how / why the attached backtest results and Detailed Report bear no resemblance to the equity curve attached when I click on a row in the Backtest results Table??
Spread = 4
Body123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596DEFPARAM CUMULATEORDERS = False//CandleStick Analysis Tool//CloseLevel = A4 //Close price as % of RangeBodyLevel = A5 //Total body size as % of RangeATRPeriod = A6 //Period to be used for ATR Rising filterSpread = 4 //Spread for market being analysedATROn = 0 //Tick to apply ATRRising filter within analyse////CandleStick Analysis Tool can be used to analyse the effect that candlestick bodysize and close position within range has on the next candle closing in the same direction. An AverageTrue Range filter can also be applied to analyse the benefits or disadvantage of this. The Equity +/- is calculated on close of position after one candle. Spread is deducted from each position.//Average True Range CalculationATR = AveragetrueRange[ATRPeriod]ATRRising = ATR[1] < ATR//Body % CalculationBodyPerc = ((ABS(close[1] - open[1]))/(High[1]-Low[1]))*100//Close % CalculationIF close[1] > Open[1] THENClosePerc = ((Close[1] - Low[1])/(High[1] - Low[1]))*100ENDIFIF close[1] < Open[1] THENClosePerc = ((High[1] - Close[1])/(High[1] - Low[1]))*100ENDIF//Analysis including ATR FilterIF ATROn THEN//Up Candle followed by Up CandleIF BodyPerc > BodyLevel and close[1] > open[1] and close > close[1] and ClosePerc > CloseLevel and ATRRising THENWin = Win + 1Count = Count + 1Amount = Amount + ((Close - close[1])-Spread)ENDIF//Up Candle followed by Down CandleIF BodyPerc > BodyLevel and close[1] > open[1] and close < close[1] and ClosePerc > CloseLevel and ATRRising THENCount = Count + 1Amount = Amount - ((Close[1] - close)+Spread)ENDIF//Down Candle followed by Down CandleIF BodyPerc > BodyLevel and close[1] < open[1] and close < close[1] and ClosePerc > CloseLevel and ATRRising THENWin = Win + 1Count = Count + 1Amount = Amount + ((Close[1] - close)-Spread)ENDIF//Down Candle followed by Up CandleIF BodyPerc > BodyLevel and close[1] < open[1] and close > close[1] and ClosePerc > CloseLevel and ATRRising THENCount = Count + 1Amount = Amount - ((Close - close[1])+Spread)ENDIF//Analysis without ATR FilterELSE//Up Candle followed by Up CandleIF BodyPerc > BodyLevel and close[1] > open[1] and close > close[1] and ClosePerc > CloseLevel THENWin = Win + 1Count = Count + 1Amount = Amount + ((Close - close[1])-Spread)ENDIF//Up Candle followed by Down CandleIF BodyPerc > BodyLevel and close[1] > open[1] and close < close[1] and ClosePerc > CloseLevel THENCount = Count + 1Amount = Amount - ((Close[1] - close)+Spread)ENDIF//Down Candle followed by Down CandleIF BodyPerc > BodyLevel and close[1] < open[1] and close < close[1] and ClosePerc > CloseLevel THENWin = Win + 1Count = Count + 1Amount = Amount + ((Close[1] - close)-Spread)ENDIF//Down Candle followed by Up CandleIF BodyPerc > BodyLevel and close[1] < open[1] and close > close[1] and ClosePerc > CloseLevel THENCount = Count + 1Amount = Amount - ((Close - close[1])+Spread)ENDIFENDIF//Win Rate as %WinRate = (Win/Count) * 100If WinRate > A88 ThenBuy at MarketEndifIf longonmarket and barindex > Tradeindex + A92 and positionperf > 0 ThenSell at marketendif//Return WinRate coloured (0,0,0) Style(Line,2) as "Win Rate", Win coloured (0,255,0) Style(Line,1) as "Wins", Count coloured (255,0,0) Style(Line,1) as "Bets", Amount coloured (0,0,255) Style(Line,1) as "Equity +/-"05/25/2020 at 7:44 PM #13322905/25/2020 at 7:55 PM #13323305/25/2020 at 10:46 PM #133254Is it a tick by tick issue? How can the total loss be £11.50 but in April the equity dips below £4000?
05/25/2020 at 10:57 PM #133256This is what I get with those values.
1 user thanked author for this post.
05/26/2020 at 9:18 AM #133280Is it a tick by tick issue?
No it wasn’t tick by tick not enabled.
Your test was over 200k bars and so your equity curve looks well different to mine.
Sort trades by max Number of bars and check the MAE … just shows that if we have deep enough pockets and sit it out … then we could be Warren Buffet also!!?? 🙂
(I was feeling a bit rough yesterday, hence me putting the conundrum on here rather than thinking it out, but after Vonasi gave the reason I recalled that the same scenario had tripped me up in the past!
Note to Self – a Live Trade does NOT show in backtest results but live trades DO show on the equity curve)
-
AuthorPosts
Find exclusive trading pro-tools on