İş Gereklilikleri
Si la valeur EMA actuelle est supérieure à la précédente, la tendance est considérée comme croissante (ema_current > ema_previous). Alternativement, si l'EMA actuelle est inférieure à la précédente, la tendance est considérée comme étant à la baisse (ema_current< ema_previous).
- Signal d'achat : la ligne MACD principale croise la ligne de signal vers le haut (macd_current>signal_current && macd_previous<signal_previous).
- Signal de vente : la ligne MACD principale croise la ligne de signal vers le bas (macd_current<signal_current && macd_previous>signal_previous). La figure ci-dessous montre les cas d'achat et de vente.
Les positions sont fermées aux signaux opposés : les positions d'achat sont fermées aux signaux de vente et les positions de vente sont fermées aux signaux d'achat.
Les positions sont ouvertes au prix du marché, lorsqu'une nouvelle barre émerge. L'Expert Advisor doit être testé en utilisant les prix Open, il n'est donc pas nécessaire d'ajouter des fonctions pour activer les opérations à l'intérieur de la barre.
Filtres supplémentaires pour ouvrir une position :
La valeur absolue de la ligne principale de MACD sera utilisée pour filtrer les signaux faibles : le signal n'est confirmé que si cette valeur est supérieure à open_level (en points). Les conditions de confirmation du signal sont les suivantes :
- Confirmation d'un signal d'achat : Abs(macd_current)>open_level
- Confirmation d'un signal de vente : macd_current>open_level
Filtres supplémentaires pour fermer une position :
La valeur absolue de la ligne principale de MACD sera également utilisée pour confirmer la fermeture de la position : le signal est confirmé si cette valeur est supérieure à close_level (en points). Les conditions de confirmation du signal de fermeture sont les suivantes :
- Confirmation de clôture des positions d'achat — macd_current>close_level
- Confirmation de clôture des positions de vente — Abs(macd_current)>close_level
Fermeture par Take Profit — lors de l'ouverture de la position, un niveau de Take Profit est défini à une distance fixe du prix d'ouverture, spécifié en points. La valeur est définie dans le paramètre d'entrée InpTakeProfit.
Gestion des postes
TrailngStop est utilisé pour protéger les profits. Stop Loss est défini si le profit en points dépasse la valeur dans le paramètre InpTrailingStop. Si le prix continue d'évoluer dans le sens du profit, le Stop Loss doit être suivi à la distance donnée. Le Stop Loss ne peut pas être déplacé dans le sens de la perte, c'est-à-dire que la valeur du Stop Loss ne peut pas être augmentée. Si aucun des ordres de protection (Take Profit ou Stop Loss) ne se déclenche, la position devrait être fermée par un signal inverse. Aucune autre méthode de sortie de position n'est disponible.