Dear community,
I would like to ask a question about a PRT code that was posted from one of you. Results are dramatically good, but one comment (“strategy looks nice, but it’s a typical mistake from beginners to think that this strategy really works […]) made me feel a little uncalm.
That strategy was posted regarding a 1h time frame. I did my backtest on daily basis and the results were much, much better.
So I put them to my ProOrder strategies two weeks ago. 1 trade was already executed with 100 € profit, but I am now unsure, if this strategy is really possible to be executed on a daily basis with this code enclosed.
Could you please help me? Thank you very, very much in advance!
You will find a screenshot on this strategy on a daily basis enclosed to see the impressing performance of my backtest.
Kind regards,
Philip
Defparam Cumulateorders = false
n = 5
// ENVELOPPES
EnveloppeSup = Average[20](close)*1.004
EnveloppeInf = Average[20](close)*0.996
// ACHAT
ca1 = ADX[40] > 10
ca2 = DIplus[40](close) > DIminus[40](close)
ca3 = high > EnveloppeSup and close < EnveloppeSup
IF ca1 AND ca2 AND ca3 THEN
BUY n SHARES AT MARKET
ENDIF
// VAD
cv1 = ADX[40] > 10
cv2 = DIplus[40](close) < DIminus[40](close)
cv3 = low < EnveloppeInf and close > EnveloppeInf
IF cv1 AND cv2 AND cv3 THEN
SELLSHORT n SHARES AT MARKET
ENDIF
// Stops et objectifs
SET STOP pLOSS 10
SET TARGET pPROFIT 20
Please update your country flag in your profile. Thank you 🙂
Hi Philip,
This code work for any timeframe. The only thing you need to worry about is the minimal stoploss and target profit for this timeframe. Because of the “0 bar” backtest behaviour, it would not operate the same in backtest and live trading for sure.
Thank you so much for your quick and kind answer, Nicolas!
Am I understanding you correctly that the 0 bar behaviour is the gap between market close and market opening? How can one see how much this 0 bar behaviour affects the risks?
Thanks so much in advance for you help!
Look at your backtest orders list and see how much trades have opened and closed on the same bar. If you have too much ones, this is not a good news.
There are many discussions about 0 bar behaviour. long story short- when PRT produce a trade that is opened and closed within the same bar, and a stoploss and a takeprofit is coded- PRT will always take the profit and leave out the stoploss. That would not be the case in real live trading.
Cheers Kasper