• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:25pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:25pm
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,084 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 2345Page 6 7
  • 1 45Page 6 7
  •  
  • Post #101
  • Quote
  • Edited Nov 15, 2021 3:58am Nov 14, 2021 8:08am | Edited Nov 15, 2021 3:58am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Some users testing the EA on a demo account reported spurious errors. The standard MT5 logs do not provide enough details to understand what is happening, therefore version 1.90 now keeps an extensive log of the trade execution. The command sent to the broker's server and the reply received back is logged in full detail, including timing, slippage, network disconnects, etc. When the broker disabled trading from their server-side this is also logged. Check the messages in the terminal to find the exact file name of the log file.

Warning: this expert advisor is still experimental and might contain bugs. Use on live account at your risk.

Example logging:

Inserted Code
2021-11-15 09:45:00.201188: Opening buy order 0.10 lots at ask price 1.14372, no stop loss, no take profit
2021-11-15 09:45:00.201412: Sending order to trade server:
    Last EURUSD tick:
        bid              : 1.14372
        ask              : 1.14372
        time             : 2021-11-15 10:45:00.205
    Request:
        action           : TRADE_ACTION_DEAL
        magic            : 1003
        order            : 0
        symbol           : EURUSD
        volume           : 0.10
        price            : 1.14372
        stopLimit        : 0.00000
        sl               : 0.00000
        tp               : 0.00000
        deviation        : 6
        type             : ORDER_TYPE_BUY
        type_filling     : ORDER_FILLING_IOC
        type_time        : ORDER_TIME_GTC
        expiration       : (none)
        comment          :
        position         : 0
        position_by      : 0
2021-11-15 09:45:00.580165: Received response from trade server:
    OrderSend:
        success          : true
        lastError        : 0 (Ok)
        duration         : 378.598 milliseconds
    Result:
        retcode          : 10009 (Request completed)
        deal             : 119548555
        order            : 168581081
        volume           : 0.10
        price            : 1.14373
        bid              : 1.14373
        ask              : 1.14373
        comment          : "Request executed"
        request_id       : 76
        retcode_external : 0
2021-11-15 09:45:00.580226: Order executed successfully
2021-11-15 09:45:00.580245: Order #168581081 opened successfully (delay 378.6 msec, slippage 0.1 pips)
 
1
  • Post #102
  • Quote
  • Nov 15, 2021 8:39am Nov 15, 2021 8:39am
  •  thrilled
  • | Joined Aug 2021 | Status: Member | 15 Posts
Hi Yoriz,

One thing I have noticed is that if your MT5 gets closed.. ie sudden reboot of the computer/manual closing then when you start it up again you will see all orders closed regardless if in profit or not. It would be nice if the EA continued where it was instead of closing orders that are ongoing.
 
 
  • Post #103
  • Quote
  • Edited at 2:50pm Nov 15, 2021 11:49am | Edited at 2:50pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting thrilled
Disliked
It would be nice if the EA continued where it was
Ignored
Yes, I agree. However, the current EA was made for use in the strategy tester to see how the strategy performs. Therefore, it is programmed using its own internal bookkeeping to track its own orders. Using such an internal bookkeeping is much more simple to program and sufficient for use in the strategy tester. If used for demo or live trading, the drawback is that when you change input parameters, restart MT5, etc. this bookkeeping will be lost and all old trades are abandoned and no longer managed. You must then manage them yourself (either close them, or manually set tp/sl). Based on post #941 in the original DOS thread, I am guessing xmess7 and soko8 also built their EAs that way.

For use in an actual live environment this is certainly unacceptable! When a robust EA for live trading is (re-)started, it should first check what positions are open in your account, then try to filter out its own orders, adopt and start managing these orders, and try to reverse engineer the last state the EA was in before it was stopped and pick up from there.

To implement all the steps above I would have to rewrite large parts of the code. Not a problem in itself, however, personally I am not yet convinced this EA has an "edge" and whether it is worth the effort. Nobody here has shared their settings, so either no long term profitable settings can be found, or people are merely profiting from my efforts without giving anything back. Neither is a good incentive for me to spend many hours rewriting the EA. I already spend many hours improving the EA, so it would only be fair if others spend some hours hunting for profitable pairs and settings and share them.
 
 
  • Post #104
  • Quote
  • Nov 22, 2021 10:14am Nov 22, 2021 10:14am
  •  thrilled
  • | Joined Aug 2021 | Status: Member | 15 Posts
Just a question....

I am running v 1.70 in one test and for some reason the averaging doesn't seem to happen:

Image explaining - As you can see the pairs GBP/CAD and GPB/AUD doesnt enter additional trades even though the initial trade many days ago

Not sure why though... is there any setting I might have wrong?

Best Regards!

/T
 
 
  • Post #105
  • Quote
  • Nov 22, 2021 2:20pm Nov 22, 2021 2:20pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting thrilled
Disliked
the averaging doesn't seem to happen [...] is there any setting I might have wrong?
Ignored
Could be several reasons:

  1. MinScaleInPips determines how much the price must move before another scale in is done. Perhaps you selected a very large value?

  1. MaxOpenTrades, MaxOpenBuyTrades and MaxOpenSellTrades determine how many trades are allowed. Setting this to 1 prevents additional scale ins.

  1. MaxSpreadPips determines what maximum spread is allowed for making trades. Perhaps the spread is currently too high, or the setting too low?

  1. and finally the entry signal settings could be such that only few entry signals are generated

Hope this helps.

 
 
  • Post #106
  • Quote
  • Dec 17, 2021 4:31pm Dec 17, 2021 4:31pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
The previous version (1.90) added logging the trade execution to file (see post #101). After running the EA for weeks, these log files can become quite large. Especially on systems with limited disk space (e.g. rented VPS) this can become a problem.

I have uploaded a new version 1.95 that implements log rotation. Each time the log file grows over 1 MB in size, it is renamed by adding a number to its file name, and a new log file is started. If there are more than 4 log files, the oldest log file is deleted.

For example:
Attached Image

Here "yzDosi-EURUSD-M5.log" is the current, most recent log file that is being written to. "yzDosi-EURUSD-M5.log.3" is the oldest archived file. Once the current log file reaches 1 MB in file size, it will be renamed "yzDosi-EURUSD-M5.log.6" and "yzDosi-EURUSD-M5.log.3" will be deleted.

Using this log rotation scheme, the combined log file size of each running yzDosi EA instance will never exceed 4 MB.
 
 
  • Post #107
  • Quote
  • Dec 28, 2021 6:12pm Dec 28, 2021 6:12pm
  •  THA58
  • | Joined Oct 2020 | Status: Member | 22 Posts
A very Happy New Year to 'yoriz' and to your family and to the rest of the members of this forum!!!
 
2
  • Post #108
  • Quote
  • Dec 29, 2021 7:50pm Dec 29, 2021 7:50pm
  •  hhloverhh
  • Joined Feb 2018 | Status: Member | 428 Posts
hello yoriz..

nice work what you do and what you freely share.. for all of us.. thx again..

first idea:
what do you think about an new options... if the EA open in the same direction two trades or more.. with or without martingale.. the EA has to close (only in the reopened direction) the trades with a minimal profit.. like an safe exit strategy.. good? bad idea?

second idea:
what do you think about an trailing system based on equity and not pip steps?
why? if we have many already opened trades... (buy and sells too).. and different pairs... we can let the EA... trailing the growing equity.. and if the trend/signal reverse.. and the equity.. goes again down.. we have an equity stop... good/bad?

third idea:
based on the second one... we can switch on an extended safe exit strategy... the EA check if we have a pair... that has xy pips in loss... but others pair has good profit.. we let close with an % profit all... or with the equity trail system ... good/bad?

I stop first.. I'm curious first if you like my ideas.. and if this are not so complicated to be implemented..

BR Luke
Millionaire Expert All Time Return: 163.8%
 
 
  • Post #109
  • Quote
  • Dec 29, 2021 8:09pm Dec 29, 2021 8:09pm
  •  hhloverhh
  • Joined Feb 2018 | Status: Member | 428 Posts
Hello Yoriz,

what settings are you using for GBPCAD to get this results?
https://www.forexfactory.com/attachm...1&d=1632860420

I do with the default settings.. and get this results..
Attached Image (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 40 KB
Millionaire Expert All Time Return: 163.8%
 
 
  • Post #110
  • Quote
  • Edited at 5:57am Dec 30, 2021 5:32am | Edited at 5:57am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting hhloverhh
Disliked
what settings are you using for GBPCAD to get this results?
Ignored
Oh, I can't remember. Probably just the defaults. Keep in mind that the MaxDrawdownPercent depends on the equity, while the LotSize can be fixed. To replicate the exact results from post #1, please try again with a 10,000 starting balance to see if that helps.

Please also read my concerns in post #41.
 
 
  • Post #111
  • Quote
  • Dec 30, 2021 5:56am Dec 30, 2021 5:56am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting hhloverhh
Disliked
if the EA open in the same direction two trades or more.. with or without martingale.. the EA has to close (only in the reopened direction) the trades with a minimal profit.. like an safe exit strategy..
Ignored
I am not sure what you mean here. When the EA opens a new trade you want it to close another trade? Then we can just as well do nothing, because our market position remains the same.

Quoting hhloverhh
Disliked
what do you think about an trailing system based on equity and not pip steps? why? if we have many already opened trades... (buy and sells too).. and different pairs... we can let the EA... trailing the growing equity.. and if the trend/signal reverse.. and the equity.. goes again down.. we have an equity stop...
Ignored
Unfortunately, I feel this EA does not really have an "edge". It is merely using Averaging Down to wiggle itself out of a losing trade. That means that most of the time, the EA is going in drawdown first before it starts recovering (see post #93). Especially when running several EAs on different pairs, there are always instances going down, while others are going up. Not sure how a global equity trailing stop should be implemented in this case.

More on a philosophical level: the market doesn't know or care what your current market position is. That implies that ideally the EA behavior is defined in market-related terms (pips, bars, volume, etc.) not in your personal equity. For that same reason, you are probably getting different results in post #110 due to MaxDrawdownPercent. It would be better if we had a MaxDrawdownPips parameter that is not depending on your account equity, but most users find that inconvenient. Had we used MaxDrawdownPips instead of MaxDrawdownPercent, then we could first run backtests and optimize the settings, and then "crank up the volume" (i.e. increase the LotSize) without altering the EA's behavior when going live (based on the typical drawdowns/risk we saw during backtesting).

Quoting hhloverhh
Disliked
we can switch on an extended safe exit strategy... the EA check if we have a pair... that has xy pips in loss... but others pair has good profit.. we let close with an % profit all...
Ignored
Apart from the philosophical concern stated above, this makes the system very complicated because all pairs would affect each other. How do you plan to backtest and tune the parameters of such a system?

Thank you for your suggestions.
 
1
  • Post #112
  • Quote
  • Edited at 8:42am Jan 9, 2022 8:05am | Edited at 8:42am
  •  davelansing
  • Joined Feb 2009 | Status: Member | 389 Posts
Quoting yoriz
Disliked
{quote} I feel this EA does not really have an "edge". It is merely using Averaging Down to wiggle itself out of a losing trade. That means that most of the time, the EA is going in drawdown first before it starts recovering (see post #93).
Ignored
My 2cents… Yoriz is absolutely correct… there is no “edge” to this method once the trade goes into “recovery mode” and you start to average down to mitigate the losing trade. That isn’t an edge. Averaging down is hoping and praying that the market stops trending opposite to your losing position. Think about it… Yoriz clearly showed in an earlier post (post #41) that the equity curves were not significantly different whether you entered a trade using the original large bar setup, or you randomly opened a trade, or opened a trade in the same direction of the large bar setup. There are no magical parameters that need to be set for each pair or a basket of pairs to ensure a profitable outcome OTHER THAN the pair, or basket, must be in a range and that your trade size is small enough so that your account can handle the losses during the drawdowns.

edit: if you’re interested in learning profitable retracement trading, then go read both of Too Slow’s threads…

Best,

Dave
 
 
  • Post #113
  • Quote
  • Jan 10, 2022 2:09am Jan 10, 2022 2:09am
  •  MT4-EA
  • | Joined Jul 2021 | Status: Member | 23 Posts
I agree in 100% with your ideas, both Dave and yoriz, but you also need to take into your conclusion one more fact, critical fact:
After having hundreds and even thousands of trades, using this strategy, there was not even 1 trade that ended up with 1 full loss of whole basket in its targeted loss.
I am not saying it can't happen; of course it can, but if this strategy can earn you a nice profit, it still makes sense to take the chance of 1 loss once in a long period.
I have not seen any other strategy that used different entry rule + average down that earned the same steady profit (stable positive slope of equity curve) with such minimal chance to lose from time to time (long time).

And one more thing: I have not seen another strategy that works that great for ALL majors, and not only for one or several pairs.

To sum it up, an absolute one way direction of at least 110 pips from Open to Close within one day is a good trigger for opposite trade on the next day and you can not ignore/eliminate it Then, managing the open trade(s) is a great wisdom which you can't eliminate, specially if it was tested for long time with many trades in all major pairs.
 
1
  • Post #114
  • Quote
  • Jan 10, 2022 8:22am Jan 10, 2022 8:22am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting MT4-EA
Disliked
To sum it up, an absolute one way direction of at least 110 pips from Open to Close within one day is a good trigger for opposite trade on the next day and you can not ignore/eliminate it
Ignored
If you set the MaxOpenTrades input parameter to 1, and use TakeProfitPips and StopLossPips to specify when to exit the trade, then you are basically telling the EA not to use recovery trades and only rely on the accuracy of the 1st opening trade. I was not able to find a profitable setting with MaxOpenTrades set to 1. Did you?

Quoting MT4-EA
Disliked
I have not seen another strategy that works that great for ALL majors, and not only for one or several pairs.
Ignored
Isn't that just because it uses averaging down to wiggle itself out of a loss? Similar like all grids and all Martingales work on any pair, and even on random data?

Quoting MT4-EA
Disliked
if this strategy can earn you a nice profit, it still makes sense to take the chance of 1 loss once in a long period.
Ignored
Perhaps if you are able to find *very* conservative settings that can survive even the longest of trends, then you could consider using it. However, that very conservative setting is probably not making a lot money each month, so you might be better off doing just a Buy&Hold of some stable stocks or indexes.
 
 
  • Post #115
  • Quote
  • Jan 10, 2022 3:18pm Jan 10, 2022 3:18pm
  •  MT4-EA
  • | Joined Jul 2021 | Status: Member | 23 Posts
1. This strategy is not based on a single entry and it does not have a stop loss in pips.
2. This strategy is not based on entry only, but also on trade management as well. It is an integral part of it.
3. Averaging down is not martingale.
4. Every grid system uses martingale, and this strategy does not. It gives you more entries for one basket than any martingale.
5. "Buy and Hold' is not part of this strategy.

I really can't understand why people try to "fix" a working tool. A very good tool in this case.
Keep it simple!
 
 
  • Post #116
  • Quote
  • Jan 10, 2022 5:12pm Jan 10, 2022 5:12pm
  •  hhloverhh
  • Joined Feb 2018 | Status: Member | 428 Posts
talking much but sharing nothing...
why criticize if you have a better one?

Help if you will not share, give hint... or share if you have other purposes .. sell

but only criticize without meaning or understanding ... for reaching what?!?
Millionaire Expert All Time Return: 163.8%
 
 
  • Post #117
  • Quote
  • Edited at 7:29am Jan 11, 2022 6:41am | Edited at 7:29am
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
MT4-EA, you are side stepping my remark by just making a lot of other statements?!

Quoting MT4-EA
Disliked
1. This strategy is not based on a single entry
Ignored
Indeed. However, I responded specifically to this remark you made: "an absolute one way direction of at least 110 pips from Open to Close within one day is a good trigger for opposite trade on the next day and you can not ignore/eliminate it". I argue that there is no correlation between a large 110 pips bar and the direction of the following day. In fact, I proposed a specific way for you to discover that yourself: setting MaxOpenTrades to 1. If there was really an "edge" there (i.e. the market tends to revert back after a long bar), then your 1st trade would be more often successful than not.

However, that is not what we are seeing: the probability of reverting the following day is 50%. In other words: it is pure random; there is no "edge". We could as well have just chosen a random Buy/Sell and get the same result. That is what I demonstrated in post #41.

Quoting MT4-EA
Disliked
and it does not have a stop loss in pips.
Ignored
The original strategy has a stop loss expressed in account drawdown, which is effectively the same but one is expressed in dollars, the other in pips.

Quoting MT4-EA
Disliked
2. This strategy is not based on entry only, but also on trade management as well. It is an integral part of it.
Ignored
Indeed, we need the averaging down to help us get out of a losing position when the 1st trade was incorrect (which is in 50% of the cases). So it is an integral part of the strategy.

Quoting MT4-EA
Disliked
3. Averaging down is not martingale.
Ignored
I wrote: "Similar like all grids and all Martingales work on any pair". There are 3 commonly used systems that keep adding to a losing position: averaging down, Martingale and grid. These are different things.

Quoting MT4-EA
Disliked
4. Every grid system uses martingale
Ignored
No, that is not necessary. You can combine a grid with a Martingale sequence, but you can run a grid without one. The term "Martingale (wikipedia)" is used to indicate the strategy will take bigger risks the more it is in drawdown. Usually it does this by increasing the lot size, but you could do the same by playing with the SL/TP ratio.

You could however look at averaging down as a simple counter-trend grid: at regular intervals you keep adding counter trades, hoping the market will revert.
Quoting MT4-EA
Disliked
I really can't understand why people try to "fix" a working tool. A very good tool in this case. Keep it simple!
Ignored

Nobody is trying to fix anything. I am skeptical about the entry rule (the 110 pips rule) and don't think this strategy has an "edge". It relies purely on averaging down. Any other entry rule (Bollinger, MACD, CCI, MA-cross, etc.) would perform just as well.

I have the feeling you are offended by the discussion in this thread and want to defend the original strategy. It is perfectly fine if you choose to use an averaging down, grid or Martingale strategy. However, others feel a bit uneasy because mathematics shows these strategies will eventually blow up if you run them long enough.
 
2
  • Post #118
  • Quote
  • Jan 11, 2022 7:41am Jan 11, 2022 7:41am
  •  MT4-EA
  • | Joined Jul 2021 | Status: Member | 23 Posts
I am not defending anything.
The opposite, I am trying to explain you that simple is better and you don't need to work hard to change something that already works well*.

1. People tend to rise speculations and offer opposite steps while facts and results show that current strategy is good enough.
For example: if 110 pips is a "random trigger" for entry then I suggest you test same strategy with a different entry only, such as 1 pip instead of 110 pips, or going with the direction of the previous daily bar. You will find out that you won't get same results by the advantage of averaging down.

2. Grid is not the same as averaging down or martingale.
Grid is fixed (even or uneven) distance between entries and does not relate to lot size.

3. Using stop loss in pips is not the same as stop loss in money, there are 2 different methods to target the loss. 2 different ways which you may use in same strategy but are not "the same".

*Minimizing the risk without minimizing the profit is the most important feature, for me, and I encourage you all to have a breakthrough in it particularly.

Good luck
 
 
  • Post #119
  • Quote
  • Jan 11, 2022 12:07pm Jan 11, 2022 12:07pm
  •  yoriz
  • Joined Dec 2016 | Status: Member | 131 Posts
Quoting MT4-EA
Disliked
I am not defending anything. The opposite, I am trying to explain you that simple is better
Ignored
Yes, to that I can agree.

Quoting MT4-EA
Disliked
if 110 pips is a "random trigger" for entry then I suggest you test same strategy with a different entry only, such as 1 pip instead of 110 pips, or going with the direction of the previous daily bar. You will find out that you won't get same results by the advantage of averaging down.
Ignored
That is exactly what I did in post #41. The top graph shows the original strategy (i.e. opposite direction of the previous bar). The middle graph inverts the logic (i.e. going with the direction of the previous bar). The bottom graph uses random directions (you can run the backtest several times and get different entries each time).

Each time you see the same linear equity curve with sharp drawdown peaks. Apparently the entry rule does not determine the profitability of the strategy. That is why I feel the entry rule does not have an "edge". It is purely the averaging down that makes this strategy what it is.

Quoting MT4-EA
Disliked
2. Grid is not the same as averaging down or martingale.
Ignored
Yes, indeed.

Quoting MT4-EA
Disliked
3. Using stop loss in pips is not the same as stop loss in money, there are 2 different methods to target the loss.
Ignored
Numerically you specify a different value, but the behavior of the EA is exactly the same. For example, when trading EURUSD using 0.1 lots, then 1 pip equals $1. So in this case, a stoploss of 1 pip, is equivalent to a stoploss of $1 drawdown of your account equity. It would be different with a trailing stop, for example. In that case, the behavior of the EA is different.

Quoting MT4-EA
Disliked
Good luck
Ignored
You too. I hope you are able to avoid big drawdowns and be successful.
 
1
  • Post #120
  • Quote
  • Aug 10, 5:42am (37 hr ago) Aug 10, 5:42am (37 hr ago)
  •  Forex37
  • | Joined Oct 2006 | Status: Member | 542 Posts
Thanks for the thread and ea. Any recommendation for an mt5 boker for the demo. This wil be my first mt5 venture. So I need easy to start unrestricted demo.

Thanks
 
 
  • Trading Journals
  • /
  • DOSI: Daily Open Strategy Improved
  • Reply to Thread
    • 1 2345Page 6 7
    • 1 45Page 6 7
0 traders viewing now
  • More
Top of Page
  • 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