Very interesting concept-I have backtested and looks decent-what motivated this idea/strategy? Daniel
forexman05:
Very interesting concept-I have backtested and looks decent-what motivated this idea/strategy? Daniel
Very interesting concept-I have backtested and looks decent-what motivated this idea/strategy? Daniel
Thanks forexman.
The motivation? Well, according to secondary school statistics if you roll a dice you have a 1:6 chance of predicting the outcome. If, however you roll two dice, the odds are not 1:12, but 1:36. If you posit that each indicator has a specific statistical chance of predicting an outcome the more indicators you use, the worse the odds! Of course I'm being simplistic, but it has led me to start thinking very hard about finding a minimalist approach to trading - starting with no indicators at all!
As for the backtesting results, you will find that the EA works if the market is consistent; i.e., if optimised for a gentle or steep rising or falling market, it continues to work while the market retains that profile. I guess one could look for a long term trend, optimise for the last few days of that trend and set the robot off UNTIL the trend changes. Be careful! :)
Monu
hi,
nice idea, but, you made a mistake reguarding the coding.
your code:
i assume this was not meant.
try this code
michael
nice idea, but, you made a mistake reguarding the coding.
your code:
int start(){ if (last_bar == Bars) return(0); last_bar = Bars; if (OrdersTotal() == 0){ OrderSend(Symbol(), OP_BUY, lots ,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point, IDENT, MAGIC, 0, Blue); OrderSend(Symbol(), OP_SELL, lots ,Bid, 3, Bid + take_profit * Point, Ask - take_profit * Point, IDENT, MAGIC, 0, Red); } return(0); }as you can see you have not the same SL/TP levels for BUY and SELL.
i assume this was not meant.
try this code
int start(){ if (last_bar == Bars) return(0); last_bar = Bars; if (OrdersTotal() == 0){ OrderSend(Symbol(), OP_BUY, lots ,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point, IDENT, MAGIC, 0, Blue); OrderSend(Symbol(), OP_SELL, lots ,Bid, 3, Bid + stop_loss * Point, Ask - take_profit * Point, IDENT, MAGIC, 0, Red); } return(0); }and let me know your results.
michael
Thanks Michael, you're correct, and I have fixed this in mo_bidir_v0_1.mq4. It works better :)
Hi can email me the updated EA? i like to try. Thanks
ng_hans@yahoo.com.sg
Regards
Hans Ng
WHRoeder:
Hi WHR, maybe the variable name is unclear. By "last_bar" I really mean the last bar that has been processed... i.e., the most recent apart from the current one :). Thanks for the thought, though!
if (last_bar == Bars) return(0); last_bar = Bars;This will stop working once you reach max bars on chart.
I would certainly add a time-of-day filter and test trailing stops

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Simplest Hedging EA ever:
Author: Monu Ogbe