Forex BLOG Sharing Best Practices & Hygiene on MT4 Trading

Golfer

Super Serious Forex Trader
I think that if they published on sites such as MQL5, and if MQL5 were completely neutral (is it though? Russian site with Russian moderators, many Russian EA devs, could there be a case of 'look after your own kind'?) then I would assume that people would crucify them on the message boards if they found out about the cheating through backtesting.

On standalone EA sites such as (f*r*xst*re.com) for instance, where you don't have a right of commentary, and where it's a 'sales only' kind of store, the problem can be more pronounced. Like I said above, I recall backtesting an EA that threw out the same results no matter what variables I changed; not sure where I got the EA from, but I remember commenting on this 'phenomenon' at that time to a forex trading buddy of mine. We were both left scratching our heads. Back then I didn't know about the 'hardcoding results' thing...
I don't think it's the case with this one in particular, but I do think...this and many other tricks get used.

The comments so far seem sweet and sour...will keep an eye on it 👍

Did you go for it? Or are you planning to buy/rent it?
 

whisquer

Serious Forex Trader
HI @whisquer

I want to share you one of the main issues I have with backtesting when it comes to grid trading, and especially with those 10-15-20 year backtests that traders seem to regard as "very important".
Some key points:
* You don't need to test decades back in order for a backtest to be useful
* A 2 - 3 year backtest can be more insightful than a 20 year old one
* Too much data, is overkill and very likely what you want to figure out will end up buried under all those "results"

An example:

The black circle is ~2014 and the blue ~2017

If I would start a backtest from 2014 to present on the black circle with primarily short settings, chances are that after a few runs and tweaks I have some stellar results! Yaaay, so now I'm ready to throw this one in the real arena!

WRONG.

You run the same test from the blue circle in 2017, and your backtests crack no matter what.

YIKES.

The first test produced great results because it had 3 years of favorable trend to build and build up capital, so when it reached that massive surge in 2017, it could cope with the losses, and survive into 2018.
The second test didn't have these 3 extra years of profit, so it gave you a more realistic view of how things would look like in real life.
This is a very simple example, but we make this mistake ALL THE TIME when we back test, and the only thing we do is build up a false sense of security. Hopefully you are lucky and you jump in at a black circle moment and don't have to pay the price....but very often we start at the blue circle...

View attachment 885

Another point that I feel traders botch EVERY time when they backtest is....AUTO LOT SETTINGS.
If you back test an EA that has this feature, DO NOT use auto lot for the first run!
You must first establish a baseline BEFORE you make applied backtesting.
Then...go crazy with AutoLoting :D

My two cents for your blog @whisquer ;)
Thank you, I love these types of posts, considered, educational and engaging! For the sake of further discussion, validation and, mainly to see if my own paradigm needs to be shifted :LOL: ....

"You don't need to test decades back in order for a backtest to be useful" and "* A 2 - 3 year backtest can be more insightful than a 20 year old one" - I'm not sure anyone can find decades of tick data today! But to your point, if you only backtested say the past 3 years, and if the trend during these 3 years was generally down, then you could potentially form a skewed, biased view of how the EA would perform based on the data simply because of the choice of "3 years" data. But had you extended it to say a 6-year test, then your findings around how the EA would have performed may be dramatically different from just purely sticking with a 3-year test. So the crucial question becomes - how long should I backtest? Where in the wave am I? I don't have the answers, but because I believe my chances might be better following the 'law of larger numbers' in general, so that's why I would seek as long a backtest as I could, to try and take into account the behaviour of the EA against that particular pair across as long a period as I can find solid tick data.

"* Too much data, is overkill and very likely what you want to figure out will end up buried under all those "results" - completely agree. Before I start backtesting anything, I first ask myself, how many trades would I mentally want to see this EA trade during such a period - is it overtrading, undertrading or what, versus my own expectations? As I've mentioned before, I may not want to use an EA, no matter how profitable, if It's only going to trade like 10 times in a year. Because I know myself, I am going to get impatient, I am going to think that I can use the available equity in a better way, etc. I also have an internal threshold around how much DD I can withstand for my own psychological good. The chart may look beautiful, but could I really handle a DD of 63%? Knowing myself, I couldn't, and I'd probably exit the trades way before then, resulting in heavy losses, so before I actually drill down to the nitty-grittys of the trades, I scan and scour the headline numbers - relative DD at X%, absolute DD at Y% ☑, 3000 trades in 17 years ☑, Profit Factor 2.12 ☑ and so on and so-forth. I then try to look at the chart to see where volume spikes up and DD builds. And then I drill down to those trades (e.g. Trades 950-969) and give a cold hard look at the numbers there to see if I could handle it (mentally). But it's true, if you have 3000 trades and are just going to study them all, your eyes are going to glaze over and you'll just be kidding yourself!

"If I would start a backtest from 2014 to present on the black circle with primarily short settings, chances are that after a few runs and tweaks I have some stellar results!" - that would be exactly how it would be. However ...! That's why I try to pick longer periods, law of larger numbers of years, so that I don't get a biased view (it's impossible, I know, because what's 17 years compared to 50 years, but I can't get 50 years of tick data anyway, so I make do with what I can get). My bigger fear is exactly that, if I happen to pick only a few years and that's where there happened to be a trend one direction or other, and I base my EA operations on that, well I think that that's actually more scary, at least to me. These 3 years may have been generally one directional, may have been relatively stable and calm, and may not have been the period where we had seen systemic shocks to the economy that might have seen over the last 17 years, for instance. Additionally, if you are going to tweak ("optimize") the EA to fit that same period of black circle through blue, then in a way, we're starting to engage in biasing the EA to perform based on your sample period, which may be a danger in and of itself. At least that's what I think (and again, I'm still learning and am willing to be guided otherwise ;)). I tend to backtest or set my EAs to trade both ways, without optimization at all (e.g. tweaking the EA to suit my date range). To try and cover off such risks.

Since we're talking about "grid trading" backtesting, in such instances I would be seeking instead understand for myself in BT, the following: for as long as I can get my hands on 99.9% reliable tick data to cover as many major events that may impact this pair as possible:
* What sort of equity would I need to have to see that, historically, given the behaviour of the fluctuations and characteristics of prices for this pair, I'm going to have sufficient 'cover' and 'breathing space' so that my account won't likely run into trouble.
* Does the DD reach a level which I can deal with mentally?
* Does it trade enough?
* Would the Profit Factor and Expected Payoff be aligned with my personal goals?
* and perhaps most importantly - IF IT ALL STILL GOES SOUTH DESPITE MY BEST EFFORTS AT TESTING, WHAT AM I GOING TO DO? DEFEND MY POSITION? OR BALE OUT?

"The first test produced great results because it had 3 years of favorable trend to build and build up capital, so when it reached that massive surge in 2017, it could cope with the losses, and survive into 2018. The second test didn't have these 3 extra years of profit, so it gave you a more realistic view of how things would look like in real life." - I think this might be true of some strategies, but I'm not sure if this would apply for grid strategies. The grid EAs that I have seen (except for Grid Fusion - where you can force a 're-open' after any basket closes) - they either take small scalp wins, or they build a grid, in relation to any given pair. But as soon as the grid can close in profit, it closes. And open trades go "back to zero", and so 'floating point' goes back to zero, and therefore DD goes to Zero. Until it rinses and repeats again based on the entry criteria or algorithm. To me, this suggests that whether the account had the benefit of "those 3 extra years of profit' or not, the more important thing to focus on is your risk settings versus your 'free margin' or equity in the account. (I also think this might be the #1 reason why people have blown their GK accounts - because they ran out of free margin). Because when you do your strategy testing, your initial balance can be anything (ie whether it had those extra 3 years or profit or not, you still start with any given number); but whether you'll blow the account or not really depends on whether your risk settings (such as growth in lot steps and amount risked) is commensurate with your free margin / equity at the material time, rather than whether you start with a higher or lower number for initial deposit (which by analogy, could have come with, in your example, 3 years of extra profit). I don't know if this makes sense, but am very happy to be corrected and guided otherwise.

tbc ... this forum has a character limit!
whisquer
 

whisquer

Serious Forex Trader
HI @whisquer

I want to share you one of the main issues I have with backtesting when it comes to grid trading, and especially with those 10-15-20 year backtests that traders seem to regard as "very important".
Some key points:
* You don't need to test decades back in order for a backtest to be useful
* A 2 - 3 year backtest can be more insightful than a 20 year old one
* Too much data, is overkill and very likely what you want to figure out will end up buried under all those "results"

An example:

The black circle is ~2014 and the blue ~2017

If I would start a backtest from 2014 to present on the black circle with primarily short settings, chances are that after a few runs and tweaks I have some stellar results! Yaaay, so now I'm ready to throw this one in the real arena!

WRONG.

You run the same test from the blue circle in 2017, and your backtests crack no matter what.

YIKES.

The first test produced great results because it had 3 years of favorable trend to build and build up capital, so when it reached that massive surge in 2017, it could cope with the losses, and survive into 2018.
The second test didn't have these 3 extra years of profit, so it gave you a more realistic view of how things would look like in real life.
This is a very simple example, but we make this mistake ALL THE TIME when we back test, and the only thing we do is build up a false sense of security. Hopefully you are lucky and you jump in at a black circle moment and don't have to pay the price....but very often we start at the blue circle...

View attachment 885

Another point that I feel traders botch EVERY time when they backtest is....AUTO LOT SETTINGS.
If you back test an EA that has this feature, DO NOT use auto lot for the first run!
You must first establish a baseline BEFORE you make applied backtesting.
Then...go crazy with AutoLoting :D

My two cents for your blog @whisquer ;)
Continuing from my last post ,...

"Hopefully you are lucky and you jump in at a black circle moment and don't have to pay the price....but very often we start at the blue circle..." - very true, but I'm still trying to figure out if this is mainly for those account balance charts that aren't smooth growth like grid account balance charts tend to be. I remember well using Wim's "Advanced Scalper" EA. It had incredible growth in backtesting. But it was a win 10 trades lose 3 trades kind of account balance chart. Net-net up a lot. The problem would be in real life, I would enter into the trade, and be on the 'losing 3 trades' run - not paper loss mind you, but actual real losses, and these were comparitively to the wins, large. And then maybe I see a 4th loss in a row, and then I think, I'm outta here. But with Grid trading, I don't see these kinds of actual losses; instead I see DDs build up from time to time, but that's what my BTs are for, to identify what kind of DDs are likely to buid up, as they have over the test of time (as long as I can find good 99.9% data), and to strengthen my balls resolve not to flake in the face of buiding DD. Because such DD is expected and has been seen over the test of time.

On the last point around Autolot, absolutely, all EAs must be tested not just on Autolot but also Fixed Lot, to see if it'll flake.

Long post, but I'll stop here, thank you for your contribution, and I'll be so delighted to hear back!!

Happy trading
whisquer
 
Last edited:

whisquer

Serious Forex Trader
Is this really free @whisquer ? Or do you get a free trial version...and then a few weeks later you have to pay for the full version?
Cisco Immunet is indeed really free : https://www.immunet.com/index - at least, I've never had to pay for it since first installing it.

I've since found some other solutions - for instance, I'm running Windows Security Essentials - which is a free antivirus software constantly updated by Microsoft, on my VPS. It is light and enough for my purposes. I'm not surfing or introducing extensively new code into my VPS anyway. I then do a once weekly full scan over the weekend to help reduce my likelihood of malware sitting in the VPS.

Microsoft Security Essentials is not something that was designed to be natively installed on Windows 2012 R2; and you will need to find a workaround to do so. But there is literature out there to guide you on how to retrofit MSFT SE into Windows 2012 Server R2 or 2016. Like here https://www.rootusers.com/how-to-install-microsoft-security-essentials-in-windows-server-2012-r2/

Proof that it can be done:
889

Or you could just install Cisco Immunet, which is designed to work with Windows Server 2012 R2 or 2016.

Happy Trading everyone
whisquer
 
Last edited:

whisquer

Serious Forex Trader
If what you want is to start up a shit storm in this forum...and your blog....write a piece on Fundamental Analysis.
Doesn't matter what you say...it will be a mess :)
@Grid Master @Golfer @Kylorean @AlphaOmega @Dyana @Keltica @Solar @Neon and all these fuckers will give it a go I'm sure....it'll be like throwing a chicken leg to a pack of rabid dogs....
Hey, even I'll join in the fun 😇
Oh Wait - looks like someone else had started on this - but not much traction yet...
 

whisquer

Serious Forex Trader
That's always a great question - like 'how do they make their money'?

Let me write to the boss and see how he responds.

If you go check out their site and their service (even on a demo account if you're feeling unsure), you'll see that it's sort of clunky but functional at some level. It's not truly 'commercial shlick' like many commercial businesses.

In this regard, like many other great ideas that have come before it in this internet-enabled world, very often people have an idea that might change the world, they put it into proof of concept and then actual production in a real environment, proving that it works, and then try to figure out how to make money. But before that, they want to build up a good user base. I suspect that they are currently not making money (not any real money anyway) and are still trying to find a model of doing that. But I'll ask anyway.
I've written to boss Peter over there and he's responded which was pretty much in line with what I had guessed above:

"I just started working on a freemium model where there would be a free service tier with limited trade proofing and a premium (paid) package that has unlimited number of trades, nice extra features and analytics, whatsoever.

You see there are a few active traders who dumps 1000s of trades on us per day and they consume the most of our resources, [and they should pay for this]. However, casual traders who trade only now-and-then, should fall into the free tier as I see tradeproofing as a community service that all traders should have free access to.

So you can tell on the forum that there's no catch, we really don't charge anything on tradeproofing. We plan to introduce a paid tier for those who proof more than -say- [a certain number of] trades per month, but it will be well communicated in advance. "

Some [editing] by me above, so that he can maintain flexiblity and not be held to any numbers of figures while he figures out the business model that will work for him. But you get the gist - it's indeed currently free, and they are working to find a way to make it paid for and sustainable.

whisquer
 

CupofJoe

Currently attending Forex kindergarden
Cisco Immunet is indeed really free : https://www.immunet.com/index - at least, I've never had to pay for it since first installing it.

I've since found some other solutions - for instance, I'm running Windows Security Essentials - which is a free antivirus software constantly updated by Microsoft, on my VPS. It is light and enough for my purposes. I'm not surfing or introducing extensively new code into my VPS anyway. I then do a once weekly full scan over the weekend to help reduce my likelihood of malware sitting in the VPS.

Microsoft Security Essentials is not something that was designed to be natively installed on Windows 2012 R2; and you will need to find a workaround to do so. But there is literature out there to guide you on how to retrofit MSFT SE into Windows 2012 Server R2 or 2016. Like here https://www.rootusers.com/how-to-install-microsoft-security-essentials-in-windows-server-2012-r2/

Proof that it can be done:
View attachment 889

Or you could just install Cisco Immunet, which is designed to work with Windows Server 2012 R2 or 2016.

Happy Trading everyone
whisquer
Thanks for this tip @whisquer (y)
I will give it a try and let you know :)
 

Rainy day

Currently attending Forex kindergarden
Cisco Immunet is indeed really free : https://www.immunet.com/index - at least, I've never had to pay for it since first installing it.

I've since found some other solutions - for instance, I'm running Windows Security Essentials - which is a free antivirus software constantly updated by Microsoft, on my VPS. It is light and enough for my purposes. I'm not surfing or introducing extensively new code into my VPS anyway. I then do a once weekly full scan over the weekend to help reduce my likelihood of malware sitting in the VPS.

Microsoft Security Essentials is not something that was designed to be natively installed on Windows 2012 R2; and you will need to find a workaround to do so. But there is literature out there to guide you on how to retrofit MSFT SE into Windows 2012 Server R2 or 2016. Like here https://www.rootusers.com/how-to-install-microsoft-security-essentials-in-windows-server-2012-r2/

Proof that it can be done:
View attachment 889

Or you could just install Cisco Immunet, which is designed to work with Windows Server 2012 R2 or 2016.

Happy Trading everyone
whisquer
Many thanks @whisquer I had no idea Cisco gave ANYTHING away for free!!
Thanks for showing me I was wrong :D(y)
 

Rainy day

Currently attending Forex kindergarden
I've written to boss Peter over there and he's responded which was pretty much in line with what I had guessed above:

"I just started working on a freemium model where there would be a free service tier with limited trade proofing and a premium (paid) package that has unlimited number of trades, nice extra features and analytics, whatsoever.

You see there are a few active traders who dumps 1000s of trades on us per day and they consume the most of our resources, [and they should pay for this]. However, casual traders who trade only now-and-then, should fall into the free tier as I see tradeproofing as a community service that all traders should have free access to.

So you can tell on the forum that there's no catch, we really don't charge anything on tradeproofing. We plan to introduce a paid tier for those who proof more than -say- [a certain number of] trades per month, but it will be well communicated in advance. "

Some [editing] by me above, so that he can maintain flexiblity and not be held to any numbers of figures while he figures out the business model that will work for him. But you get the gist - it's indeed currently free, and they are working to find a way to make it paid for and sustainable.

whisquer
Many thanks for checking up with them @whisquer (y)
I will give a try right away!
 

Splash

Forex Apprentice
Thank you, I love these types of posts, considered, educational and engaging! For the sake of further discussion, validation and, mainly to see if my own paradigm needs to be shifted :LOL: ....

"You don't need to test decades back in order for a backtest to be useful" and "* A 2 - 3 year backtest can be more insightful than a 20 year old one" - I'm not sure anyone can find decades of tick data today! But to your point, if you only backtested say the past 3 years, and if the trend during these 3 years was generally down, then you could potentially form a skewed, biased view of how the EA would perform based on the data simply because of the choice of "3 years" data. But had you extended it to say a 6-year test, then your findings around how the EA would have performed may be dramatically different from just purely sticking with a 3-year test. So the crucial question becomes - how long should I backtest? Where in the wave am I? I don't have the answers, but because I believe my chances might be better following the 'law of larger numbers' in general, so that's why I would seek as long a backtest as I could, to try and take into account the behaviour of the EA against that particular pair across as long a period as I can find solid tick data.

"* Too much data, is overkill and very likely what you want to figure out will end up buried under all those "results" - completely agree. Before I start backtesting anything, I first ask myself, how many trades would I mentally want to see this EA trade during such a period - is it overtrading, undertrading or what, versus my own expectations? As I've mentioned before, I may not want to use an EA, no matter how profitable, if It's only going to trade like 10 times in a year. Because I know myself, I am going to get impatient, I am going to think that I can use the available equity in a better way, etc. I also have an internal threshold around how much DD I can withstand for my own psychological good. The chart may look beautiful, but could I really handle a DD of 63%? Knowing myself, I couldn't, and I'd probably exit the trades way before then, resulting in heavy losses, so before I actually drill down to the nitty-grittys of the trades, I scan and scour the headline numbers - relative DD at X%, absolute DD at Y% ☑, 3000 trades in 17 years ☑, Profit Factor 2.12 ☑ and so on and so-forth. I then try to look at the chart to see where volume spikes up and DD builds. And then I drill down to those trades (e.g. Trades 950-969) and give a cold hard look at the numbers there to see if I could handle it (mentally). But it's true, if you have 3000 trades and are just going to study them all, your eyes are going to glaze over and you'll just be kidding yourself!

"If I would start a backtest from 2014 to present on the black circle with primarily short settings, chances are that after a few runs and tweaks I have some stellar results!" - that would be exactly how it would be. However ...! That's why I try to pick longer periods, law of larger numbers of years, so that I don't get a biased view (it's impossible, I know, because what's 17 years compared to 50 years, but I can't get 50 years of tick data anyway, so I make do with what I can get). My bigger fear is exactly that, if I happen to pick only a few years and that's where there happened to be a trend one direction or other, and I base my EA operations on that, well I think that that's actually more scary, at least to me. These 3 years may have been generally one directional, may have been relatively stable and calm, and may not have been the period where we had seen systemic shocks to the economy that might have seen over the last 17 years, for instance. Additionally, if you are going to tweak ("optimize") the EA to fit that same period of black circle through blue, then in a way, we're starting to engage in biasing the EA to perform based on your sample period, which may be a danger in and of itself. At least that's what I think (and again, I'm still learning and am willing to be guided otherwise ;)). I tend to backtest or set my EAs to trade both ways, without optimization at all (e.g. tweaking the EA to suit my date range). To try and cover off such risks.

Since we're talking about "grid trading" backtesting, in such instances I would be seeking instead understand for myself in BT, the following: for as long as I can get my hands on 99.9% reliable tick data to cover as many major events that may impact this pair as possible:
* What sort of equity would I need to have to see that, historically, given the behaviour of the fluctuations and characteristics of prices for this pair, I'm going to have sufficient 'cover' and 'breathing space' so that my account won't likely run into trouble.
* Does the DD reach a level which I can deal with mentally?
* Does it trade enough?
* Would the Profit Factor and Expected Payoff be aligned with my personal goals?
* and perhaps most importantly - IF IT ALL STILL GOES SOUTH DESPITE MY BEST EFFORTS AT TESTING, WHAT AM I GOING TO DO? DEFEND MY POSITION? OR BALE OUT?

"The first test produced great results because it had 3 years of favorable trend to build and build up capital, so when it reached that massive surge in 2017, it could cope with the losses, and survive into 2018. The second test didn't have these 3 extra years of profit, so it gave you a more realistic view of how things would look like in real life." - I think this might be true of some strategies, but I'm not sure if this would apply for grid strategies. The grid EAs that I have seen (except for Grid Fusion - where you can force a 're-open' after any basket closes) - they either take small scalp wins, or they build a grid, in relation to any given pair. But as soon as the grid can close in profit, it closes. And open trades go "back to zero", and so 'floating point' goes back to zero, and therefore DD goes to Zero. Until it rinses and repeats again based on the entry criteria or algorithm. To me, this suggests that whether the account had the benefit of "those 3 extra years of profit' or not, the more important thing to focus on is your risk settings versus your 'free margin' or equity in the account. (I also think this might be the #1 reason why people have blown their GK accounts - because they ran out of free margin). Because when you do your strategy testing, your initial balance can be anything (ie whether it had those extra 3 years or profit or not, you still start with any given number); but whether you'll blow the account or not really depends on whether your risk settings (such as growth in lot steps and amount risked) is commensurate with your free margin / equity at the material time, rather than whether you start with a higher or lower number for initial deposit (which by analogy, could have come with, in your example, 3 years of extra profit). I don't know if this makes sense, but am very happy to be corrected and guided otherwise.

tbc ... this forum has a character limit!
whisquer
Love this exchange guys @whisquer @Solar 🤩 Learning a lot👍!
 
Top