Short Trend Reversal 外汇EA

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

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

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

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

有需要,请联系站长!

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

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

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

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


With this EA you can build a good profitable system. The EA was created to test signals for the main EA that I am creating, but when I saw the backtest results, I thought I would add a few lines and put it on the market. After adding over 1000 lines of code, here it is. It works on any classic currency pair /you just need to find the right settings/. It probably works on many other instruments, but you need to choose the right TakeProfit, StopLoss, min_dist, pending_dist. If you want to test other instruments, it is best to do large tests from methodology 2 with your own TP. Sample settings for GOLD, SILVER, OIL, SP500, DAX40 can be found in the params.txt file.

For EUR,USD,GBP,CHF,CAD,JPY,AUD,NZD between them crosses, pips calculated as for a 4-digit broker (inside multiplied by 10). The rest of the instruments as your broker has.

EA has the following settings coded Built-in settings: SAFE, MODERATE, AGGRESIVE, start by checking what it looks like with your broker /it was backtested with Vantage on an STP account in 2023/.

I recommend turning on several charts of one currency, for example several crosses EUR or USD or … or mixed, and several TFs, this way you will obtain indirect hedging.

During the sale of promotional copies, will expand EA to multitimeframe and upgrade to version 2.0

Important: This EA should have StopLoss set to 0 while running. StopLoss is used to create a statistics file in the tester folder during backtests. There you will see useful information about the amounts of losing and profitable trades. Pips in this EA are calculated as for 4-digit-broker /FOR CURRENCIES ONLY/. The rest of the instruments as your broker has.

======================================== LIVE SIGNALS ========================================

EUR basket: https://www.mql5.com/en/signals/2218143

GBP basket: https://www.mql5.com/en/signals/2225924

=============================================================================================

Rules and my backtest methodology:

  1. Disable the genetic algorithm if you want to use my statistics file
  2. Open prices only testing model. There is no need to test every tick because EA takes a position only on new candles
  3. set mine TP first: M15 TP=15, M30: TP =20, H1: TP=30, H4: TP=40 /change if you want, but try mine/

                                                                                                                                                                                     

method 1 /detailed/

step one:

  • EA default values: and disable the final_optimization parameter (enabled, averages trades, and we don’t want that now), Built-in settings set to user
  • BarsRange1: range 5-50 with step 5 (pattern higher lower trades)
  • BarsRange2: range 3-15 with step 2 (pattern higher lower trades)
  • TakeProfit as above (unless you prefer otherwise, I recommend mine to start with)
  • StopLoss you accept (100,150,200 it depends on the symbol and is only used to count bad signals)

Run optimization with BarsRange1 and BarsRange2 selected. The results that the tester shows or does not show are not important. Important information is saved in the MT4/tester/files/ShortTrendReversal/*.txt file. The file is only created when StopLoss is greater than 0. Now open the created file. I recommend notepad++ for this because it reloads the file if it changes. Analyze the results.

step two:

  • narrow the ranges of BarsRange1 and 2
  • min_dist:       range 10-70 with step 10 /minimum distance from the previous order, 0 completely disables the limit/
  • pending_dist: range 10-70 with step 10 /pending order distance, 0 disables pending orders/
  • StopLoss set to 0
  • enable final_optimization

Run optimization. Now choose what suits you. Additionally, once you have your optimization results, you can set StopLoss as above call up the individual results. At this point /with StopLoss/ the result itself won’t matter, but you can see and compare the new statistics in the file (MT4/tester/files/ShortTrendReversal/*.txt). Statistics will be different than before and will certainly be very helpful in making decisions. You can save selected results to a file with external parameters (MQL4/files/ShortTrendReversal/params.txt). Details can be found in the file.

My rules when backtesting Built-in settings: SAFE,MODERATE,AGGRESIVE

SAFE:           BarsRange2 range 7-11
MODERATE:  BarsRange2 range 5-7,9
AGGRESIVE: BarsRange2 range 3-5,7
                                                                                                                                                                                     

method 2 /fast and simple/

Everything as above in one go.

  • EA default values
  • BarsRange1:   range 5-50 with step 5 /pattern higher lower trades/
  • BarsRange2:   range 3-15 with step 2 /pattern higher lower trades/
  • min_dist:       range 10-70 with step 10 /minimum distance from the previous order, 0 completely disables the limit/
  • pending_dist: range 10-70 with step 10 /pending order distance, 0 disables pending orders/
  • TakeProfit set my TP first: M15 TP=15, M30: TP =20, H1: TP=30, H4: TP=40
  • StopLoss set to 0
  • enable final_optimization

Run optimization. Now choose what suits you. Additionally, once you have your optimization results, you can set StopLoss as above and run individual results. Statistics in the file as above.

                                                                                                                                                                                     

While writing this description, I extended the pending_dist functionality and did not backtested it. When you set a negative value, the EA will set a buy stop order a few pips above the local high and sell stop a few pips below.

here is the formula:

BUY STOP at the highest high of the last 10 bars + ((-1)*pending_dist + spread)

SELL STOP at the lowest low of the last 10bars – ((-1)*pending_dist)

=======================================================================================================

Settings:

BarsRange1: main signal 1 /pattern higher lower trades/
BarsRange2: main signal 2 /pattern higher lower trades/
min_dist: minimum distance from the previous order, 0 completely disables the limit
pending_dist: distance of pending order, 0 disables pending orders, negative value: distance from local maximums and minimums for pending orders
TakeProfit: M15 TP=15, M30: TP =20, H1: TP=30, H4: TP=40
StopLoss: 100,150,200 /depends on the symbol/
final_optimization: enable/disable averaging
Built-in settings: user,SAFE,MODERATE,AGGRESIVE,ReadFromFile
TP,SL in %: calculation in % for other instruments than currencies
StartTrading: the beginning of trading, set Start and Stop to 0:00, trading is active all the time, set Start and Stop to 9:9, trading is inactive all the time
StopTrading: end of trade, Start and Stop disabled for backtests
MagicNumber: EA recognizes orders by number and _Period
Lots: trade volume
dynamic_lots:  each subsequent order will be increased modes: none,simple,fibo_sequence,martingale up to 10 trades. on chart you’ll see (N),(S),(F),(M)
UseRiskManager: you know, risk manager
EntryRisk: % of capital per trade for accounts with leverage>=100. the position size is always calculated as for an account with leverage = 100 (for secure)
GUI_enable: two graphical interface modes, simple GUI, also works in visual mode
UseSounds: on/off sounds
LogLvL: silent/MT4logs/alerts
ShowInitConfig: shows a window with parameters at startup

Built-in settings:                           user: all settings can be changed by the user for use or backtesting

SAFE,MODERATE,AGGRESIVE:         all parameters from the first section are permanently set:

  •     BarsRange1, BarsRange2, min_dist, pending_dist are saved in arrays
  •     TakeProfit: M15 TP=15, M30: TP =20, H1: TP=30, H4: TP=40
  •     StopLoss set to 0
  •     final_optimization enabled

ReadFromFile:    During the first launch, EA will create a params.txt file in the folder MQL4/files/ShortTrendReversal/ with a saved SAFE table as an example of use. After backtesting, you can save the parameters there and you don’t have to do anything else. EA will reload the file on the new D1 candle. You  can also restart MataTrader.

Due to the fact that importing external DLL libraries is prohibited, I moved the window resize to the indicator. Source code below.

https://www.mql5.com/en/code/48973

script that opens a set of charts:

#property copyright     "https://www.mql5.com/en/market/product/Short Trend Reversal"
#property link          "https://www.mql5.com/en/market/product/114909"
#property description   "script that opens a set of charts"
#property version       "1.00"
#property strict
#property show_inputs

#import "stdlib.ex4"
   string ErrorDescription(int error_code);
#import
#import "user32.dll"
   int  GetParent(int hWnd);
   void MoveWindow(int hWnd,int X,int Y,int nWidth,int nHeight,int bRepaint);
#import
#define INITIAL_PAIRS "EURUSD,GBPUSD,USDCHF,USDCAD,USDJPY,AUDUSD,NZDUSD,EURGBP,EURCHF,EURCAD,EURJPY,EURAUD,EURNZD,GBPCHF,GBPCAD,GBPJPY,GBPAUD,GBPNZD,CADCHF,CHFJPY,AUDCHF,NZDCHF,CADJPY,AUDCAD,NZDCAD,AUDJPY,NZDJPY,AUDNZD" 
string all_pairs[];

input string                  basket         = "EUR";
input ENUM_TIMEFRAMES         period         = PERIOD_H1;
input string                  inp_template   = "default.tpl";
input int                     Monitor        = 0;
extern int                    _X             = -5;
input int                     _Y             = -15;
input int                     Width          = 332;
input int                     Height         = 363;
input string                  prefix         = "";
input string                  suffix         = "";
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
void OnStart() {
   StringSplit(INITIAL_PAIRS,',',all_pairs);
   if(Monitor > 0) _X += 1920;
   for(char i=0; i<ArraySize(all_pairs); i++) {
      if(StringFind(all_pairs[i],basket) != -1) {
         long chart = ChartOpen(prefix+all_pairs[i]+suffix,period);
         ChartApplyTemplate(chart,"\\Files\\ShortTrendReversal\\"+inp_template);
         int parent = GetParent((int)ChartGetInteger(chart,CHART_WINDOW_HANDLE));
         MoveWindow(parent,_X,_Y,Width,Height,true);
         ObjectCreate(chart,"ShortTrendReversal",OBJ_LABEL,0,0,0);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_CORNER,CORNER_RIGHT_LOWER);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_XDISTANCE,30);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_YDISTANCE,15);
         ObjectSetString(chart,"ShortTrendReversal",OBJPROP_TEXT,basket);
         ObjectSetString(chart,"ShortTrendReversal",OBJPROP_FONT,"Arial Black");
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_FONTSIZE,7);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_ALIGN,ALIGN_CENTER);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_COLOR,clrGainsboro);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_BGCOLOR,clrNONE);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_BORDER_COLOR,clrNONE);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_SELECTABLE,false);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_HIDDEN,true);
         ObjectSetInteger(chart,"ShortTrendReversal",OBJPROP_READONLY,true);
         ChartRedraw(chart);
         _X+=274;Sleep(100);
      }
   }
}

图片[1]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
图片[2]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
图片[3]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
图片[4]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
图片[5]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站
图片[6]-Short Trend Reversal 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站

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