strategy BarHunter DAX v1p

Viewing 15 posts - 46 through 60 (of 256 total)
  • Author
    Posts
  • #117459 quote
    GraHal
    Participant
    Master

    We’ve had 0 / zero real trades up to now so it’s still early days.

    There’s been problems related to the variable minimum distance stop settings used by IG!

    Francesco thanked this post
    #117519 quote
    fifi743
    Participant
    Master

    Hello, Why not use a virtual stop

    #117520 quote
    GraHal
    Participant
    Master

    Go on … tell us what a virtual stop is? 🙂

    #117534 quote
    Paul
    Participant
    Master

    @fifi743 you got me curious too!

    @GraHal maybe we should do more testing, meaning more different barnumbers for entry1 to 4 so we can pick a entry-type which is reliable regardless of the bar-number and results.

    #117539 quote
    GraHal
    Participant
    Master

    so we can pick a entry-type which is reliable regardless of the bar-number and results.

    Yeah but as backtest does not perform same as Live (which is a nonsense in itself!?) then how can we prove what is reliable other than Live Forward Test … which would take for ever as so few trades?

    I guess if we don’t use stop entry then backtest results should be closer to Live results and so more reliable?

    If I recall correctly, my 5 min version is an at market entry  … hopefully there should be would be no Issues re minimum distance

    #117543 quote
    fifi743
    Participant
    Master
    // ================trailing atr stop VIRTUAL==================
    
    if enabletsvir then
    //
    once stepsvir=0
    once minatrdistvir=0
    
    once atrtrailingperiodvir    = 2  // atr parameter
    once minstopvir              = 10   // minimum  distance
    
    if barindex=tradeindex then
    trailingstoplongvir    = 5  // trailing stop atr distance
    trailingstopshortvir    = 5   // trailing stop atr distance
    else
    if longonmarket then
    if newslvir>0 then
    if trailingstoplongvir>minatrdistvir then
    if newslvir>newslvir[1] then
    trailingstoplongvir=trailingstoplongvir
    else
    trailingstoplongvir=trailingstoplongvir-stepsvir
    endif
    else
    trailingstoplongvir=minatrdistvir
    endif
    endif
    endif
    
    if shortonmarket then
    if newslvir>0 then
    if trailingstopshortvir>minatrdistvir then
    if newslvir<newslvir[1] then
    trailingstopshortvir=trailingstopshortvir
    else
    trailingstopshortvir=trailingstopshortvir-stepsvir
    endif
    else
    trailingstopshortvir=minatrdistvir
    endif
    endif
    endif
    endif
    //
    atrtrailvir=averagetruerange[atrtrailingperiodvir]((close/10)*pipsize)/1000
    trailingstartlvir=round(atrtrailvir*trailingstoplongvir)
    trailingstartsvir=round(atrtrailvir*trailingstopshortvir)
    tglvir=trailingstartlvir
    tgsvir=trailingstartsvir
    //
    if not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) then
    maxpricevir=0
    minpricevir=close
    newslvir=0
    endif
    //
    if longonmarket then
    maxpricevir=max(maxpricevir,close)
    if maxpricevir-tradeprice(1)>=tglvir*pointsize then
    if maxpricevir-tradeprice(1)>=minstopvir then
    newslvir=maxpricevir-tglvir*pointsize
    else
    newslvir=maxpricevir-minstopvir*pointsize
    endif
    endif
    endif
    //
    if shortonmarket then
    minpricevir=min(minpricevir,close)
    if tradeprice(1)-minpricevir>=tgsvir*pointsize then
    if tradeprice(1)-minpricevir>=minstopvir then
    newslvir=minpricevir+tgsvir*pointsize
    else
    newslvir=minpricevir+minstopvir*pointsize
    endif
    endif
    endif
    //
    if longonmarket and close <newslvir and newslvir>0 then
    sell at market
    endif
    if shortonmarket and close>newslvir and newslvir>0 then
    
    exitshort at market
    
    endif
    I have two trailing stops Whoever moves the stop And the other if it is closed is above or below the newslvir
    Paul, GraHal and Francesco thanked this post
    #117546 quote
    GraHal
    Participant
    Master

    Above added as Log 196 here …

    Snippet Link Library

    fifi743 thanked this post
    #117565 quote
    fifi743
    Participant
    Master
    #117569 quote
    Paul
    Participant
    Master

    Thanks fifi! The virtual stop is implemented as I thought. The original ts still running with atrtrailingperiod=14 and the virtual with value 2. Also the test de nombre de bar negative ajouter makes a difference. Total results is a bit the same, but the equitycurve has a nicer shape!

    I’am working on something to drop the stop for entry. But it’s not there yet.

    GraHal and winnie37 thanked this post
    #117627 quote
    Paul
    Participant
    Master

    @fifi, with importing I noticed tick by tick wasn’t enabled, so I did the test again and with target profit disabled.

    your average loss dropped quite a bit. Will test to to see what difference it brings to the market version.

    Unfortunately I don’t understand the benefit of the virtual trailing stop and see very little difference. Maybe it shows more with live trading.

    Screenshot-2020-01-23-at-16.33.39.jpg Screenshot-2020-01-23-at-16.33.39.jpg Screenshot-2020-01-23-at-16.33.58.jpg Screenshot-2020-01-23-at-16.33.58.jpg
    #117637 quote
    fifi743
    Participant
    Master

    Good-morning Paul,
    To avoid errors of stops too close.
    The value remains in the variable
    There may be more difference in lower time frame.

    Paul thanked this post
    #117810 quote
    fifi743
    Participant
    Master

    Hello,
    Entry type = 1 I reduced the hour to 21
    I have placed two different stops depending on the trading hours.
    To be checked so as not to have an error
    Today I’m at 271 points for Stop

    Paul and winnie37 thanked this post
    Capture-d’écran-487.png Capture-d’écran-487.png BarHunter-v3p-MOD-FIFI.itf
    #117845 quote
    Paul
    Participant
    Master

    Hi Fifi43

    Thanks I will look into this. I found irregularities when using barindex numbers. Because when there is no data, everything shifts a bar! Doesn’t happen too much on 1 hour timeframe, but it could be more often on lower timeframes and I want it to be universal.

    So I’m testing a way too quickly and efficiently optimise time using hour & any minutes. Also looking in your nicely coded FILTRE_Prise_Position if it could be of use for profittaking.

    #117852 quote
    jmf125
    Participant
    Senior

    @Grahal

    Did you figure out the exact reason of the difference ? As I am also getting a different equity curve and number of trades. I believe it is the timezone. I only 100 K bars to test, so I can’t compare exactly to the latest from fifi. But if I change the timezone to be inline with the others, I get exactly the same drawdown (869.80) and similar profit profile per month.

    Optimizing barnumber might not give you the same result.

    #117853 quote
    jmf125
    Participant
    Senior

    @Grahal : Disregard my previous comment. It will give you exactly the same result.

Viewing 15 posts - 46 through 60 (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...