無料でロボットをダウンロードする方法を見る
Telegram上で私たちを見つけてください。
私たちのファンページに参加してください
私たちのファンページに参加してください
記事を気に入りましたか?MetaTrader 5ターミナルの中でそれを試してみてください。
MQL4 Implementation of onTrade Event Handler - MetaTrader 4のためのエキスパート
- ビュー:
- 1233
- 評価:
- パブリッシュ済み:
- 2024.04.29 09:33
- アップデート済み:
- 2024.04.29 11:12
- このコードに基づいたロボットまたはインジケーターが必要なら、フリーランスでご注文ください フリーランスに移動
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
Classic & Virtual Trailing for MT4
Virtual SL TP Pending with SL Trailing for Symbol ChartVirtual SL TP Pending with SL Trailing for Symbol Chart
RSI with channels
standart RSI with dynamic levels
Adaptive SMAimproved 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)