// AJOUTE CA EN HAUT AVEC LES INPUTS entrée double PerteMaxJour = 6,0 ; // Si -6$ la coupe pour la journée input int MaxTradesJour = 6; // Max 6 trades double PerteDuJour = 0; int TradesAujourdhui = 0; datetime DernierJour = 0; void OnTick() { // RÉINITIALISER UN CHAQUE NOUVEAU JOUR if(DernierJour != TimeDay(TimeCurrent())) { PerteDuJour = 0; TradesAujourdhui = 0; DernierJour = TimeDay(TimeCurrent()); } // DISJONCTEUR if(PerteDuJour <= -PerteMaxJour || TradesAujourdhui >= MaxTradesJour) return; si (PositionsTotal() > 0) retourner ; // ... le reste du code d'achat/vente ... // APRES UN TRADE FERME, TU CALCULES LA PERTE // Il faut ajouter la gestion de l'historique pour ça }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Simple EMA Cross EA with SL/TP and Magic Number:
A simple Expert Advisor based on the crossover of two EMAs (fast and slow), with configurable Stop Loss, Take Profit, lot size, and Magic Number.
Author: Edgar Alexis Benitez