• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 2:51am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 2:51am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

DOS. Daily Open Strategy. Easy To Trade, Simple To Win (EA..soon) 1,077 replies

Let's Improved this Strategy, Grid based System 1 reply

Improved Rsi Needs Code 5 replies

Creating a Simple Daily Open Price Strategy EA 1 reply

Improved Rsi Needs Code 1 reply

  • Trading Journals
  • /
  • Reply to Thread
  • Subscribe
  • 19
Attachments: DOSI: Daily Open Strategy Improved
Exit Attachments

DOSI: Daily Open Strategy Improved

  • Last Post
  •  
  • 1 2Page 345 6
  • 1 2Page 34 6
  •  
  • Post #41
  • Quote
  • Oct 1, 2021 9:27am Oct 1, 2021 9:27am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Guys, I am a bit worried about the entry strategy.

In version 1.35 I have added a EntryStrategy switch to choose between RetraceAfterLargeBar, TrendContinuationAfterLargeBar or RandomDirection. I have tested these settings on GBPCAD (see screenshots below):

  1. The RetraceAfterLargeBar option is the original strategy where we assume the market will retrace after a large candle. For example, after a large bull candle we go short.

Attached Image (click to enlarge)
Click to Enlarge

Name: RetraceAfterLargeBar.png
Size: 34 KB

  1. The TrendContinuationAfterLargeBar option does the opposite. We assume the market will continue in the direction of the large candle. For example, after a large bull candle we go long.

Attached Image (click to enlarge)
Click to Enlarge

Name: TrendContinuationAfterLargeBar.png
Size: 32 KB

  1. To test whether the entry criteria make any sense at all, I've also added a RandomDirection option that does just that. Randomly make either a Buy or Sell trade. Each time you run the Strategy Tester you will get different results with this.

Attached Image (click to enlarge)
Click to Enlarge

Name: Random.png
Size: 33 KB

All three strategies result in a growing equity curve (albeit with varying drawdowns). This makes me wonder whether there actually is a retracement after a large candle and this stategy does have an "edge" or only depends on the averaging down recovery.
 
2
  • Post #42
  • Quote
  • Edited at 11:14am Oct 1, 2021 11:02am | Edited at 11:14am
  •  Toppi
  • Joined Jul 2015 | Status: DemoMeister | 174 Posts
I agree. The strategy is averaging down recovery, and the EntryStrategy can be different. I'm testing the MA crossover strategy manually on D1 with averaging down recovery. I have just tested a short time but what I can see when paper trading, gets a high win rate. So find a good entry, maybe "follow the trend" and combinations with averaging down recovery = no SL

Example. These 14 trades with 20 pips TP have got 100 % combinations with averaging down recovery...

Attached Image (click to enlarge)
Click to Enlarge

Name: AUDUSD.png
Size: 78 KB
 
 
  • Post #43
  • Quote
  • Oct 1, 2021 11:35am Oct 1, 2021 11:35am
  •  amargam
  • | Joined Jan 2017 | Status: Member | 27 Posts
Quoting yoriz
Disliked
Guys, I am a bit worried about the entry strategy. In version 1.35 I have added a EntryStrategy switch to choose between RetraceAfterLargeBar, TrendContinuationAfterLargeBar or RandomDirection. I have tested these settings on GBPCAD (see screenshots below): The RetraceAfterLargeBar option is the original strategy where we assume the market will retrace after a large candle. For example, after a large bull candle we go short. {image} The TrendContinuationAfterLargeBar option does the opposite. We assume the market will continue in the direction of...
Ignored
It’s always growing because of the averaging down recovery, but in certain cases the DD is huge. The key is reduce the DD and exposure. Maybe dynamic TP’s based in ADR or some kind of Money Management. I don’t know at the moment how to improve the DD. Maybe reducing lotsize instead benefit.
 
 
  • Post #44
  • Quote
  • Oct 1, 2021 1:57pm Oct 1, 2021 1:57pm
  •  dokopy
  • Joined May 2013 | Status: Member | 735 Posts
Quoting yoriz
Disliked
{quote} Good to know. Was that the original strategy or with some modifications?
Ignored
The original strategy. The advantage is that it is traded when the spread falls below 4 pips. No need to wait at night.
Please excuse the bad English via Google Translate.
 
 
  • Post #45
  • Quote
  • Oct 1, 2021 2:04pm Oct 1, 2021 2:04pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting dokopy
Disliked
The original strategy. The advantage is that it is traded when the spread falls below 4 pips. No need to wait at night.
Ignored
Good. The original strategy is already covered in this yzDosi EA too. You can specify the MaxSpreadPips and EntryDelayMinutes to wait until the spread is low, and avoid the first few minutes after midnight when brokers might be doing maintenance and not accept orders. To replicate the behavior of xmess7's EA you must probably set EntryDelayMinutes to 0.

So (in theory) both yzDosi on MT5, and xmess7 on MT4 should give identical results. Perhaps someone with access to both can verify this?
 
 
  • Post #46
  • Quote
  • Edited at 2:55pm Oct 1, 2021 2:36pm | Edited at 2:55pm
  •  cescof
  • Joined Jun 2013 | Status: Member | 998 Posts
Quoting yoriz
Disliked
{quote} Good. The original strategy is already covered in this yzDosi EA too. You can specify the MaxSpreadPips and EntryDelayMinutes to wait until the spread is low, and avoid the first few minutes after midnight when brokers might be doing maintenance and not accept orders. To replicate the behavior of xmess7's EA you must probably set EntryDelayMinutes to 0. So (in theory) both yzDosi on MT5, and xmess7 on MT4 should give identical results. Perhaps someone with access to both can verify this?
Ignored
Yes i can confirm...
Regards
 
 
  • Post #47
  • Quote
  • Oct 1, 2021 4:24pm Oct 1, 2021 4:24pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting Toppi
Disliked
I'm testing the MA crossover strategy [...] gets a high win rate.
Ignored
I have added the MovingAverageCross entry strategy to version 1.40. First experiments seem to reduce drawdown quite a lot:
Attached Image (click to enlarge)
Click to Enlarge

Name: MA Cross.png
Size: 28 KB
Thank you for this excellent suggestion!
 
1
  • Post #48
  • Quote
  • Oct 1, 2021 5:16pm Oct 1, 2021 5:16pm
  •  Toppi
  • Joined Jul 2015 | Status: DemoMeister | 174 Posts
Quoting yoriz
Disliked
{quote} I have added the MovingAverageCross entry strategy to version 1.40. First experiments seem to reduce drawdown quite a lot: {image}Thank you for this excellent suggestion!
Ignored
Thanks! Well, it's was only an example with MA cross. I think we have a much more different entry strategy to test
Is that possible to code EA to only follow averaging down recovery, same as "smilee89" settings?

I mean, if I forward trade manually and entry without SL, for example, https://www.forexfactory.com/thread/...chart-3-candle your EA take over and follow averaging down recovery, only that...
 
 
  • Post #49
  • Quote
  • Oct 2, 2021 8:12am Oct 2, 2021 8:12am
  •  bdunn
  • | Joined Apr 2012 | Status: Member | 112 Posts
Quoting yoriz
Disliked
{quote} Isn't that the same? At the time we open the first order of the day, the equity is equal to the balance. During the day the equity starts to drop, because: Equity = Balance + floating P/L. When the floating P/L become too negative (default 25% of balance) we close all trades.
Ignored
Mate:

Maximum Equity Drawdwon is the Maximum Equity Loss you have experienced in your portfolio. Keyword here is Equity.

Maximum Balance Drawdown is a measure of the largest drop from the peak of your Account Balance to the trough of your Account Balance over the history of the portfolio.

Let me try again with an example:

Suppose your account starting balance is $10,000. You made a few trades and earned $5000. So, your account balance now is $15,000.

Then, you opened a few more trades that the market goes against you. Your equity will drop relatively to the latest market price, BUT, your account balance remains a $15,000.

Can you see the different?

Account Balance will change once you closed your trades. If your trades in positive, then your account balance will grow again with no drawdown. If your trades in negative, then your account balance will drop below $15,000.

But, that happened only after you closed the trades. Before that, your account already experience equity drawdown.

You can experienced 10% equity drawdown (provided your setting is >10%), and then the market bounced back to positive territory and closed in profits. While you experience 10% equity drawdown, your account balance has no experience any drawdown.

Maximum Equity Drawdown is the most preferred way vs Maxium Balance Drawdown, from my dealing with all sorts of EAs.

I hope all these make sense to you. Let me know if I am wrong.

Regards,
Bill

P/S: 2 pictures attached

Attached Image (click to enlarge)
Click to Enlarge

Name: 1.jpg
Size: 99 KB


Attached Image
 
 
  • Post #50
  • Quote
  • Oct 2, 2021 9:05am Oct 2, 2021 9:05am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting bdunn
Disliked
Is the MaximumDrawdownPercent is a Equity Drawdown or Balance Drawdown? I believe it is a Balance Drawdown. Preference will be Equity Drawdown. Can an user input added to choose a Balance-Based or Equity-based Drawdown?
Ignored
Quoting bdunn
Disliked
Maximum Equity Drawdwon is the Maximum Equity Loss you have experienced in your portfolio. Keyword here is Equity.

Maximum Balance Drawdown is a measure of the largest drop from the peak of your Account Balance to the trough of your Account Balance over the history of the portfolio.
Ignored
Sorry, I still don't understand your question.

At midnight before we open the first trade the equity and balance are the same. The MaxDrawdownPercent is a safety mechanism to close all open trades (at a huge loss) when the drawdown is too large. This needs to act on the current equity, not on the balance (which is constant, and is only updated *after* we got a margin call from our broker and have lost our account). I don't see how you could create a safety mechanism based on the balance instead of the equity.
 
 
  • Post #51
  • Quote
  • Oct 2, 2021 9:53am Oct 2, 2021 9:53am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting Toppi
Disliked
Is that possible to code EA to only follow averaging down recovery, same as "smilee89" settings? I mean, if I forward trade manually and entry without SL, for example, https://www.forexfactory.com/thread/...chart-3-candle your EA take over and follow averaging down recovery, only that...
Ignored
I see. You want to make the first trade of each progression yourself, and have the EA take over and do the second, third, etc. if price moves against you. An EA can indeed do this, but I personally find it difficult to create an EA that will take over the currently open trades and start managing your position automatically. Especially in MT5 where your position is built up from Orders which are built up from Deals. It is much easier if all trades originate from the EA itself.

This can certainly be done, but it would take me a lot of time to study how to do that and implement it. Time that I rather use for fully automatic EAs. Sorry, but I am sure you can find a coder that is able to write this for you.
 
1
  • Post #52
  • Quote
  • Oct 2, 2021 10:00am Oct 2, 2021 10:00am
  •  bdunn
  • | Joined Apr 2012 | Status: Member | 112 Posts
Quoting yoriz
Disliked
{quote} {quote} Sorry, I still don't understand your question. At midnight before we open the first trade the equity and balance are the same. The MaxDrawdownPercent is a safety mechanism to close all open trades (at a huge loss) when the drawdown is too large. This needs to act on the current equity, not on the balance (which is constant, and is only updated *after* we got a margin call from our broker and have lost our account). I don't see how you could create a safety mechanism based on the balance instead of the equity.
Ignored
On my previous communication with you, you mentioned that the MaxDrawdownPercent is actually a Maximum Balance Drawdown, instead of Maximum Equity Drawdown.

Thus, I asked, if you can make a pull down menu option for one to choose MaxDrawdownPercent based on:

a. Maximum Equity Drawdown

b. Maximum Balance Drawdown
 
 
  • Post #53
  • Quote
  • Oct 2, 2021 2:45pm Oct 2, 2021 2:45pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting bdunn
Disliked
Thus, I asked, if you can make a pull down menu option for one to choose MaxDrawdownPercent based on: a. Maximum Equity Drawdown b. Maximum Balance Drawdown
Ignored
But they are the same?! When we are about to open our first trade of the day, Balance = Equity. They are exactly the same number. There is no difference. What use is a pull down menu to choose between equity or balance?

Sorry, I must be overlooking something trivial, but I don't understand what you are aiming at. Sorry.
 
 
  • Post #54
  • Quote
  • Oct 3, 2021 9:08pm Oct 3, 2021 9:08pm
  •  MT4-EA
  • | Joined Jul 2021 | Status: Member | 23 Posts
Quoting MT4-EA
Disliked
{quote} Yes. This will do the job and maybe adding TP param for each as well. Symbol1=EURUSD MinBarLength1=170 Symbol1TP = 50 Symbol2=GBPCAD MinBarLength2=110 Symbol2TP = 30
Ignored
OP, have you decided to abandon this feature?
 
 
  • Post #55
  • Quote
  • Oct 4, 2021 8:07am Oct 4, 2021 8:07am
  •  bdunn
  • | Joined Apr 2012 | Status: Member | 112 Posts
I tried to do some optimization overnight and found a lot of lines of this error:

2021.10.04 20:04:41.071 M-LIM-M83:2001 genetic pass (0, 309) tested with error "critical runtime error 503 in OnTick function (zero divide, module Experts\yzDosi-1.40.ex5, file yzDosi.mq5, line 371, col 31)" in 0:00:00.014


Pls kindly advise which related setting is this.

Thank you mate.
 
 
  • Post #56
  • Quote
  • Oct 4, 2021 8:30am Oct 4, 2021 8:30am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting bdunn
Disliked
I tried to do some optimization overnight and found a lot of lines of this error: 2021.10.04 20:04:41.071 M-LIM-M83:2001 genetic pass (0, 309) tested with error "critical runtime error 503 in OnTick function (zero divide, module Experts\yzDosi-1.40.ex5, file yzDosi.mq5, line 371, col 31)" in 0:00:00.014 Pls kindly advise which related setting is this. Thank you mate.
Ignored
Sorry to hear you are having problems with the EA. My guess is that the optimizer created an invalid combination of input parameters. Specifically, I assume this error occurs when:

  1. BarSelection = SelectPercentile
  2. NrBarsLookback = 0

In that combination you ask the EA to not compare the size of the last bar against a fixed length, but to select those bars that are exceptionally large compared to previous bars seen. However, by settings NrBarsLookback to zero, you prohibit it from looking back and it can thus not know what bars to select.

Although these are clearly invalid settings, the EA should obviously not crash. I will add a better input parameter validation at startup to the EA. Instead of crashing, it should refuse to start, and give the optimizer a PARAMETERS_INCORRECT error code to indicate it can skip this particular combination and move on to try the next combination.

I will try to update the EA later today. For now, you might be able to avoid this error by setting a useful lower limit for the NrBarsLookback parameter. Values between 50 (~2 months look back) and 1000 (~3 years look back) seem a reasonable range to test in the optimizer.

 
1
  • Post #57
  • Quote
  • Oct 4, 2021 8:45am Oct 4, 2021 8:45am
  •  bdunn
  • | Joined Apr 2012 | Status: Member | 112 Posts
Quoting yoriz
Disliked
{quote} Sorry to hear you are having problems with the EA. My guess is that the optimizer created an invalid combination of input parameters. Specifically, I assume this error occurs when: BarSelection = SelectPercentile NrBarsLookback = 0 In that combination you ask the EA to not compare the size of the last bar against a fixed length, but to select those bars that are exceptionally large compared to previous bars seen. However, by settings NrBarsLookback to zero, you prohibit it from looking back and it can thus not know what bars to select. Although...
Ignored
I tried to optimize under 12hours TF and Daily TF. Both have this same error.

FYI, the minimum value for NrBarsLookback that I set is 1.

In fact, no parameter is set to 0 as minimum value, except Stop Loss and GMTOffSet (assuming 0 means Auto Offset).
 
 
  • Post #58
  • Quote
  • Oct 4, 2021 11:26am Oct 4, 2021 11:26am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
I have uploaded version 1.45 that does stricter input validation to avoid problems during Optimizer runs. Please give that a try!

Quoting bdunn
Disliked
the minimum value for NrBarsLookback that I set is 1. In fact, no parameter is set to 0 as minimum value
Ignored
To reduce the lead-in time needed before the first trade is made, I enable trading already when have encountered only 1/10th of NrBarsLookback bars instead of waiting for the full NrBarsLookback bars. But with value 1 this effectively means 0.1 bars, which is rounded down to 0. So the minimum value is actually 10, not 1. Nonetheless, I don't expect such short lookbacks to be useful, since you need to collect enough statistical data to properly recognize exceptionally large bars.

Quoting bdunn
Disliked
no parameter is set to 0 [...] except GMTOffSet (assuming 0 means Auto Offset).
Ignored
Well, 0 means exactly that: 0 hours offset from GMT. In other words, that is the value you would select if your broker uses GMT (i.e. London based broker).
 
 
  • Post #59
  • Quote
  • Oct 4, 2021 2:15pm Oct 4, 2021 2:15pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 127 Posts
Quoting MT4-EA
Disliked
Yes. This will do the job and maybe adding TP param for each as well. Symbol1=EURUSD MinBarLength1=170 Symbol1TP = 50 Symbol2=GBPCAD MinBarLength2=110 Symbol2TP = 30

OP, have you decided to abandon this feature?
Ignored
MT4-EA, duplicating the current input parameters in 28-fold will make the EA extremely complex to use. I appreciate the convenience of having all pairs in one EA and being able to simply run the backtester once and see the equity curve of the combined portfolio. In fact, I am quite curious myself what equity curve that will give.

However, for optimizing and trying out new entry/exit strategies we only need one pair at the time. Perhaps it is better to first settle on a best strategy there before we start copy-pasting numerous input parameters?
 
 
  • Post #60
  • Quote
  • Oct 6, 2021 4:20am Oct 6, 2021 4:20am
  •  dokopy
  • Joined May 2013 | Status: Member | 735 Posts
I suggest trying this strategy as well. It is on the daily charts and gives more signals.

https://www.forexfactory.com/thread/...-candle-system
Please excuse the bad English via Google Translate.
 
 
  • Trading Journals
  • /
  • DOSI: Daily Open Strategy Improved
  • Reply to Thread
    • 1 2Page 345 6
    • 1 2Page 34 6
0 traders viewing now
  • More
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022