Stratégie sto+rsi+MM

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #96074 quote
    MontiL
    Participant
    Junior

    Bonjour,

    Voilà l’idée de la stratégie:

    Un achat est déclenché lorsque le sto est > 50, que le rsi est < 30 et qu’une bougie traverse à la hausse une MM au max 5 bougies après que le sto et rsi soient validés.

    Une vente est déclenchée lorsque le sto est < 50, que le rsi est > 70 et qu’une bougie traverse à la baisse une MM au max 5 bougies après que le sto et rsi soient validés.

    Rien de bien méchant donc, pourtant lorsque je backtest, le système ne fait pas les achats et les ventes au bon endroit.

    Quelqu’un y verrait plus clair? Merci !

    DEFPARAM CumulateOrders = TRUE
    DEFPARAM FlatBefore = 090000
    DEFPARAM FlatAfter = 173000
    EndTime = 173000
    
    Indicator1= Stochastic [a,b](Close)
    Indicator2=ExponentialAverage[c](Close)
    Indicator3=RSI[d](Close)
    
    // Conditions pour ouvrir une position acheteuse
    IF NOT LongOnMarket AND Indicator1 > 50 AND Indicator3 < 30 THEN
    bar1=barindex
    ENDIF
    
    IF Close CROSSES OVER Indicator2 and barindex-bar1<5 THEN
    Buy 1 CONTRACTS AT MARKET
    ENDIF
    
    // Conditions pour fermer une position acheteuse
    If LongOnMarket AND time > EndTime THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    IF NOT ShortOnMarket AND Indicator1 < 50 AND Indicator3 > 70THEN
    bar1=barindex
    ENDIF
    
    IF Close CROSSES UNDER Indicator2 and barindex-bar1<5 THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    ENDIF
    
    // Conditions pour fermer une position en vente à découvert
    IF ShortOnMarket AND time > EndTime THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops et objectifs : entrez vos stops et vos objectifs ici
    SET STOP LOSS 10
    SET TARGET PROFIT 10
    #96076 quote
    swapping
    Participant
    Master
    DEFPARAM CumulateOrders = TRUE
    DEFPARAM FlatBefore = 090000
    DEFPARAM FlatAfter = 173000
    EndTime = 173000
    
    Indicator1= Stochastic [a,b](Close)
    Indicator2=ExponentialAverage[c](Close)
    Indicator3=RSI[d](Close)
    
    // Conditions pour ouvrir une position acheteuse
    IF NOT LongOnMarket AND Indicator1 > 50 AND Indicator3 < 30 THEN
    bar1=barindex
    ENDIF
    
    IF Close CROSSES OVER Indicator2 and barindex-bar1<5 THEN
    Buy 1 CONTRACTS AT MARKET
    ENDIF
    
    // Conditions pour fermer une position acheteuse
    If LongOnMarket AND time > EndTime THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    IF NOT ShortOnMarket AND Indicator1 < 50 AND Indicator3 > 70THEN
    bar1=barindex
    ENDIF
    
    IF Close CROSSES UNDER Indicator2 and barindex-bar1<5 THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    ENDIF
    
    // Conditions pour fermer une position en vente à découvert
    IF ShortOnMarket AND time > EndTime THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops et objectifs : entrez vos stops et vos objectifs ici
    SET STOP LOSS 10
    SET TARGET PROFIT 10

    Bonjour MontiL

    N’oubliez pas d’utiliser le bouton “Insert PRT code” afin d’avoir un formatage correct du code que vous voulez insérer et obtenir une meilleure lisibilité pour ceux qui veulent vous aider 😉

    #96085 quote
    Nicolas
    Keymaster
    Master

    Est-ce que les variables a,b,c et d de tes indicateurs correspondent bien à celles utilisées sur ton graphique ?

    #96087 quote
    MontiL
    Participant
    Junior

    “Insert PRT code” –> merci du rappel Swapping !

    Nicolas:

    Merci pour la réponse si rapide. Il me semble que oui. Le problème se posait plutôt au niveau de l’achat-vente. Le programme achetait quand je voulais vendre et inversement.

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

Stratégie sto+rsi+MM


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
MontiL @montil Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by MontiL
6 years, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 04/11/2019
Status: Active
Attachments: No files
Logo Logo
Loading...