Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Rejoignez notre page de fans
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
- Vues:
- 2597
- Note:
- Publié:
- 2024.04.29 09:33
- Mise à jour:
- 2024.04.29 11:12
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
The code keeps track of orders' tickets in an CArrayInt. Monitoring the changes to the list of tickets in onTimer it triggers these event handlers:
//+------------------------------------------------------------------+ //| Event handler when stop loss is hit | //+------------------------------------------------------------------+ void onStopLoss(ulong ticket); //+------------------------------------------------------------------+ //| Event handler when take profit is hit | //+------------------------------------------------------------------+ void onTakeProfit(ulong ticket); //+------------------------------------------------------------------+ //| Event handler when a new order is opened | //+------------------------------------------------------------------+ void onTradeEntry(ulong ticket); //+------------------------------------------------------------------+ //| Event handler when an order is closed(removed) | //+------------------------------------------------------------------+ void onTradeExit(ulong ticket);
note: Not all features of the MQL5 onTradeTransaction handler has been implemented here. It is just a basic approach.
In the screenshot below you can see the output log for the EA:
![Classic and Virtual Trailing](https://c.mql5.com/i/code/expert.png)
Classic & Virtual Trailing for MT4
![Virtual SL TP Pending with SL Trailing for Symbol Chart](https://c.mql5.com/i/code/expert.png)
Virtual SL TP Pending with SL Trailing for Symbol Chart
![RSI with channels](https://c.mql5.com/i/code/indicator.png)
standart RSI with dynamic levels
![Adaptive SMA](https://c.mql5.com/i/code/indicator.png)
improved version of the standard Simple moving average indicator with a lower delay based on: https://www.mql5.com/en/code/30844 (author: https://www.mql5.com/en/users/mladen)