Mql5官网 Auto SL Simples 外汇EA

Mql5官网 Auto SL Simples 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
Mql5官网 Auto SL Simples 外汇EA
此内容为免费资源,请登录后查看
0积分
免费资源

如果免费资源下载的文件为TXT文档

请联系站长更新!站长微信:Lv596999  Telegram:@eapoj

“Mql5官网”板块的EA基本都有,大部分是无限制NODLL版,NODLL版本MT1420升级,大多数不可用!这些EA来源为国外花钱买过来的

有需要,请联系站长!

“EA测评”板块资源全部现有,看见不错的,可以联系站长看EA在确定是否收费

“无限制EA”板块,大部分免费,下载文件全部存在,都可以免费下载

站长硬盘EA太多,因大部分时间做交易,做风控,没太多时间更新下载地址,请谅解!

需要更新下载文件,请联系站长微信!国外朋友请联系Telegram。


It is designed to automatically set a stop loss for open trades in the MetaTrader 4 platform. Here is a breakdown of the important parts of the script:

  • The script uses input parameters to control its behavior. The AutoSLTP_AllSymbols parameter determines whether to track trades on all symbols or only the current symbol. The AutoSLTP_Type parameter specifies the type of orders to track: 1 for market orders, 2 for pending orders, or 3 for both. The AutoSLTP_StopLoss parameter sets the stop loss value in points.

  • The global variable g_LastCheckedBar keeps track of the last bar that was checked for trade modifications.

  • The SetStopLoss() function is used to set the stop loss for a trade. It checks if the trade already has a stop loss defined and if the trade is still open. It calculates the new stop loss value based on the open price and the AutoSLTP_StopLoss parameter. It then calls the OrderModify() function to modify the trade’s stop loss level.

  • The OnInit() function is the initialization function for the script. In this case, it simply returns INIT_SUCCEEDED .

  • The OnTick() function is called on every tick of the price feed. It checks if it needs to track trades on all bars or only the current bar. It then loops through all open orders using the OrdersTotal() and OrderSelect() functions. For each order, it checks if it should be tracked based on the symbol and order type criteria specified in the input parameters. If the order meets the criteria, it calls the SetStopLoss() function to set the stop loss.

Overall, this script allows for automatic management of stop losses for trades based on predefined parameters.

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
相关推荐