Re: Definition of insanity...looking for some guidance

Excuse my bluntness...

We are not selling anything.  We are not here to prove anything to anyone.  We are sharing ideas...

If it interests you and makes sense then go for it -- do your own testing and share what you find.  If, as you claim, it doesn't work then don't waste your time on it.  If I recall correctly you are the fellow who insists on backtesting with a minimum of 20 years historical data, so I doubt you've already tried this approach.  It's unique and different and only possible because of EA Studio.

I like sharing ideas and brain-storming, but when someone thinks I'm obligated to pull down my pants and bend over to get a closer look for my sharing to be of value, then I'm done...

geektrader wrote:

So guys, all theory aside (I have been there many years ago and it never achieved any steady growth), are there any demo/live accounts to look at where this approach is showing it's results over a few weeks?

Re: Definition of insanity...looking for some guidance

A bit more research / results, albeit from a short period of time... around when to set Max Open Trades to Zero (I'll call this Zero hour)

So I ran 300 bars, for each day, for the period 29th Aug to 16th Sept...15 days in total, with 3 x Mons, 3 x Tues, etc, so 15 Portfolios in total, with 50 EAs in each Portfolio.  Generation ran for 60 minutes each time.

Admittedly, I fixed SL and TP at 220 and 95 respectively, which I've since found is not the best approach - but, I didn't want to re-run everything...

I then modified the portfolio code so that I could then run M5 Optimisation, Balance Max, to see what the portfolio performance was if the Max Open Trades was set to 0 at specific hours after it was launched (Zero Hour).  Trades were then left to close automatically by the EA rules. 

All Portfolios were set to launch at 01:00 GMT (just after the spread change).  The code also ensured that no trades were opened prior to the launch date/time, despite what was set as the start date in MT5.

The last date I used was the 16th Sept, because it could still be closing trades naturally, if the Zero Hour was set at say 1 week after launch.

My hypothesis was that 15m CJ portfolios perform well for about 24 hours, and at that point, I should set it to not open any new trades.

Based on the result though, the optimal time, for my settings, appears to be around 44 hours.  At that point, I'd set Max Open to zero and let the open positions close normally.

The graphs show what happened to each portfolio when the Max Open Trades was set to zero at 1 hr, 2hr, 3hr etc after launch - all the way out to 120 hours (all charts), and 277 hours for each of the Weekday Charts. 

It might also suggest that you can pick different Zero hours for different days of the week.

* Weekday graphs under a new post.

Some notes:
1) Totally agree, this is only a short period of time.  15 tests in total. 
2) Launch time will no doubt change the results - I chose 01:00 because the EAS Generator requires a date back in time, and it sets it to midnight (or last bar) and so by the time I would have generated, and re-launched, it could be done within 1 hour, and then a few minutes to test it and launch it - hence 01:00.
3) I fixed TL & SL - not the best approach
4) Very specific to my settings and my broker data (IC Markets), which I can export up to the last previous bar.
5) Recommend you test this yourselves!

Post's attachments

1 - All Hours All Days.png 362.19 kb, file has never been downloaded. 

2 - Aggregate Percentage Wins.png 120.6 kb, 1 downloads since 2022-10-07 

You don't have the permssions to download the attachments of this post.

Re: Definition of insanity...looking for some guidance

Week day graphs attached below:

Post's attachments

3 - Mon.png 256.22 kb, file has never been downloaded. 

4 - Tues.png 284.64 kb, file has never been downloaded. 

5- Wed.png 259.02 kb, file has never been downloaded. 

6- Thurs.png 258.78 kb, file has never been downloaded. 

7 - Fri.png 279.36 kb, 1 downloads since 2022-10-07 

You don't have the permssions to download the attachments of this post.

79 (edited by sleytus 2022-10-07 09:35:02)

Re: Definition of insanity...looking for some guidance

timelleston -- I give you two thumbs up!!  Thanks for performing and sharing the results of your analysis...

One additional feature not to lose site of -- the extremely low DD.  The resultant strategies generated by EA Studio make it very safe to trade a portfolio EA with dozens of strategies.  I sometimes see the accumulated lotsize of all my open trades > 2 (which is a lot for my smallish account), but DD remains in-check.

80 (edited by timelleston 2022-10-07 09:49:36)

Re: Definition of insanity...looking for some guidance

Thanks Sleytus, and yes absolutely agree with you.

Re DD, I now use 2 filters on the 300+ strategies generated, before I add them to a portfolio.

Min Win/loss is 1
Max DD% is 1

Then sorted by SQN.

There’s probably better ones but they seem to be quite logical to me.

Results in MT5 not quite the same - usually sits around 80-90% win/loss rate overall but with very low DD - which is defo important.

Part of my code that I add into every portfolio strategy for backtesting is the count of simultaneous open positions. It’s generally around 30-40 during the 3 days it’s open, on a 50 strategy portfolio.

That’s an important number to monitor, especially as we leave old strategies running to gracefully close down open trades.

Re: Definition of insanity...looking for some guidance

timelleston -- a question about the 'All Hours All Days.png' chart.  The dashed-red line for Total doesn't look right to me.  Why does it drop so low, especially during the first 15 hours?  It looks like it drops lower than the sum of the individual colored lines, unless I'm not reading it correctly.

timelleston wrote:

A bit more research / results, albeit from a short period of time... around when to set Max Open Trades to Zero (I'll call this Zero hour)

82 (edited by timelleston 2022-10-08 00:56:01)

Re: Definition of insanity...looking for some guidance

sleytus wrote:

timelleston -- a question about the 'All Hours All Days.png' chart.  The dashed-red line for Total doesn't look right to me.  Why does it drop so low, especially during the first 15 hours?  It looks like it drops lower than the sum of the individual colored lines, unless I'm not reading it correctly.

Yes I thought that was a bit odd too.  It is correct though.  Bear in mind that colored line shows the total of what would have happened if you'd set Zero new positions at 5hr, 6hr, 7hr etc.  So in this case, if your workflow process sets the strategies to open no more trades 7 hours after launch (and all launches here were 01:30 gmt), this would have been the result across all your daily strategies.

The bulk of this loss is mostly caused by the strategies developed from the 8th-13th and launched on the 14th.  The market was slowly moving up during that period, so the strategies would have favoured for that, but then, a couple of hours after launch, it went completely the other way for a long time. 

Attached is the trade summary of that particular run.

Interestingly, there we no stopped out trades - they all closed "graciously".  Suggests that the SL was too far away?  Not sure.  It seemed to prefer to open long trades, probably due to the data during the generation period.  In a falling market, it would see plenty of buying opportunities, but in continuously falling market, those longs closed for losses - only 37% were profitable .  It was opening shorts which closed for profit - 80% of the time.  Average loss was 3x average profit during this period.  It also had 16 consecutive losses, which is by far the biggest I've seen.

The attached MT5 screenshot shows it quite nicely.  I've configured this one to use the 44 hours, or 176 bars of trading, and then set Max Orders to Zero.

Hindsight being 20/20, I ran it over 1000 bars and it actually turned around at the end... More of a random chance I think at that point though.

Post's attachments

8th-13th Sept.png 1.31 mb, file has never been downloaded. 

Daily History.png 570.95 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Definition of insanity...looking for some guidance

Hey Sleytus,

Around this concept I am wondering what the Ideal generator/process is?

It seems we are looking for a way of tuning to the immediate market and then switching EAs daily.

If our own time wasn’t an issue for example would switching EAs more regularly than a day be a benefit.

Presumably ideally we would have a real-time generator as you say that is generating based on recent bars only and revalidating what in current collection on recent bars only also. Then when have a full collection we put portfolio of 50 or so on with a set limit to only open trades for 24hrs and close gracefully after that period.

Then rinse and repeat for the next day.

Oh and also a way of checking the previous days performance also since that need to be good. Aka 3-5 trades and profit factor of >1.2?

I think I am going to try a couple ways of implementing this concept. Trying to stay true to the concept but also trying to automate as much as possible and reduce the manual effort I need to put in continually.

Just going to go straight to practicing on demo so I’ll share the results.

Also have you tried any demo trading with this yet timelleston or still fine tuning in mt5 backtester?

Re: Definition of insanity...looking for some guidance

sammjacks wrote:

Also have you tried any demo trading with this yet timelleston or still fine tuning in mt5 backtester?

I was running M15 in demo for a few days, but have just switched late last week to M30 as I think it actually performs a bit better (very early days to tell yet though) but I'm still doing a lot of testing re SL/TP and lot size.

Re: Definition of insanity...looking for some guidance

Yeah I guess we would want around a month of good demo results to feel confident that we are applying this concept suitably.

I hoping to get something on demo working and then I will try a few variants on other demo account also and see what is typically working best.

It’s a super interesting and logical concept, how to best implement it has lots of little questions for sure though. First test week starts on Monday evening for me. I am going to trade this Way Tuesday to Saturday as I think skipping Monday so that the most recent day of data was literally yesterday rather than pre weekend makes sense.

I’m going to do two things:

1 - Try to follow what is discussed as closely as possible, using a portfolio for CADJPY M15, CADJPY M30 and also GBPJPY M15, GBPJPY M30.

   Generate using 300 bars data (aiming for roughly 5 trades a day), test with tick data, put straight onto mock live and repeat every 24hrs

2 - Generate a few portfolios of 50 for each (so 150 EAs for each symbol period combination) based on most recent three weeks data and put on incubator demo.

    -Then use FXBlue to every 24hrs select the top 30 performers for the last day (needs 3+ trades abs pf >1.2) and then move those to mock live account.

For the second approach I would be looking to change to fresh porfolio EAs weekly as expected they would not last long but hopefully it gets enough stratgies through that perform well yesterday for trading today.

I think I can do this with a couple of hours work each evening and will aim to do for at least a couple of weeks before considering how I may need to tweak my settings.

Also just going to do using Dukascopy demo accounts btw

Re: Definition of insanity...looking for some guidance

Nice one @sammjacks.  I'll be interesting to see your results on this as well.

Re: Definition of insanity...looking for some guidance

Hi sammjacks...

1. Yep -- you got it...  smile

2. I would say "yes" for a few reasons:
    a. Since the goal is "near real-time" then the most recently generated portfolio EA should better align with current market conditions.  However, suppose everything was fully automated and you could add a portfolio EA every minute -- is that practical?  Probably not because the number of open trades would grow and the original EAs would still need to execute until all their trades were closed.  I have updated portfolio EAs during a single session and it works fine, but there would come a point when it becomes a logistical nightmare.
    b. As timelleston has shown, portfolio EAs have a profitable lifetime of about 44 hours.  The earlier in the lifetime then the better the performance.  This again relates to the goal of trading portfolio EAs in **near** real-time.
    c. The time at which a portfolio EA is launched may make a difference -- e.g. I waffle between shortly after Tokyo Open and just before London Open.  I see differences but I don't know if there is a consistent pattern of one being better than the other.  Market conditions change and it wouldn't be too surprising if they are more likely to change at certain times.

3. I'm trading it on a smallish Live account.  DD is amazingly low and it grows slowly -- so, after I attach the EA to a chart I don't monitor and don't lose sleep...



sammjacks wrote:

It seems we are looking for a way of tuning to the immediate market and then switching EAs daily.

If our own time wasn’t an issue for example would switching EAs more regularly than a day be a benefit.

Also have you tried any demo trading with this yet timelleston or still fine tuning in mt5 backtester?

Re: Definition of insanity...looking for some guidance

Yeah -- I did the same, but I'm going to return to M15.

I'm still focused on *current market*, but I now think that the data horizon needs to increase from 300 to 900 bars.   Ask me why...

> Why?

The reason is because everything is a trade-off.  Ask me what the trade-offs are...

> What are the trade-offs?

The benefit of the short data horizon is that it is very close to the current market.  The larger the data horizon then the further away from the current market.  This is why large data horizons of months or years fail when trading in real-time.

But the negative of short data horizon is there are not enough trades for the stats to be valid.  So, we end up filtering / sorting strategies based on invalid stats.

The solution is to go with a longer data horizon (e.g. 900 bars) and make sure only those strategies that trend upward at their extreme right-hand side get included in the portfolio.  In other words, we want the balance/equity curve to be trending upward as it transitions from IS into InMarket. 

The longer data horizon results in more trades and, hence, the statistics are a bit more accurate.

In the end it becomes a trade-off or balance between the short data horizon and just enough trades for stats to be meaningful.


timelleston wrote:

I was running M15 in demo for a few days, but have just switched late last week to M30 as I think it actually performs a bit better (very early days to tell yet though) but I'm still doing a lot of testing re SL/TP and lot size.

Re: Definition of insanity...looking for some guidance

Agree with everything you've said there Sleytus... trade volume is low for sure, even in the aggregate, so may not be statistically valid.  A few days ago I did try 500 bars M15 as well.

I'm playing around M30 still - 300 bars M30 is 600 bars M15 (equiv) so we'll actually be fairly close here.  I'm just working through a similar series of backtests...  A quick check on M30 and it generally takes around 12 bars for it to have traded around 100 times in total...a similar problem.



sleytus wrote:

Yeah -- I did the same, but I'm going to return to M15.

I'm still focused on *current market*, but I now think that the data horizon needs to increase from 300 to 900 bars.   Ask me why...

> Why?

The reason is because everything is a trade-off.  Ask me what the trade-offs are...

> What are the trade-offs?

The benefit of the short data horizon is that it is very close to the current market.  The larger the data horizon then the further away from the current market.  This is why large data horizons of months or years fail when trading in real-time.

But the negative of short data horizon is there are not enough trades for the stats to be valid.  So, we end up filtering / sorting strategies based on invalid stats.

The solution is to go with a longer data horizon (e.g. 900 bars) and make sure only those strategies that trend upward at their extreme right-hand side get included in the portfolio.  In other words, we want the balance/equity curve to be trending upward as it transitions from IS into InMarket. 

The longer data horizon results in more trades and, hence, the statistics are a bit more accurate.

In the end it becomes a trade-off or balance between the short data horizon and just enough trades for stats to be meaningful.

Re: Definition of insanity...looking for some guidance

Yes I agree that this logic is sound also. I have used 1500 bars for M15 and 750 bars for M30 for the second approach I am trailing with moving EAs for a week based on yesterday’s performance.

But definitely thinking that it’s hard to get enough trades so a little longer data for generation but a focus on how the equity curve is for the most recent day of that curve seems like a good idea.

I am targeting strategies that trade about 10x a day really since such a short generation window but it seems okay to make the window larger and aim for around 3-5 a day. I want at least 3 a day to that the stats for yesterdays performance are based on at least 3 trades and ideally 5.

91 (edited by sammjacks 2022-10-08 10:56:24)

Re: Definition of insanity...looking for some guidance

What are you guys using for your stop loss range typically. I’ve just gone with 10-100, my approach is that since the logic seems sound if I don’t get reasonable performance after a week or two then I’ll be looking to play with the generator settings and acceptance criteria and repeat the process.

I’ve just gone for pf >1.2, r/d > 1, rsquared>70 and trades between 30 and 50 over 300 bars.

Re: Definition of insanity...looking for some guidance

CADJPY / M30 / 300 bars

I'm not messing with SL/TP -- just going with the defaults.

For Acceptance Criteria:  Profit Per Day: $1.50

Search / Sorting: Balance Line Stability

I've noticed that Balance Line Stability selects strategies with higher number of trades -- which I think is good.  Also, though I'm not sure, I think it is more of a measurement than a statistic.  And for this approach and its minimal number of trades then I think that may be more suitable.  However, it still remains to be seen...


sammjacks wrote:

What are you guys using for your stop loss range typically. I’ve just gone with 10-100, my approach is that since the logic seems sound if I don’t get reasonable performance after a week or two then I’ll be looking to play with the generator settings and acceptance criteria and repeat the process.

I’ve just gone for pf >1.2, r/d > 1, rsquared>70 and trades between 30 and 50 over 300 bars.

Re: Definition of insanity...looking for some guidance

Hey Sleytus,

Will be starting some testing this week. Been doing a bit of backtesting today and been getting poor results generally so how I am applying this at the moment seems to be off.

Basically what I have done it run the generator with 1000 bars on CADJPY M15.

The setting so have used is:

Win/loss > 0.6
Min trades =40
Max trades =90
Min profit factor = 1.2
Min R/D = 1

Then when I have enough strategies in the collection I will rerun through the validator but just for the most recent 300 bars and then visually cull the strategies not ascending in the last 1/3 of the chart. 

Add the rest to portfolio and then test for the following day.

So far I’ve been very unprofitable.

Any pointers? It could be that I am not running the generator for long enough so working with collection that are too small? Pretty sure that is one of my issues of not the main one as I’m much under the portfolio size of 50 that has been discussed previous

Trying to get a balance of good acceptance criteria but not overly strict which will limit getting a decent amount of strategies after an hour or twos generation time.

It seems we want to ideally be able to complete this process as quickly as possible, 2-4hrs tops seems like a sensible window?

Re: Definition of insanity...looking for some guidance

Ah I never saw your last post before writing the above.

I like the simplicity in the acceptance criteria. I am also a fan of balance line stability for sorting.

I’ll try simplify toward that and maybe use the performance filters to tune once I have enough strategies showing good ascending curves over the recent period.

Re: Definition of insanity...looking for some guidance

I have some thoughts / comments -- in no particular order...

* I think timelleston's Back/Forward analysis has revealed something most interesting -- that is, strategies have a profitable lifetime of about 44 hours (probably due to changes in market conditions).  This has some important implications.  It also explains why regardless how noble one's effort is in creating EAs they rarely work out.  It's not that their algebra becomes stale but, rather, market conditions change.  If market conditions didn't change we'd all be gazillionaires. 

* It's nice to be able to put a number on this.  44 hours isn't carved in stone, but it gives us a ballpark figure to work with.  It implies that a strategy is most profitable within a day (or so) of its creation.  And from personal experience that feels about right.

* In my trading and testing not every day will be profitable -- as timelleston's Excel charts have shown.  In my experience a "bad" day is usually one where the portfolio EA treads water, and a "good" day is one where the profit grows gradually.  And this is fine -- it just means that we need patience and a consistent workflow (and smart money management).

* I've tried other pairs and timeframes -- CADJPY and M15 or M30 are definitely the best.  I don't know why that is, but it makes sense to me that different instruments would perform differently.  Related to this, I think the "window of profitability" is narrow.  Fiddling with EA Studio configuration settings could make the difference between success and failure -- that is, it could be you're losing money today but a slight change in configuration settings improves overall results.  For example, switching from AUDUSD to CADJPY makes all the difference -- who'd have thought?  Right Tim?  smile


sammjacks wrote:

Ah I never saw your last post before writing the above.

I like the simplicity in the acceptance criteria. I am also a fan of balance line stability for sorting.

I’ll try simplify toward that and maybe use the performance filters to tune once I have enough strategies showing good ascending curves over the recent period.

96 (edited by GD 2022-10-09 10:59:40)

Re: Definition of insanity...looking for some guidance

Ι had not success for CADJPY, EURUSD and USDJPY M15
But I think there are things still to be done and be answered

1. How to select the best EAs between the best 50 EAs i.e. use the first 10
2. What TF and number of bars is the best combination
3. What if we use smaller TF i.e. M1, M5 in 3 days period

a. I had better results using Number of Trades> 12 for M15
b. Is there a way to receive from EA Studio more than a number of indicators to trade? i.e. greater than 2?
Possibly in criteria?

Re: Definition of insanity...looking for some guidance

sleytus wrote:

For example, switching from AUDUSD to CADJPY makes all the difference -- who'd have thought?  Right Tim?  smile

Definitely made a huge difference...so this works on different pairs differently.

I've been trying (mostly unsuccessfully I might add) to limit the losses that can occur (observed on the original analysis).  I've been re-generating strategies for dates used in the original analysis, but using some of the different EAS settings, such as variable SL/TP (10-100) and Reverse, or, Reverse / Ignore. 

Reverse Position seems to make the most logical sense to me...if it's not going the right way, on an Opposite Entry Signal, reverse the position.  Keep your stop losses tight. 

I've also added some custom code to go to close all trades if the profit drops below a certain amount...thats worked quite well (in the long run).

Getting some fairly scattered results though to this approach.

Re: Definition of insanity...looking for some guidance

Hi GD, this is where taking the time to experiment and do tests comes in really I suppose right? I have many questions myself and have had loads of failed experiments so far it feels like results are getting closer to what I want at least.

As to EA studio having a greater than number of indicator options, the answer is no. It would be a very odd feature if it does since less indicators is always better. Although in this case perhaps there is an argument for more as we are trying to curve fit in away but in this case just increase the number available, it will find strategies with better statistics using more indicators I would say.

I am also thinking that this could be worth trying on M5.

I feel like I understand the concept but figuring out how best to exploit that edge I am currently uncertain of.

Liking what I am reading though and having fun experimenting :-)

That also makes sense that improved results come with more trades.

GD wrote:

Ι had not success for CADJPY, EURUSD and USDJPY M15
But I think there are things still to be done and be answered

1. How to select the best EAs between the best 50 EAs i.e. use the first 10
2. What TF and number of bars is the best combination
3. What if we use smaller TF i.e. M1, M5 in 3 days period

a. I had better results using Number of Trades> 12 for M15
b. Is there a way to receive from EA Studio more than a number of indicators to trade? i.e. greater than 2?
Possibly in criteria?

Re: Definition of insanity...looking for some guidance

As an aside, accepting that curve fitting is probably unavoidable, I thought I'd try to go the other way, and fully optimise and then normalise the results and see what happens...figuring that over the course of the next 96 bars or so, if the market stayed roughly the same, it would be ok.

So I generated a portfolio as per normal, and then downloaded the collection, re-uploaded it to validator, and tried to Normalise, and then Normalise and Optimise.

Both results were less successful from the generator only.  They failed further and they failed faster.

That sort of makes sense though.

Optimisation, in this instance, makes it fit the curve even tighter over the last 300 bars.  It makes it even twitchier. When you launch, the slightest change in the market makes it fail faster, as this new data/scenario has never been experienced by the previous data set - it was overfit. 

My result: It failed even faster.  And it failed further too.

So now I'm trying to find ways to not have any "optimisation" done by the platform - other than strategy selection/levels within the strategy.  Even down to the SL/TP.  I'm slightly nervous of getting it to figure out what SL/TP to use - as that seems to be fit for that particular portion of the curve.  In my mind, if I set a specific and fixed SL/TP (or no TP) then thats a variable removed.  But, I might be totally wrong too. 

But hey, thats the beauty of this platform hey?  The ability to test ideas in almost realtime...

And I'm not saying that Opt/Norm/WFO etc is not valuable, but we're attempting to capture that slice of time where we don't need to optimise.

Re: Definition of insanity...looking for some guidance

Hey guys,

What stands out are two keywords: "market change" and selection of strats. I want to address the latter - I think most agree that there is little correlation between excellent stat values versus its performance live.

And, as the saying goes, data loves to run its mouth (as long as one asks the right questions). And we have plenty of data, don't we? A crude example: a collection of generated 100 strats, which is then put on an unseen data set, and voila! we have only 33%-66% of strats left (profitable strats). So, a simplest of questions - what do those 33-66% have that the remaining don't? How to quantify it?