Has made a simple code for DAX 30 which runs between 09:00 and 17:20.
According to the 100k backtest, is looks ok..
It would be interesting to see a 200k backtest on it 🙂
Spread 1p.
DEFPARAM CumulateOrders = False
DEFPARAM FLATBEFORE = 090000
DEFPARAM FLATAFTER = 172000
// Conditions to enter long positions
indicator1 = BollingerDown[19](close)
c1 = (close <= indicator1)
indicator2 = Stochastic[15,3](close)
c2 = (indicator2 CROSSES UNDER 13)
IF c1 AND c2 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to enter short positions
indicator10 = BollingerUp[21](close)
c10 = (close >= indicator10)
indicator20 = Stochastic[14,3](close)
c20 = (indicator20 CROSSES OVER 70)
IF c10 AND c20 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Stops and targets
SLL = 27
TPL = 14
if longonmarket then
SET STOP pLOSS SLL
sET TARGET pPROFIT TPL
ENDIF
SLS = 30
TPS = 10
if SHORTonmarket then
SET STOP pLOSS SLS
sET TARGET pPROFIT TPS
ENDIF
EricParticipant
Master
Avg gain 2,29
not much room for slippage but on limit orders you could get positive slippage (det du förlorar på karusellen tar du kanske igen på gungorna?)
Hi Barney, here is the backtest with 200000 bars.
Sorry Barney, couldn’t resist 🙂
LeoParticipant
Veteran
Sorry Barney, couldn’t resist 
Haha!!! It so early in the morning and it is awesome to read a joke in the forum! Hahah! XD
Doh 🙂 Been there done that Barney..
Thanks for the 200k backtest!
I do not feel completely satisfied with the result though.
Seems to be difficult to get simple codes to work, it feels like you need a 200 k test to see if algon is something to have or not(especially at 5 min algos).
If it was easy….. 😉
I know exactly how you feel. Before i got the 200K backtest premium for myself, i had several systems that looked so good in 100K, when in 200K tho…
Even made a post about it: https://www.prorealcode.com/topic/creating-strategies-questions-about-backtest-and-periods/
In short, it just does not feel sexy when its HORRIBLE before 2016, but SEXY after 😀
I guess that if you curve-fit something there might be a chance that the same curve might work tomorrow.. I mean you can be pretty sure that it will STOP working i guess… and thats why i dont want to run stuff that only looks good on 100K… Even though i have for example the linked system going in demo, making money, i just know that its going to stop working maybe tomorrow, or maybe in a week or maybe in a month. I’d rather have a more robust system than that…
Ps: i do not have alot of experience with live automated systems trading 🙂
All periods and stoploss / takeprofit values have been optimized, that’s why it is curvefitted. You can do optimisation of course, but do WFA to prove robustness of it! The past 100k bars before your own test are pure Out Of Sample data that could validate or not your strategy, but it doesnt.
You have 2 ways to make things better:
- develop your idea on at least 1 In Sample period (70% of data) and test in the next 30%
- if you are in a optimisation process, do a simple WFA with one or many IS/OOS iterations to find the good edge
Come one Barney, I know you can make it!
https://www.prorealcode.com/blog/learning/prorealtime-walk-analysis-tool/
This was one of the reasons i came to this forum!
Big thanks to nicolas for the good work 🙂
Ok, here coms a code that is not over optimized. Simple code again thugh!
DAX 5 min spread 1.
DEFPARAM CumulateOrders=False
defparam flatbefore = 090000
defparam flatafter = 173000
indicator1 = ExponentialAverage[46](close)
indicator2 = ExponentialAverage[10](close)
c1 = (indicator1 > indicator2[1])
indicator3 = AroonUp[20]
indicator4 = Aroondown[76]
c2 = (indicator3 CROSSES OVER indicator4)
indicator100 = close
indicator101 = Supertrend[7,1]
c100 = indicator100 > indicator101
IF c1 and c2 and c100 THEN
BUY 1 CONTRACTs AT MARKET
ENDIF
set stop ploss 20
set target pprofit 10
Would be nice if someone would try 200k on it 🙂
Here you go. Not bad IMO.
Thanks Despair for the 200k test.
Will probably start it live 🙂