strategy BarHunter DAX v1p

Viewing 15 posts - 31 through 45 (of 256 total)
  • Author
    Posts
  • #117139 quote
    deletedaccount100622
    Participant
    New

    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

    Francesco and Paul thanked this post
    Annotation-2020-01-17-233921.png Annotation-2020-01-17-233921.png
    #117234 quote
    Paul
    Participant
    Master

    @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.

    @GraHal

    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

    if longtrading or (longtrading and shorttrading) then
    if intradaybarindex=barnumberlong then
    breakvaluelong=high //experiment!
    endif
    endif
    if shorttrading or (longtrading and shorttrading) then
    if intradaybarindex=barnumbershort then
    breakvalueshort=low //experiment!
    endif
    endif

    and for entry

    if hour<=23 then
    once minstopdistance=10
    if longtrading then
    if intradaybarindex >= barnumberlong then
    if trendup and tradecount then
    if ((breakvaluelong+breakpoint)-close)>=minstopdistance then
    buy 1 contract at breakvaluelong+breakpoint stop
    tradecounter=tradecounter+1
    else
    buy 1 contract at close+(minstopdistance+breakpoint) stop
    tradecounter=tradecounter+1
    endif
    endif
    endif
    endif
    
    if shorttrading then
    if intradaybarindex >= barnumbershort then
    if trenddown and tradecount then
    if (close-(breakvalueshort-breakpoint))>=minstopdistance then
    sellshort 1 contract at breakvalueshort-breakpoint stop
    tradecounter=tradecounter+1
    else
    sellshort 1 contract at close-(minstopdistance-breakpoint) stop
    tradecounter=tradecounter+1
    endif
    endif
    endif
    endif
    endif

    I’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!

    GraHal thanked this post
    #117260 quote
    GraHal
    Participant
    Master

    Thank you for the latest improvement @Paul.

    Do you get the same as me … the profit falls??

    The attached equity curves are shown as …

    • v1p + mindistv2 (6.23K)
    • v1p +mindistv1 (10.6K
    • v1p (10.6K)
    Paul-11.jpg Paul-11.jpg
    #117275 quote
    Paul
    Participant
    Master

    @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.

    Francesco, GraHal and reb thanked this post
    Screenshot-2020-01-19-at-23.54.20.jpg Screenshot-2020-01-19-at-23.54.20.jpg Screenshot-2020-01-19-at-23.54.28.jpg Screenshot-2020-01-19-at-23.54.28.jpg BarHunter-v2p.itf Screenshot-2020-01-20-at-00.15.52.jpg Screenshot-2020-01-20-at-00.15.52.jpg
    #117281 quote
    Paul
    Participant
    Master

    added a nice addition to the trend detection system thanks to @nonetheless ! (from other topic)

    Changed medianprice to totalprice and that worked good! Kept both.

    // trend detection
    if tds=0 then
    trendup=1
    trenddown=1
    else
    if tds=1 then
    trendup=(Average[50](close)>Average[50](close)[1])
    trenddown=(Average[85](close)<Average[85](close)[1])
    else
    if tds=2 then
    bbup=BollingerUp[20](close)
    bbdn=BollingerDown[20](close)
    bbav=(bbup+bbdn)/2
    trendup=bbav>bbav[1]
    trenddown=bbav<bbav[1]
    else
    if tds=3 then
    Period= 3
    inner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)
    HULL = weightedaverage[round(sqrt(Period))](inner)
    trendup = HULL > HULL[1]
    trenddown = HULL < HULL[1]
    else
    if tds=4 then
    Period= 2
    inner = 2*weightedaverage[round( Period/2)](totalprice)-weightedaverage[Period](totalprice)
    HULL = weightedaverage[round(sqrt(Period))](inner)
    trendup = HULL > HULL[1]
    trenddown = HULL < HULL[1]
    endif
    endif
    endif
    endif
    endif

    pic below with stoploss 1% comparable to first pic above.

    Screenshot-2020-01-20-at-00.43.41.jpg Screenshot-2020-01-20-at-00.43.41.jpg
    #117303 quote
    GraHal
    Participant
    Master

    with 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?

    Paul-12.jpg Paul-12.jpg Paul-13.jpg Paul-13.jpg
    #117307 quote
    Paul
    Participant
    Master

    Yes timezone. Perhaps your strategy should be one bar number less or more?

    #117309 quote
    GraHal
    Participant
    Master

    Perhaps 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??

    #117310 quote
    Paul
    Participant
    Master

    here’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

    Francesco thanked this post
    BarHunter-v3p.itf Screenshot-2020-01-20-at-12.08.44.jpg Screenshot-2020-01-20-at-12.08.44.jpg Screenshot-2020-01-20-at-12.08.49.jpg Screenshot-2020-01-20-at-12.08.49.jpg
    #117314 quote
    GraHal
    Participant
    Master

    So 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!!??

    #117315 quote
    Francesco
    Participant
    Veteran

    @paul v3 looks amazing! congrats 🙂

    #117321 quote
    Paul
    Participant
    Master

    Thanks 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.

    GraHal thanked this post
    #117451 quote
    GraHal
    Participant
    Master

    We managed to place Stops this morning so maybe you have got the code and levels correct now Paul?

    Paul thanked this post
    Paul-14.jpg Paul-14.jpg
    #117453 quote
    GraHal
    Participant
    Master

    Works well on TF = 5 mins also … just as you thought!

    Francesco and Paul thanked this post
    Paul-15.jpg Paul-15.jpg Paul-16.jpg Paul-16.jpg
    #117457 quote
    Francesco
    Participant
    Veteran

    Best on 5min or 1h in your opinion guys?

Viewing 15 posts - 31 through 45 (of 256 total)
  • You must be logged in to reply to this topic.

strategy BarHunter DAX v1p


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paul @micky75d Participant
Summary

This topic contains 255 replies,
has 11 voices, and was last updated by sfl
2 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/15/2020
Status: Active
Attachments: 136 files
Logo Logo
Loading...