Hello, colleagues! 👋
I have been building automated systems in Prorealtime for some time now, which generate returns for a while and then, like all systems, suffer from Alpha Decay. In my day job, I come from a background in the maintenance of large industrial facilities, where we have successfully implemented predictive maintenance that allows us to keep the facilities operational for longer without failures, achieving greater reliability. I would like to transfer this concept to the portfolio of automated systems. Lately, I have seen videos with interviews with algorithmic traders with accounts funded with €1 million or more. The common pattern among these traders is that they use StrategyQuant to build automated systems with an 80% survival rate over a one-year period, which allows them to have a very robust portfolio of systems and keep it in production for more than six months. During this time, they build new systems that remain in reserve for when one of the robust portfolio systems needs to be replaced. This allows them to remain profitable while some continue to work for others and others devote themselves full time to trading.
I’m afraid that Prorealtime makes it difficult to calculate the survival rate of the systems, so before making the leap to StrategyQuant, I wanted to check with my colleagues to see if there is any way to calculate this rate or even create a working group to see if, between several colleagues, we can come up with a method to increase the robustness of the systems we create.
The idea is to start the consultation and focus it on a very practical question, so I would like to share with you an automatic strategy that I am going to start testing in demo mode for IG’s Nasdaq 1 € while I replicate it for other assets:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
// =================================================================== // ESTRATEGIA: NQ M5 MisilH1longs // Basado en plantilla OHLC "PDH, PDL, PWH, PWL, maxdia, mindia, maxAsia, minAsia" // Sistema que abre largo cuando hay vela H1 anterior alcista y la vela H1 actual tiene open-low<2 y el precio cruza al alza el máx H1 de la vela anterior // Nasdaq 1€ // Autor: Alfonso Diciembre 2025 // Timeframe: M5 // =================================================================== DEFPARAM CumulateOrders = False DEFPARAM Preloadbars=1000 positionsize=1 velasanteriores=1 // ===================== MEDIAS DIARIAS / M5 ========================= // Estamos en M5, así que las MAs son sobre M5 (para sistemas que las utilicen) sma6 = average[6](close) sma70 = average[70](close) sma200 = average[200](close) // Configuración bajista de las medias: 6 < 70 < 200 confMediasBajista = sma6 < sma70 and sma70 < sma200 //Datos PWH y PWL Timeframe(1week,updateonclose) PWH = high PWL = low Timeframe(default) // Reset diario para el cálculo del máximo y mínimo del día timeframe(1hour,updateonclose) // Mínimo Asia 00:00-09:00 (fijado a las 09:00) if time = 090000 then AsiaMin = lowest[9](low) AsiaMax = highest[9](high) endif // DATOS PDH Y PDL del día anterior If time=000000 then PDH = highest[24](high) PDL = lowest[24](low) Endif if dayofweek=5 and time=230000 then PDHV = highest[23](high) PDLV = lowest[23](low) Endif Timeframe(default) //MÁXIMO Y MÍNIMO DEL DÍA if intradaybarindex = 0 then maxdia=0 mindia=30000 orderlongsent = 0 Endif maxdia=max(maxdia,high) mindia=min(mindia,low) // =================== DEFINICIÓN DEL SETUP DE ENTRADA ============= timeframe(1hour,updateonclose) sma6H1 = average[6](close) sma70H1 = average[70](close) sma200H1 = average[200](close) Alcista=close>SMA6H1//>SMA70H1 and SMA70H1>SMA200H1 MisilH1=0 //Precio H1 por encima de SMA6, vela H1 anterior alcista y vela H1 actual con open-low<2 y precio cruza al alza el máx H1 de la vela anterior If Alcista and close[1]>open[1] and abs(open-low)<2 and close crosses over high[1] then // MisilH1=1 SL = low[1]-5 endif Timeframe(default) // =================== ENTRADA LARGA ============= if time >=120000 and MisilH1=1 and orderlongsent = 0 then //and alcista = 0 entrylong = close riskpoints = entrylong-SL Buy positionsize CONTRACT AT market SET STOP pLOSS riskpoints SET TARGET pPROFIT 3 * riskpoints orderlongsent = 1 endif // ========== TRAILING MINIMO VELA ANTERIOR CON ACTIVACIÓN ========= // Umbral de activación (en euros) activationprofit = 100 // Margen bajo el mínimo (en puntos) buffer = 0 // Variable persistente del stop IF barindex = 0 THEN trailstop = 0 ENDIF IF longonmarket THEN // Beneficio latente en euros latentprofit = (close - tradeprice) * positionsize // Activar trailing solo a partir de +100 € IF latentprofit >= activationprofit THEN // Stop propuesto: mínimo de la vela anterior newstop = low[velasanteriores] - buffer //2 // Inicializar stop IF trailstop = 0 THEN trailstop = newstop ENDIF // Solo mover el stop a favor IF newstop > trailstop THEN trailstop = newstop ENDIF // Aplicar stop dinámico SET STOP pLOSS (close - trailstop) ENDIF ELSE trailstop = 0 ENDIF // =======================SALIDAS ================ timeframe(1hour,updateonclose) If longonmarket and close[1]<high[2] and close<open then // Sell positionsize contract at market Endif If longonmarket and close<sma6H1 then // Sell positionsize contract at market Endif If longonmarket and close>positionprice and dayofweek=5 and time=220000 then // Sell positionsize contract at market Endif Timeframe(default) |
📌 Strategy summary
• Trade exclusively longs on Nasdaq, with context in H1 and trades in M5.• Trade exclusively longs on Nasdaq, with context in H1 and trades in M5.
• The system opens longs with a previous bullish H1 candle and the current bullish H1 candle, with abs(open-low)<2 in H1 and when the price crosses above the H1 high of the previous candle.
• The SL is a few pips below the H1 low of the previous candle, seeking TP for 3R.
• A trailing stop has been incorporated that is activated from a latent gain of 1R based on the low of the previous M5 candle. It can be optimised.
• Results with WF show efficiency in all sections. I have done the Monte Carlo simulation with AI and the results are robust. The parameters are “previous candles” = 1 and “activation profit” = 91 for 100 and 200k.
• I subsequently tried leaving the system with additional exits for cases where the price reverses without reaching 3R, concluding that the backtest results with only the additional exits are similar to the version with trailing.
The system is coded based on a template I use to build systems that calculate OHLC values in PRT to match those of IG: Maxdia, Mindia, PDH, PDL, PWH, PWL, so you will see in the code the calculation of these OHLCs, which are not used later: it is a template for building faster systems based on it.
🔍 What does this strategy offer?
• H1 context for filtering addresses.
• Intraday mechanics with good operational efficiency.
• Reproducible tests for anyone who wants to verify.
📊 Invitation to discuss SURVIVAL RATE / Future robustness
I am publishing this not because it is perfect, but because I want to make it better 🤝.
What I would really like to achieve with this post is to open up a dialogue on something crucial and rarely discussed here: the survival of the strategy in the future.
📌 I ask the experts:
How would you assess the future survival rate of a strategy like this?
I would be particularly interested in:
🔸 Opinions on using Prorealtime to estimate the survival rate of automated strategies and improve the predictive power of automated systems.
🔸 What methods do you use to predict whether a strategy will continue to work in new markets?
🔸 Which metrics do you find most reliable (PF, CAGR, DD, Expectancy, WF Robustness)?
🙌 Final invitation
🔔 If you like this type of intraday development on Nasdaq, comment 👍, contribute your version of the code, or share improvements!
📩 I am willing to collaborate and integrate the best of the community.
I opened a forum topic to discuss about, please fee to join the conversation:
Beyond Backtests: Long-Term Survival Rate of Automated Strategies in ProRealTime
Best regards.
Alfonso
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
