MazParticipant
Veteran
RE: https://www.prorealcode.com/prorealtime-trading-strategies/dax-bollinger-break-v
“Dax Bollinger break with volume. 1 Hour”
Just opening a forum topic for this breakout strategy idea posted by Seemore Profit. I’m a bit short on time but wanted to post a quick optimization. Also I have a few more points about this.
- Not really a fan of hard coded vars – volume threshold should be dynamic
- Bollenger periods also hard coded; could be dynamic
- Needs some proper money-management code. Hard coded basis point stop and limit are not allowing for shifts in volatility. So add ADX / FDI filters and such like
Anyway point being I think the overall idea is cool and there’s much further to go on this 🙂
Have a great week!
Best,
Maz
// System Settings
DEFPARAM CumulateOrders = False
DEFPARAM FLATBEFORE = 070000
DEFPARAM FLATAFTER = 181500
// Old Variables
//positionSize = 1
//volumeThreshold = 8000
//pointTarget = 60
//pointStop = 30
//bolUpPeriod = 20
//bolDnPeriod = 20
// New variables
positionSize = 1
volumeThreshold = 12500
pointTarget = 53 // must make this dynamic
pointStop = 30 // must make this dynamic
bolUpPeriod = 20 // not optimized yet
bolDnPeriod = 20 // not optimized yet
// Indicators
bolUp = bollingerUp[bolUpPeriod](close)
bolDn = bollingerDown[bolDnPeriod](close)
volumeFilter = ( Volume >= volumeThreshold )
tradingDay = not (OpenDayOfWeek = 6 OR OpenDayOfWeek = 0)
// Entry logic
// long side
bc1 = (close > bolUp) and volumeFilter
bc1 = bc1 and tradingDay
// short side
sc1 = (close < bolDn) and volumeFilter
sc1 = sc1 and tradingDay
// Execution
IF bc1 then
BUY positionSize PERPOINT AT MARKET
elsif sc1 THEN
SELLSHORT positionSize PERPOINT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS pointStop
SET TARGET pPROFIT pointTarget
Let’s see some further development 🙂
Here is what I get
// New variables
atrperiod = 10
atr = averagetruerange[atrperiod]
positionSize = 1
volumeThreshold = 12500
pointTarget = 3*atr
pointStop = 7*atr
bolUpPeriod = 20
bolDnPeriod = 32
Hi all thanks for the feedback.
Maz i like to use hard stops as i feel it lowers the risk of blow outs and gives a nice balance of risk to reward. I agree that something could be used to improve this is someway whilst keeping the balance in place. Maybe a reversal signal on a shorter time frame might work?
Francesco I added your variables, but didnt seem to improve the results in a back test. What were your results?
HI Seemore, yes pls find it in the attachment.
Dear All,
nice work , but why the backtest start only since August 2016 and not before ??
Regards
Volume data are lacking before then.
I wonder if with the premium account they could be retrieved.
Hi Francesco,
with premium account I get the same limitation for volume data. Volume data starts at monday, Aug 29, 2016.
So I see no possibility to backtest this volume based strategy for a longer period than aprox 9 months.
BR Cent
Due to the lack of volume data I looked at building this in MT4.
The problem is that the volume data is different.
I spoke to IG and a prop trader about the different data and I was informed that indices volume data varies and in the case of IG it represents their client pool volume.
in the case of IG it represents their client pool volume.
and this is exactly the same with any other MT4 brokers for retail traders.
Due to the lack of volume data I looked at building this in MT4. The problem is that the volume data is different. I spoke to IG and a prop trader about the different data and I was informed that indices volume data varies and in the case of IG it represents their client pool volume.
Thanks For finding this out, was wondering about this.
My final strat from the original saw the best vol set at 7000 and the target price changed to 58.
Gave these results, anyone find anything else worth adding/changing?
Dear Seemore profit,.
In your screenshot the backtest start from 2013 , is it by IG/prorealtime platform ? Because I understood that the volume for IG is only since August 2016
Thanks
That is correct JR the results are only from trades starting from August 16.
I guess it has no trades before then because of the volume data.
Hello
For volumeThreshold, it is possible to calculate an average of last volume data , in case of evolution of volume of trading of the intrument.
There is no volume during night, so volume could be filled with last volume value to prevent a zero in the average.
If volume>2000 then
myvolume= volume
volumeaverage=average(myvolume)[50]
Endif
volumeThreshold = x*volumeaverage//12500 x=2 gives good results in backtest
Backtest with x= 2 gives good results
Real robot get 3 consecutives winning trades
Hi I have found this article for similar strategy adapted to FX , maybe on other commodities for diversification
https://blog.quandl.com/bollinger-band-breakout-augmented-volume
The strategy is making some money according to backtest.
Please find live results for people who would be interested in this strategy.
Even if the DAX is in a bull market, the short side wins more than long side due to the better ratio Earning/loss. This could be due to the fact that indices grows slowly but falls sharply in fear mode. I will try to find “safe heavens money flow” related to fear mode , maybe Gold, Yen, BTC