Here is a small breakout strategy.
Here, I tested with the following settings:
– Range (channel) defined between 09H at 9H30
– On the DAX, 15 minute timeframe
– We play the breakout of high / low of the range
– Stop Loss: the other side of the range
– Take Profit: equal to the stop loss
As you can see, the code is simple.
The backtest is positive, even if it is not optimal.
Indeed, the max drawdown of € 6,548 (for an initial bet of € 10,000), for a capital gain of 51.80% per year. is too high.
We can decrease the contract size by 2 (max drawdown of € 3,274 for a capital gain of 25.90% per year), but the capital growth curve is still quite irregular.
However, this strategy seems logical and reliable, so I think there is much way to improve it.
It also works on CAC40 (or may some other indices).
But paradoxically it doesn’t work well on forex (I wanted to write it for forex, in order to use it automatically).
Defparam cumulateorders = false
Defparam flatafter = 180000
n = 1
IF Time = 093000 THEN
haut = highest(high)
bas = lowest(low)
amplitude = haut - bas
achat = 0
vente = 0
if Time > 093000 AND Time <= 180000 THEN
IF achat = 0 THEN
buy n share at haut stop
IF vente = 0 THEN
sellshort n share at bas stop
If longonmarket THEN
achat = 1
IF shortonmarket THEN
vente = 1
set stop ploss amplitude
set target pprofit amplitude
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 :