Money management et stop suiveur sur Forex

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #142901 quote
    Fantasio2020
    Participant
    Senior

    Bonjour la communauté,

    j’utilise depuis quelques temps des codes empruntés sur le forum pour mes stratégies:

    //Gestion des Profits
    levier = 2
    capital = 500 + (strategyprofit*3/8)
    n = (capital / Close) * levier
    
    //Stop Loss & Trailing function
    Set stop $loss capital*levier*2/100
    Set Target $Profit capital*levier*5/100
    trailingstart = 5
    trailingstep = 1
    
    //reset the stoploss value
    If not onmarket then
    newSL = 0
    Endif
    
    //manage long positions
    If Longonmarket Then
    If newSL = 0 and close-tradeprice(1) > trailingstart*pipsize then
    newSL = tradeprice(1) + trailingstep*pipsize
    Endif
    If newSL <> 0 and close-newSL > trailingstep*pipsize then
    newSL = newSL + trailingstep*pipsize
    Endif
    Endif
    
    //manage short positions
    If ShortonMarket then
    If newSL = 0 and tradeprice(1)-close > trailingstart*pipsize Then
    newSL = tradeprice(1) - trailingstep*pipsize
    Endif
    If newSL <> 0 and newSL-close > trailingstep*pipsize Then
    newSL = newSL - trailingstep*pipsize
    Endif
    Endif
    
    //stop order to exit the positions
    If newSL <> 0 Then
    Sell at newSL Stop
    Exitshort at newSL Stop
    Endif

    Cela fonctionne très bien pour les indecs (dow, dax, nasdaq…)

    mais quand j’essaie sur le forex…..Boummm

    Je dois louper un truc mais je vois pas trop quoi…. du fait du forex il doit y avoir une astuce sur la taille des pips mais je trouve pas!

    Quelqu’un pour m’eclairer?

     

    Slts

    bertrandpinoy thanked this post
    Forex-Boummm.png Forex-Boummm.png Forex-Boummm-1.png Forex-Boummm-1.png Forex-Boummm-2.png Forex-Boummm-2.png
    #143022 quote
    Nicolas
    Keymaster
    Master

    La stratégie postée n’est pas complète, pas de prises de positions, as-tu GRAPHé la taille de n ?

    Sur le DAX, si tu divises ton capital par sa valeur (dans les 13.000), alors en effet tu auras une taille de position petite et le backtest s’adaptera: 500/13000*2 = 0.07 (la taille minimale étant de 1), alors que sur l’EURUSD, ce serait pas pareil :

    500 / 1.19 * 2 = 840 lots …

    Un peu excessif comme taille de position je pense 🙄

    #143104 quote
    Fantasio2020
    Participant
    Senior

    Slt et merci,

     

    en effet il y avait une petite erreur dans le money managment!

    C’est réglé  :p

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

Money management et stop suiveur sur Forex


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Fantasio2020
5 years, 6 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 08/29/2020
Status: Active
Attachments: 3 files
Logo Logo
Loading...