Discussing the strategy VECTORIAL DAX (M5)

Viewing 15 posts - 256 through 270 (of 1,264 total)
  • Author
    Posts
  • #109317 quote
    fifi743
    Participant
    Master
    the backtest starts on the 27th as in the picture.
    I will explain you in the weekend but in French because I am bad in English
    #109318 quote
    Vonasi
    Moderator
    Master

    I will explain you in the weekend but in French because I am bad in English

    No French in the English speaking forum please. It’s a forum rule! 🙂

    #109322 quote
    fifi743
    Participant
    Master

    Good morning all. For those who have unpleasant remonstrances you keep them for you. I share my work to help you and a piece of code can serve you. To start I calculated the maximum return with a variable for the long and a variable for the short Line 21

    PP=positionperf(0)*100 if pp>ppf then ppf=pp endif

    After I left the maximum yield for the long and I reduced the value to increase the gain

    if longonmarket and ppF>3.6 and pp>ppF-pp then
    sell at market
    endif
    if shortonmarket AND ppF>1.9 and pp>ppF-pp then
    exitshort at market
    endif
    
    afterwards, I seek to reduce the losses and to maximize the gains while increasing the gains, the ratio loss gains and the% of winning position. It’s the longest and the most complicated. And I realized that line 45
    CondBuy2 = (pente > trigger) AND (pente < 0)
    Ask me a problem so I looked for a filter to limit the long position openings
    // ajout d'un filtre pour achat
    MA=Average[4](close)
    CondBuy2 = (pente > trigger) AND (pente < 0) and high>MA and coeff>0.9
    
    And I continued and not finished reducing losses and maximizing gains.
    If you have ideas I am a taker to avoid writing hundreds of lines.
    Next coming I will pass it in MTF In M 5 the code you know In M1 the verification of operations if they are well past.
    Because often backtest no problem but in reality it’s something else. Because all operations must pass. I’m waiting for your comment.
    Sorry it’s the translator
    Balmora74, reb, Paul and 3 others thanked this post
    #109323 quote
    AE
    Participant
    Senior

    Hi fifi743,

    thanks again for your idea.

    did you check your strategy in Demo or Live? Have you got the same results than in backtesting?

    Gubben thanked this post
    #109327 quote
    fifi743
    Participant
    Master
    Hello, no I did not test it because it is not finished.
    it’s like jumping in the water when you can not swim
    #109333 quote
    Paul
    Participant
    Master

    Hi fifi743

    You use a lot of market orders, which are influenced by slipppage & spread on every trade.

    Isn’t it more reliable (and perhaps not better) to define your price yourself, i.e. the close when you have a signal and then enter on limit else on stop or visa versa on the next bar?

    All is depended on the positionperformance, based the price you get from the broker. It should be based on the price you set yourself to work with regardless of slippage.

    Maybe it doesn’t matter, maybe a lot I don’t know. What do you think?

    Here’s a snippet I use.

    If orderhandling=2 then you have to set your own orderprice after a signal, and replace all tradeprice(1) to orderprice (only in your code the trailingstop)

    if orderhandling=1 then
    pperf=(positionperf(0)*100)
    orderprice=tradeprice(1)
    //graphonprice orderprice
    elsif orderhandling=2 then
    if longonmarket then
    pperf=((close/orderprice)-1)*100
    elsif shortonmarket then
    pperf=((orderprice/close)-1)*100
    endif
    //graphonprice orderprice
    elsif orderhandling=3 then //manual
    orderprice=12370.7
    if longonmarket then
    pperf=((close/orderprice)-1)*100
    elsif shortonmarket then
    pperf=((orderprice/close)-1)*100
    endif
    //graphonprice orderprice
    endif
    #109344 quote
    fifi743
    Participant
    Master

    thank you paul i will test

    #109357 quote
    Paul
    Participant
    Master

    I did implement it, hopefully correctly

    the code is still very good!

     

     

    fifi743, Balmora74, josef1604 and capgros thanked this post
    Vectorial-DAX-M5p-_test1.itf
    #109377 quote
    Paul
    Participant
    Master

    In test1, because condsell/condbuy, it creates signals on multiple bars after each other and then it changes the orderprice too.

    to make it stick I used below and other way around.

    if not onmarket or shortonmarket[1] then
    orderprice=close
    endif

    The code works too if limit orders are used. This creates now near similar results to the original code. So far it looks reliable.

    fifi743 thanked this post
    #109396 quote
    fifi743
    Participant
    Master

    good-morning Paul ,
    yes condbuy / condsell produces several signal at a time.
    I search for a filter to limit the conditions.

    Paul and josef1604 thanked this post
    #109602 quote
    capgros
    Participant
    Average

    Hi guys,

    Thanks for your amazing work.

     

    I have made some 200k tests in the different versions I found more interesting. From 24/11/2016 to 08/10/2019 (today)

    I don´t know why, but I don´t get the same results as you do on the last 2 versions (fifi & fifi´s Paul edit), could you maybe help me understand why?

    From left to right: v4.2p  / v5.0p / fifi´s / fifi´s Paul edit

    Captura-de-pantalla-2019-10-08-a-las-11.50.45.png Captura-de-pantalla-2019-10-08-a-las-11.50.45.png
    #109630 quote
    Paul
    Participant
    Master

    @capgros

    hi, basically it are different strategies now. From my upload I would focus on 5.0p and on fifi43 latest upload. (you picked the first one)

    test1 was not correctly coded, 4.2p is too old.

    If you want to compare then use the same positionsize /posmax.

    capgros thanked this post
    #109632 quote
    Paul
    Participant
    Master

    a comparison 200k bars limit vs market, 1 position

    Yesterday/today results were different because of 0.8 entry points. Strangly limit had a better entry but was closed quickly.

    Included the correction on previous upload.

    josef1604 and Balmora74 thanked this post
    Screenshot-2019-10-05-at-21.15.58.jpg Screenshot-2019-10-05-at-21.15.58.jpg Screenshot-2019-10-08-at-16.56.57.jpg Screenshot-2019-10-08-at-16.56.57.jpg Vectorial-DAX-M5p-_test2.itf
    #109640 quote
    fifi743
    Participant
    Master

    Hello,
    here is the comparison between my last version and paul’s.
    less DD more gains.
    in my last version I included supports and resistances weekly and daily.
    I still have to include the round numbers
    example 11500
    there can be a rebound

    josef1604 and Paul thanked this post
    Capture-d’écran-248.png Capture-d’écran-248.png Capture-d’écran-249.png Capture-d’écran-249.png Capture-d’écran-251.png Capture-d’écran-251.png Capture-d’écran-252.png Capture-d’écran-252.png Capture-d’écran-250.png Capture-d’écran-250.png
    #109658 quote
    josef1604
    Participant
    Senior

    Hola,

    aquí está la comparación entre mi última versión y la de Paul.

    menos DD más ganancias.

    en mi última versión incluí soportes y resistencias semanales y diarias.

    Todavía tengo que incluir el

    ejemplo de números redondos 11500

    , puede haber un rebote

    Thank you very much for your work! The v2 you have hung is not the same as the .mod, right? the * .mod version gives me different results to the latest version v2. We wait with intraga the code. Thanks again for your work and Paul’s

Viewing 15 posts - 256 through 270 (of 1,264 total)
  • You must be logged in to reply to this topic.

Discussing the strategy VECTORIAL DAX (M5)


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Balmora74 @balmora74 Participant
Summary

This topic contains 1,263 replies,
has 125 voices, and was last updated by VinzentVega
1 year ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/24/2019
Status: Active
Attachments: 470 files
Logo Logo
Loading...