DAX M1 BOT ProRealTime à tester

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #218205 quote
    FXtonioFXtonio
    Participant
    Junior

    Bonjour à tous,

    ci dessous un algo qui affiche de très bon résultats en backtest, je viens de le lancer en reel, on verra ce que ça donne

    à utiliser sur le dax en M1 spread 2 backtest sur 100k bougies.

    ci dessous:

    //-------------------------------------------------------------------------
    // Code principal : ALgo + dax m1
    //-------------------------------------------------------------------------
    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    
    ONCE TK = 9.0
    ONCE BE = 13.0
    ONCE c = 14.0
    ONCE l = 3.0
    
    SET STOP %LOSS 0.5
    
    timeEnterBefore = time >= 083000
    timeEnterAfter = time <= 170000
    
    startBreakeven = BE //how much pips/points in gain to activate the breakeven function?
    PointsToKeep = TK //how much pips/points to keep in profit above of below our entry price when the breakeven is activated (beware of spread)
    
    //exit long order on red candle (if breakeven is set)
    if longonmarket and close<open and breakevenLevel>0 then
    sell at market
    endif
    
    //exit short order on green candle (if breakeven is set)
    if shortonmarket and close>open and breakevenLevel>0 then
    exitshort at market
    endif
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = ExponentialAverage[c](close)
    indicator2 = Average[l](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    indicator3 = RSI[5](close)
    c2 = (indicator3 > 50)
    indicator4 = MACD[5,8,9](close)
    c3 = (indicator4 > 0)
    
    IF c1 AND c2 AND c3 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    
    
    
    
    // Conditions pour ouvrir une position en vente à découvert
    indicator6 = ExponentialAverage[c](close)
    indicator7 = Average[l](close)
    c5 = (indicator6 CROSSES UNDER indicator7)
    indicator8 = RSI[5](close)
    c6 = (indicator8 < 50)
    indicator9 = MACD[5,8,9](close)
    c7 = (indicator9 < 0)
    
    IF c5 AND c6 AND c7 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
    
    //reset the breakevenLevel when no trade are on market
    IF NOT ONMARKET THEN
    breakevenLevel=0
    ENDIF
    // --- BUY SIDE ---
    //test if the price have moved favourably of "startBreakeven" points already
    IF LONGONMARKET AND close-tradeprice(1)>=startBreakeven*pipsize THEN
    //calculate the breakevenLevel
    breakevenLevel = tradeprice(1)+PointsToKeep*pipsize
    ENDIF
    //place the new stop orders on market at breakevenLevel
    IF breakevenLevel>0 THEN
    SELL AT breakevenLevel STOP
    ENDIF
    // --- end of BUY SIDE ---
    // --- SELL SIDE ---
    //test if the price have moved favourably of "startBreakeven" points already
    IF SHORTONMARKET AND tradeprice(1)-close>=startBreakeven*pipsize THEN
    //calculate the breakevenLevel
    breakevenLevel = tradeprice(1)-PointsToKeep*pipsize
    ENDIF
    //place the new stop orders on market at breakevenLevel
    IF breakevenLevel>0 THEN
    EXITSHORT AT breakevenLevel STOP
    ENDIF
    // --- end of SELL SIDE ---
    GraHal thanked this post
    ALGO-DAX-M1-BE.itf ProBacktest-ALGO-DAX-M1-BE-Allemagne-40-Cash-5E.png ProBacktest-ALGO-DAX-M1-BE-Allemagne-40-Cash-5E.png
    #218216 quote
    NicolasNicolas
    Keymaster
    Legend

    Merci pour le partage à nouveau, c’est sympa pour la communauté 🙂

    FXtonio thanked this post
    #218263 quote
    FXtonioFXtonio
    Participant
    Junior

    Pas de soucis 🙂

    Merci à vous pour l’aide fournis aux débutants comme moi, je ne sais pas encore bien coder mais je m’ameliores

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

DAX M1 BOT ProRealTime à tester


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
FXtonio @fxtonio Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by FXtonioFXtonio
3 years, 1 month ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 07/27/2023
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...