Help on analyzing this system
Forums › ProRealTime English forum › ProOrder support › Help on analyzing this system
- This topic has 17 replies, 4 voices, and was last updated 1 day ago by
Schizophunk.
-
-
04/21/2025 at 8:18 PM #246170
Hi everyone,
I got this system that it has a nice equity curve, and it is winner every year. However, due to my little experience on algorithmic trading and coding, i have some questions that i will appreciatte whomever can help me with.
- The system make some entries that are not reflected in the Positions Bar Graph.
- This system has a very tight stop-loss, leaving the profits run away. However, this means many a very low % of winning trades. What do you think about this type of trading systems?
- Any improve recomendation (if any).
3 parabolic SAR with very tight SL12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364// Estrategia Parabolic SAR y entradas dinámicas con SL y TP en %// EUR/USD - M60defparam cumulateorders = falseDEFPARAM FLATBEFORE = 010500DEFPARAM FLATAFTER = 234000// ====== PARÁMETROS ======PriceEntryMult1 = 0.1ProfitTarget1 = 0 // % de beneficioStopLoss1 = 0.002 // % de pérdida// ====== INDICADORES ======sar1 = SAR[0.01, 0.01, 0.2]sar2 = SAR[0.02, 0.01, 0.3]sarEntry = SAR[0.02, 0.01, 0.1]// ====== SEÑALES ======longSignal = (close < sar1) and (close < sar2[1])shortSignal = (close > sar1) and (close > sar2[1]) and not longSignal// ====== PRECIO DE ENTRADA ======barRange = high - lowlongEntryPrice = sarEntry[2] - (PriceEntryMult1 * barRange)shortEntryPrice = sarEntry[2] + (PriceEntryMult1 * barRange)//if longSignal THEN//lsignal = 1//else//lsignal = 0//ENDIF////if shortSignal THEN//ssignal = 1//ELSE//ssignal = 0//ENDIF//GRAPHONPRICE longEntryPrice//GRAPH lsignal//GRAPH ssignal//GRAPH barRange// ====== ENTRADAS ======if longSignal thenbuy 5 contract at longEntryPrice stopset stop %loss StopLoss1set target %profit ProfitTarget1endifif shortSignal thensellshort 5 contract at shortEntryPrice stopset stop %loss StopLoss1set target %profit ProfitTarget1endif// ====== SALIDA EN VIERNES A LAS 20:40 ======if (dayofweek = 5 and time >= 204000) thenif longonmarket thensell at marketendifif shortonmarket thenexitshort at marketendifendifThank you very much to all the community, mostly to all those whom are always helping depite the time it takes. Really appreciating it.
Regards.
04/21/2025 at 8:33 PM #246173Check that you have Tick by Tick enabled as shown at the red arowhead on attached.
1 user thanked author for this post.
04/22/2025 at 5:01 AM #246189Hi,
Why is “ProfitTarget1=0” set to zero? (no profit?)
The “StopLoss1=0.002” is expressed as a percentage using the “Set Stop %Loss”…
Suppose the current price is 1.15, then 0.002% equals (1.15 / 100 * 0.002) = 0.000023 pips…
The minimum stop distance at IG for mini EUR/USD is 0.0002 pips…
You also have to take into account the spread, which is at least 1 pip…
When I run the system with realistic values, unfortunately, it quickly runs out of capital…1 user thanked author for this post.
04/22/2025 at 11:35 AM #246208Hi guys,
Thank you very much for your time,
Check that you have Tick by Tick enabled as shown at the red arowhead on attached.
I can not find that option in my ProRealTime Complete. See the attachement “tickbytick”. However, I think it is enabled, due the trades get executed in the middle of the candles, isnt?
Why is “ProfitTarget1=0” set to zero? (no profit?)
I realized doing some tests that removing the ProfitTarget the systems is more profiable, but i wanted to leave the option.
The minimum stop distance at IG for mini EUR/USD is 0.0002 pips…
You also have to take into account the spread, which is at least 1 pip…
When I run the system with realistic values, unfortunately, it quickly runs out of capital…Sorry, maybe i expressed in wrongly. But the point is that I realized that with super tight SL (2 to 5 pips), the system is profitable. I changed the code to SL in pips and set 5. Also I added the minimum commision of ProRealTime for this product, and 0.1 spread. Find the attachements “SL5pipsonly” and “equity curve”.
Again thank you very much guys.
04/22/2025 at 12:07 PM #246212If you want to post your latest code (we can’t copy & paste from the image) then I would test on my Platform and maybe JS would also.
Re Tick by Tick mode … what version Complete are you running … as all versions should show Tick by Tick options box??What Instrument are you testing on which has a spread of 0.1 points (which you show in backtest settings).
1 user thanked author for this post.
04/22/2025 at 1:07 PM #246218hi,
according your printscreens I would conclude that you don’t have tick by tick data because you did not purchase real time data for this instrument / exchange on which you are running the backtest – only if you purchase the real time data the portal will show you “tick by tick” option, otherwise not. other than that I will probably not contribute to this discussion as the strategy is linked to an indicator. anyway, here my usuall “warning” 😀 be afraid, be very afraid of such smooth equity curves 😉
regards
j
2 users thanked author for this post.
04/22/2025 at 2:31 PM #246221@GraHal, you can ask ChatGPT (free version) to extract the code from the picture…
2 users thanked author for this post.
04/22/2025 at 2:57 PM #246223Hi guys,
Find the code herebelow to copypaste.
Parabolic SAR1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950// Estrategia Parabolic SAR y entradas dinámicas con SL y TP en %// EUR/USD - M60defparam cumulateorders = false// ====== PARÁMETROS ======PriceEntryMult1 = 0.1ProfitTarget1 = 0 // % de beneficioStopLosspips1 = 5 // loss in pips 0.0005 pips// ====== INDICADORES ======sar1 = SAR[0.01, 0.01, 0.2]sar2 = SAR[0.02, 0.01, 0.3]sarEntry = SAR[0.02, 0.01, 0.1][2]// ====== SEÑALES ======longSignal = (close < sar1) and (close < sar2[1])shortSignal = (close > sar1) and (close > sar2[1]) and not longSignal// ====== PRECIO DE ENTRADA ======barRange = high - lowlongEntryPrice = sarEntry - (PriceEntryMult1 * barRange)shortEntryPrice = sarEntry + (PriceEntryMult1 * barRange)//GRAPHONPRICE longEntryPrice//GRAPHONPRICE shortEntryPrice//GRAPH barRange// ====== ENTRADAS ======if longSignal thenbuy 5 contract at longEntryPrice stopSET STOP PLOSS StopLosspips1set target %profit ProfitTarget1endifif shortSignal thensellshort 5 contract at shortEntryPrice stopSET STOP PLOSS StopLosspips1set target %profit ProfitTarget1endif// ====== SALIDA EN VIERNES A LAS 20:40 ======if (dayofweek = 5 and time >= 204000) thenif longonmarket thensell at marketendifif shortonmarket thenexitshort at marketendifendif04/22/2025 at 3:05 PM #246226Hi @justisan,
Actually, I just figured out that I have the tick by tick opttiona enabled when i open CFDs forex, but not when futures.
I am using ProReaLTIme Complete in MacBook M3, with java version 21.0.4(9). I dont know if this is relevant.
Again guys, thank you for your time
04/22/2025 at 3:20 PM #246228This is the result of the “BackTest tick by tick mode” with 50k units on EUR/USD mini with timeframe 1 hour… (spread 1 pip)…
1 user thanked author for this post.
04/22/2025 at 3:21 PM #246230Oops, wrong image above…
1 user thanked author for this post.
04/22/2025 at 3:24 PM #246232hi, your screeshots indicate that your backtest is on eurusd futures, on cme globex exchange, and that data you use is not real-time. I mean should know if you have real-time data for this exchange or not. for futures definetely you will not have “tick by tick” backtesting option as long as you did not purchase real-time data supply.
1 user thanked author for this post.
04/22/2025 at 3:31 PM #246234by “your” in “your screenshots…” I meant shizophunk, his screenshots
1 user thanked author for this post.
04/22/2025 at 4:24 PM #246237Hi, so if i am understanding well, it is not a good idea to backtest systems with stop orders if you dont have a “tick by tick” data, right?
And this is basically because you need to know the information inside each candle to know the exact point of execution of your stop orders.
It is like this?
04/22/2025 at 4:45 PM #246238Yes correct … without tick by tick then PRT always assumes that Profit Target was hit first (before Stop Loss) … hence one ends up with an ideal looking equity curve when in reality, with tick by tick, the correct equity curve will be like JS posted.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on