Ron,
Here is how i understand the strategy based on the the EA implementation:
- every day at midnigt (00:00), the EA "re-optimizes" itself;
- then it uses the resulting "trading style" (breakout or counter trend) for the entire day, until next midnight;
- "re-optimization" takes place over the past "BarStart" bars, and does this:
- each day at midnight, a first high/low range is determined over the "InitialRange" bars preceeding midnight; yellow vertical lines are drawn to show this initial range period;
- then, after midnight, this high/low range widens when price makes a higher high or a lower low;
- when price makes a higher high or a lower low, we test the outcome of a breakout trade and a counter-trend trade that would be sent at that time and price, and update win/loss counters for both styles;
- once we have covered the full "BarStart" period, we compare the win/loss results for breakout style and counter-trend style, and we select the best for the rest of the day, provided that the result ratio meets the expected inputs (WinPercent for instance).
There is an exception to the "midnight re-optimization rule": it optimizes immediately when you start the EA (it will not wait until midnight to estimate the first trading style).
If my interpretation is correct, then i have the following remarks/questions:
- the hi/lo range widens all day long and is reset only at midnight the next day;
meaning that the more we get into the day, the less we will be able to determine if market is moving to ranging type (and therefore take counter-trend trades rather than breakout trades ?)
If price starts retracing, then it may take very long before it breaks the other side.
Having a way to "refocus" the hi/lo range at regular intervals over the same day (instead of only once a day at midnight) would benefit, no ?
Perhaps a "ReOptimizeInterval" input could be interesting ?
Based on a duration rather than a number of bars to make it independent on the timeframe.
At the moment, we could say it's hard-coded at 24-hours interval.
- there is no way to tell the EA what trading hours we want to use, which would also be taken into account for the optimization process;
- on MONDAYS we have an issue: if i set the BarStart to be less than 2 days, say 300 bars on M1 chart (optimizing will take place only over the last 5 hours), then we don't get any trades on monday because the bars examined will be saturday and sunday bars, ending at 00:00 on monday morning.
At least this is what i observed in (visual) backtest.
If we set BarStart to be more than 2 days, then we still go over useless saturday and sunday bars.
I think we should exclude saturday and sunday from the examined bars.
(and from the bars used to determine the outcome of test trades also).
- "midnight" is estimated in local time.
Meaning that we will not have the same EA behaviour all over the planet, due to the hard-coded midnight trigger.
I hope i'm not completely mistaken here...
Sq.
Here is how i understand the strategy based on the the EA implementation:
- every day at midnigt (00:00), the EA "re-optimizes" itself;
- then it uses the resulting "trading style" (breakout or counter trend) for the entire day, until next midnight;
- "re-optimization" takes place over the past "BarStart" bars, and does this:
- each day at midnight, a first high/low range is determined over the "InitialRange" bars preceeding midnight; yellow vertical lines are drawn to show this initial range period;
- then, after midnight, this high/low range widens when price makes a higher high or a lower low;
- when price makes a higher high or a lower low, we test the outcome of a breakout trade and a counter-trend trade that would be sent at that time and price, and update win/loss counters for both styles;
- once we have covered the full "BarStart" period, we compare the win/loss results for breakout style and counter-trend style, and we select the best for the rest of the day, provided that the result ratio meets the expected inputs (WinPercent for instance).
There is an exception to the "midnight re-optimization rule": it optimizes immediately when you start the EA (it will not wait until midnight to estimate the first trading style).
If my interpretation is correct, then i have the following remarks/questions:
- the hi/lo range widens all day long and is reset only at midnight the next day;
meaning that the more we get into the day, the less we will be able to determine if market is moving to ranging type (and therefore take counter-trend trades rather than breakout trades ?)
If price starts retracing, then it may take very long before it breaks the other side.
Having a way to "refocus" the hi/lo range at regular intervals over the same day (instead of only once a day at midnight) would benefit, no ?
Perhaps a "ReOptimizeInterval" input could be interesting ?
Based on a duration rather than a number of bars to make it independent on the timeframe.
At the moment, we could say it's hard-coded at 24-hours interval.
- there is no way to tell the EA what trading hours we want to use, which would also be taken into account for the optimization process;
- on MONDAYS we have an issue: if i set the BarStart to be less than 2 days, say 300 bars on M1 chart (optimizing will take place only over the last 5 hours), then we don't get any trades on monday because the bars examined will be saturday and sunday bars, ending at 00:00 on monday morning.
At least this is what i observed in (visual) backtest.
If we set BarStart to be more than 2 days, then we still go over useless saturday and sunday bars.
I think we should exclude saturday and sunday from the examined bars.
(and from the bars used to determine the outcome of test trades also).
- "midnight" is estimated in local time.
Meaning that we will not have the same EA behaviour all over the planet, due to the hard-coded midnight trigger.
I hope i'm not completely mistaken here...
Sq.