timeframe(4 hour, updateonclose)
barCount = barIndex
…
//——————————
timeframe (5 minutes, updateonclose) // TF default
once tradeOn = 1
if intradayBarIndex = 0 then
tradeOn = 1
endif
tradeBar = barCount
if not onMarket and tradeBar<>tradeBar[1] then
tradeOn = 1
endif
…
//———————————————————
MTF – one trade per bar
If you / anybody clicks in cell H1 (in the spreadsheet below) then you can copy a link that looks like this …
Snippet Link Library
cummulate = false
you mean that you don’t want it to enter, get stopped out, and then enter again in the same candle? For that you can use Mauro’s code.
Here is my version, built with my capabilities. Not as filigree as the nonethless version. But similar overall result. Let’s see which one looks better in a month?
Some additional things are built in:
1 trade per H4 bar
red / green candle separated
Fridays with profit from the market
EMA15 used (“typicalprice” is important here)
Significantly smaller stop loss for less risk
WF until May, from then on it’s OOS
I get the best results in the M5 with a simple breakeven. But I can’t get rid of the drawdown in September. Maybe there is still a good filter against it?
The result does not really improve with trailing stoploss.
Are there any suggestions for solutions or improvements? Anyway, it seems to be worth it.
similar overall result
???
this is mine from the same period, with positionsize = 1
(the previous were 0.5)
v4.4T is cumulative orders = true
this one says v3 but it’s the same as v2 above, cumulative orders false
U are all great. Possible to get a version of this algo with september in gain?
@nonethless Sure, your result looks better. I’m not a master either. It’s also not about measuring yourself against each other. But to come to a similar goal in several ways. I took the route with a small stop loss and a lot of small wins. Unfortunately without a trailing stop. You the way with a big SL. No idea which variant is more robust. But we are struggling with the same problematic market phases. September … do you have an idea?
Round 2 with an SP500 version? 😉
sorry if that came across as ‘competitive’ – I’m really not 😎
I wouldn’t give september a second thought. I took some losses too, but look what followed – a five week bull run. I’ve gained more in just the past week than whatever I lost in September. That’s just the way it goes. Gotta keep one eye on the bigger picture.
And yes, no reason your breakout idea shouldn’t work elsewhere – DAX, DJ, SP …
All right, I am grateful for your help. I have been trading such breakouts manually for a long time. And it’s good to know that it also works automatically. I let the Algos run in demo for 4 weeks and then maybe you can try a live version.