strategy BarHunter DAX v1p
Forums › ProRealTime English forum › ProOrder support › strategy BarHunter DAX v1p
- This topic has 255 replies, 11 voices, and was last updated 1 year ago by sfl.
-
-
01/18/2020 at 1:01 AM #117139
Hi
The South African concept looks interesting and I thought exotic but the index is surprisingly heavy in global names, perhaps there is a requirement for a local company to be used the trade there?
Looking at the back tests, while the larger data set is great for validating systems one of my pet hates is results that are shown over huge time frames as the equity curve tends to straighten out, you get a huge return and may lose site of what you are trying to achieve.
The system (for Dax at £1 per point) has a 300% return (based on £10K bank) over 10 years given the assumptions used about the spread and funding costs at the time and leverage of 1:20, however the index itself without any leverage is up around 220% over the same period without any leverage and presumably less risk. (I understand that you would not have needed £10k to open the positions)
I don’t have the data to calculate this but I would expect that of you had bought long term options on the Dax that it would have been possible to capture many multiples of the 220% return with an even lower risk than that of using CFDs/spreadbets
The system is profitable in periods and merits further work but in its present form it may not be the best use of capital given the time in the market and not showing a significant out performance of the underlying market in spite of leverage
01/19/2020 at 7:04 PM #117234@Robo Futures Trader Perhaps I shouldn’t have called it a strategy, it’s more a concept where you can build from.
Its goal is to quickly find regular market behaviour at a specific TF and at a specific intradaybar, without messing with time optimising.
ps with hindsight you could say indeed buy&hold would’ve been be much more profitable than any or most intraday systems.
I took a different approach. The code to prevent long/short on one bar didn’t work so removed that. To spot quickly that just filter a report on the number of bars. A few trades with 0 bars is oke.
So you can use the original
12345678910if longtrading or (longtrading and shorttrading) thenif intradaybarindex=barnumberlong thenbreakvaluelong=high //experiment!endifendifif shorttrading or (longtrading and shorttrading) thenif intradaybarindex=barnumbershort thenbreakvalueshort=low //experiment!endifendifand for entry
123456789101112131415161718192021222324252627282930if hour<=23 thenonce minstopdistance=10if longtrading thenif intradaybarindex >= barnumberlong thenif trendup and tradecount thenif ((breakvaluelong+breakpoint)-close)>=minstopdistance thenbuy 1 contract at breakvaluelong+breakpoint stoptradecounter=tradecounter+1elsebuy 1 contract at close+(minstopdistance+breakpoint) stoptradecounter=tradecounter+1endifendifendifendifif shorttrading thenif intradaybarindex >= barnumbershort thenif trenddown and tradecount thenif (close-(breakvalueshort-breakpoint))>=minstopdistance thensellshort 1 contract at breakvalueshort-breakpoint stoptradecounter=tradecounter+1elsesellshort 1 contract at close-(minstopdistance-breakpoint) stoptradecounter=tradecounter+1endifendifendifendifendifI’am trying to minimise the negative results from the important error you found. Hopefully this comes close, but at the same time it could be coded wrong!
1 user thanked author for this post.
01/19/2020 at 9:34 PM #11726001/20/2020 at 12:17 AM #117275@GraHal Yes results go down. Maybe it’s because it’s calculated correctly unfortunately? I’am still not sure.
Here’s a test update to the existing version. Basics is the same but it tests various ways of entries (and the original) with the minimum distance in mind. DAX 1 hour timeframe (100k bars) and this with spread=4 because the time of entry is expensive!
To cover a bit the minimum distance, I put breakpoint=5 and with the original settings it has the best results. No trend detection yet. (entrytype=1, barnumber=3)
If going for stoploss 2% instead of 1, results increase more.
01/20/2020 at 12:46 AM #117281added a nice addition to the trend detection system thanks to @nonetheless ! (from other topic)
Changed medianprice to totalprice and that worked good! Kept both.
12345678910111213141516171819202122232425262728293031323334// trend detectionif tds=0 thentrendup=1trenddown=1elseif tds=1 thentrendup=(Average[50](close)>Average[50](close)[1])trenddown=(Average[85](close)<Average[85](close)[1])elseif tds=2 thenbbup=BollingerUp[20](close)bbdn=BollingerDown[20](close)bbav=(bbup+bbdn)/2trendup=bbav>bbav[1]trenddown=bbav<bbav[1]elseif tds=3 thenPeriod= 3inner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)HULL = weightedaverage[round(sqrt(Period))](inner)trendup = HULL > HULL[1]trenddown = HULL < HULL[1]elseif tds=4 thenPeriod= 2inner = 2*weightedaverage[round( Period/2)](totalprice)-weightedaverage[Period](totalprice)HULL = weightedaverage[round(sqrt(Period))](inner)trendup = HULL > HULL[1]trenddown = HULL < HULL[1]endifendifendifendifendifpic below with stoploss 1% comparable to first pic above.
01/20/2020 at 11:23 AM #117303with the original settings it has the best results.
You have over twice the number of trades as me and over twice the profit … any ideas how that can be?
01/20/2020 at 11:51 AM #11730701/20/2020 at 12:05 PM #117309Perhaps your strategy should be one bar less?
Yes I optimised the barnumber and it gave = 2 as highest profit. Which is logical as I am 1 hour less than you.
I just tried barnumber =3 and it gives < 2K profit. So the difference in our results is not due to timezone.
I even just re-imported a new v2p file and ONLY changed barnumber = 2 to see if I had changed anything else but it still gives me about half the trades you show over 100k bars.
Weird eh? Must be some simple reason??
01/20/2020 at 12:11 PM #117310here’s a new one. Since the 10 points difference is so important I made an adjustment to be dependent on the breakpoint number.
So if breakpoint =10 or higher, the minstopdistance=0
breakpoint=7, minstopdisntance=3
breakpoint=0, minstopdistance=10
If you select i.e. entrytype=1, then minstopdistance is ignored, which isn’t the best/reliable way.
pic is with stoploss 2% & with entrytype1, breakpoint5, barnumber3, trend4, spread4
1 user thanked author for this post.
01/20/2020 at 12:29 PM #117314So if breakpoint =10 or higher, the minstopdistance=0
I have been amending your 10’s to 15 as – although the Rejection message states minimum distance = 10 – I doubt that min distance = 10 at all and it could be anything from 10 to ????
Has anybody had any version so far take a trade overnight?
I guess we will get there in the end by trial and error (1 trial every 24 hours in this case) and your excellent coding Paul.
It’s a pity IG can’t / don’t see the efforts we have to go to, just to get Systems to NOT be Rejected!!??
01/20/2020 at 12:31 PM #11731501/20/2020 at 1:03 PM #117321Thanks GraHal & Francesco!
Indeed it states 10 and in reality it could fluctuate a bit which impact the results if entrytype=1 is used. I don’t even want to think what it would do to the equity-curve! 🙂
But don’t keep focussing on that 2 or 3 hourly bar! It has more options. You don’t need to have the best and highest payout when searching for a bar. I think if you have a reasonable result on a specific bar with MANY trades, it gives reason to dig further. Potential interesting times are around8-9am and 5.30 pm for the dax. It’s possible to use multi time frames on this and I think minimum 15 minutes. Also it’s not necessary to use stop orders, but market orders can be used too. But at this moment the code is a bit messy, so I have the find the right setup.
1 user thanked author for this post.
01/21/2020 at 8:55 PM #11745101/21/2020 at 9:47 PM #11745301/21/2020 at 10:35 PM #117457 -
AuthorPosts
Find exclusive trading pro-tools on