Aide probacktest Heikin-ashi

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243215 quote
    LoloDu
    Participant
    New

    Bonjour je suis nul en programmation.

    Je cherche à backtester cette stratégie:

    Achat si bougie heikin-ashi casse à la hausse le doji précédent

    Vente si cassure croisement à la baisse de la mm10 (close)

    stop loss sous le doji

    Pouvez vous m’aider svp ?

    #243355 quote
    Iván González
    Moderator
    Master

    Holà. Ici, vous avez un exemple pour travailler sur lui.

    //------------------------------------//
    // Heikin Ashi
    //------------------------------------//
    once haopen=open
    haclose=(open+close+high+low)/4
    if barindex> 0 then
    haopen=(haopen+haclose[1])/2
    endif
    halow=min(low,min(haclose,haopen))
    hahigh=max(high,max(haclose,haopen))
    //------------------------------------//
    // Doji
    //------------------------------------//
    irange=hahigh-halow
    body=abs(haclose-haopen)
    doji = body < irange*0.15
    //------------------------------------//
    // Setup
    //------------------------------------//
    slpip=10
    if not onmarket and doji then
    stoploss=halow-slpip*pipsize
    buy 1 contract at hahigh stop
    set stop price stoploss
    endif
    if onmarket and close crosses under average[10](close) then
    sell at market 
    endif
    graphonprice average[10](close) coloured("blue")
    graphonprice stoploss coloured("red")
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Aide probacktest Heikin-ashi


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
LoloDu @lolodu Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
1 year ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/30/2025
Status: Active
Attachments: No files
Logo Logo
Loading...