Saturday, November 19, 2022
HomeStockFinal Trailing Cease: Importing and Backtesting/Optimizing Sign Historical past - Different -...

Final Trailing Cease: Importing and Backtesting/Optimizing Sign Historical past – Different – 19 November 2022


As a result of Final Trailing Cease EA (UTS) is nice at managing one’s exits with 16 trailing cease strategies, it will also be extraordinarily helpful to use any of those strategies to a subscribed sign, as a way to improve it. 

To this finish, we constructed a sophisticated sign evaluation instrument inside UTS as a way to import, backtest and optimize any trailing cease configuration on historic sign knowledge, as long as it’s in csv format (ex: MQL5 or Myfxbook alerts).

This characteristic presents a extra goal technique to decide the perfect settings for the system you have an interest in enhancing together with your trailing cease.

You simply have to obtain the CSV sign historical past, drop it into the Tester > Recordsdata listing, and configure the inputs beneath. 



  • Report CSV information    You must point out the identify of the historical past file that you’ve got dropped into DataFolder > Tester > Recordsdata folder.
    For instance, Report CSV Recordsdata=HeroSP500.csv
  • Code Web page (Dropdown)   ANSI | UTF7 | UTF8

    Totally different signalhistory.csv could have downloaded in several csv codecs, and Code Web page permits you to appropriate for that peculiar csv format. For example, MQL5 signalhistory.csv is downloaded as UTF8, so it’s best to set Code Web page=UTF8

  • Knowledge separator  You must point out the first separator format of the signalname.csv file.

    For MQL5 signalhistory.csv, use ; (semi-colon), in order that Knowledge Separator=; 
    For Myfxbook signalhistory.csv, use . (interval), in order that Knowledge Separator=.

  • Hour adjustment   You must point out make the hourly adjustment in case your dealer is totally different from historical past file dealer.  For instance, if signalname.csv is derived from a dealer with GMT=1, and your dealer had a GMT=3, you point out Hour Adjustment=2
  • Date format  — You must point out the date format of the signalhistory.csv file.

    For MQL5 signalhistory.csv, use yyyy/mm/dd, in order that Date format=yyyy/mm/dd
    For Myfxbook signalhistory.csv, use mm/dd/yyyy, in order that Date format=mm/dd/yyyy

  • Date Separator   You must point out the date separator of the csv file.

    For MQL5 signalhistory.csv, use . (interval), in order that Date separator=.
    For Myfxbook signalhistory.csv, use / (ahead slash), in order that Date separator=/

  • Image to make use of  You must point out the image to carry out the take a look at upon. For instance, Image to make use of=SPX500

Steps to Import MQL5 Sign Historical past in Technique Tester. 

  1. On chosen MQL5 sign, click on on Commerce Historical past tab.  
  2. Scroll all the way down to the underside of the commerce historical past and left click on on Export to CSV: Historical past 
  3. SignalHistory.csv will obtain to your pc with one thing like 7digits.historical past.csv (ex.1731202.historical past.csv). You may need to proper click on and rename this file to signalname.csv (ex. HeroSP500.csv)
  4. Copy and paste the signalname.csv file into your DataFolder > Tester > Recordsdata folder. To get to this folder, click on on File > Open Knowledge Folder > Tester > Recordsdata


  5. In Technique Tester (View > Technique Tester or Ctr+R), load Final Trailing Cease EA and open up UTS inputs, and scroll all the way down to the final enter part.
  6. Report CSV Recordsdata enter, you point out the precise identify of the file (ex. Report CSV Recordsdata=HeroSP500.csv)
  7. Preserve CodePage=ANSI; 
  8. You DO NOT want to regulate the next defaults (as they already work with MQL5 alerts): 

    Knowledge Separator=; 
    Date Format=yyyy/mm/dd
    Date Separator=/

  9.  You possibly can regulate the hour adjustment to match your dealer GMT time, if totally different from file dealer. For instance, if signalname.csv is derived from a dealer with GMT=1, and your dealer had a GMT=3, you point out Hour Adjustment=2
  10. You possibly can point out Image to Use with the image you might be utilizing. In my case, I’ll implement Image to Use=SPX500
  11. You possibly can preserve or take away the defaults to Protect Unique SL/TP/Shut:

    Protect Unique SL=true
    Protect Unique TP=true
    Protect Unique Shut=true

Backtesting Sign Historical past

After configuring your signalhistory.csv file throughout the inputs of UTS in Technique Tester, it’s time to backtest the sign historical past with none trailing cease configurations. 

Listed below are the steps I take: 

1. Ensure you have downloaded sufficient 1 minute knowledge in your chosen image. 

For example, I’m desirous to backtest HeroSP500.csv on SPX500 (Darwinex SP500 image). For the reason that sign has commerce historical past from March-1-2022 until Nov-17-2022, I need to be certain I’ve a minimum of that a lot knowledge loaded in MT4. To take action, I take advantage of a instrument like Quant Knowledge Supervisor (free with adverts or $49 lifetime) to obtain 1 minute SP500 knowledge from Dukascopy. 

3. I then use Interval Converter.mq4 script to show that 1 minute knowledge into M5, M15, M30 and H1. 

4. I then put together Technique Tester settings.

Professional: Final Trailing Cease EA

Image: The image you need to take a look at for. In my case, it’s SPX500.

Mannequin: It’s suggested to make use of Mannequin=EveryTick. Nonetheless, it may be a lot sooner to check on Mode=Open Costs Provided that your technique makes use of open costs.

Use Date: Regulate date to the vary of the signalhistory.csv. In my case, it’s from March 1, 2022 to Nov 18, 2022. 

Interval: Your most well-liked timeframe interval. I want one thing low, like M1 or M5 or M15, to get extra correct outcomes. 

4. Essential. Disable the trailing stops of UTS by placing threshold out of attain, comparable to Threshold in Pips or ATR=1000. At this level, you need to get one backtest that matches your downloaded sign historical past, as a way to set up a baseline efficiency. When you’ve got the baseline efficiency, you may then put threshold again in attain and optimize totally different trailing stops within the Optimization stage. 

5. Run Technique Tester by urgent Begin Button. 

6. Confirm that the Outcomes kind of match your sign outcomes. Under is my Hero SP500 sign outcomes: 

In my case, the above outcomes roughly match my commerce sign historical past for the final 9 months for Hero SP500

As famous within the backtest, my sign’s baseline efficiency is: $781, 1.31 PF (176 trades), -435 DD, 4.44 Payoff.

This baseline efficiency is nice, however I need higher.

My purpose is to see if I can improve returns and cut back draw downs. 

With this baseline efficiency readily available, I can see if including an optimized trailing cease to my sign will improve its baseline efficiency. 

Optimizing Sign Historical past: Instance: Interval/Multiplier of Chandelier Exit and Threshold in ATR

Ideally, one ought to check out all 16 trailing stops of Final Trailing Cease EA to see which one improves the baseline efficiency. 

In my case, I’ve tried each one and found that Chandelier Exit has probably the most promise. 

After deciding on Trailing Cease Technique=Chandelier Exit, I’m going to optimize three parameters in two steps:

  1. Chandelier ATR Interval and Chandelier Multiplier.
  2. Threshold in ATR. 


The important thing to any optimization is to determine what parameters have probably the most influence. Understanding sufficient about Chandelier Exit, I feel that probably the most influence comes from Chandelier ATR Interval and Multiplier. I’ll preserve the defaults on Chandelier Vary (7), Shift (1), and Present Channel (true). 

I’ll optimize:

Chandelier ATR Interval from 10 to 40, in step of 5


Chandelier Multiplier from 3 to six, in step of 0.5

Once I click on on Optimize button, I get the next consequence: 

As you may see, I found that Chandelier Interval=30 and Chandelier ATR Multiplier=5.5 present one of the best consequence. 

If I apply this optimization consequence, my sign has elevated in efficiency from:


$781, 1.31 PF (176 trades), -435 DD, 4.44 Payoff. 


Greatest End result of Optimization#1: Chandelier Interval=30 and Chandelier ATR Exit=5.5:

$855, 1.45 (176 trades), -283 DD, 4.86 Payoff. 🚀🚀

Optimization#1 improves returns by 9.5% and DD by by 35%. 

I be certain to enter these newly optimized values into these two parameters. I then deselect the checkmarks for these two packing containers and proceed to the following optimization. 


The subsequent optimization I’ll conduct is on threshold.

Since I’m utilizing a CFD contract, I do know I’ll get the extra influence of out of Threshold in ATR than Threshold in pips. 

As soon as I point out Threshold in pips or ATR=ATR, I’ll optimize: 

Threshold in ATR from 0 to five, in step of 0.5

Once I click on Optimize, I get the next consequence: 

As you may see, one of the best final result is Threshold in ATR=2.

If I apply each optimizations, my sign has elevated in efficiency from: 


$781, 1.31 PF (176 trades), -435 DD, 4.44 Payoff. 


Greatest End result of Optimization#1: Chandelier Interval=30 and Chandelier ATR Exit=5.5:

$855, 1.45 (176 trades), -283 DD, 4.86 Payoff. 🚀🚀


Greatest End result of Optimization#2: Threshold in ATR=2.0:  

$1224, 1.59 (176 trades), -312 DD, 6.96 Payoff. 🚀🚀🚀

In comparison with baseline, optimization#2 (which builds on optimization#1) will increase return by 56% and reduces draw down by 28%. That is very promising. 

Right here is the leads to Technique Tester: 

Now I can apply Final Trailing Cease EA with the brand new .set file to my Darwinex MT4.

I am assured that elevated my EA/Sign by outfitting it with this optimized Chandelier Exit trailing cease facelift. 😃😃

Now you are able to do the identical for any of your subscribed alerts. 

✅ Hyperlinks
🌐 Final Trailing Cease EA >>

🌐 Final Trailing Cease EA >>

🌐 Final Trailing Cease EA Free (15-day Trial) >> Obtain

🌐 Final Trailing Cease EA Demo (restricted to AUDJPY, USDJPY, USDCAD, NZDUSD) >>

🌐 Final Trailing Cease EA MT5 Free (15-day Trial) >>  Obtain

You possibly can ask any questions in regards to the work of this system in non-public messages on mql5 web site or in Telegram or on my Telegram Group



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments