EA for Beginners, set and forget breakout, code, optimisation, testing part 5/8
Вставка
- Опубліковано 16 чер 2023
- Finishing some loose ends and making the code work for MT4. Going back to basics for a beginners coding guide, I'm writing a complete breakout expert based on a published strategy including tips and optimisation.
Part 5 of 8
The strategy was published by TradePro and is a time range based breakout trading USDJPY with 3 stage take profit.
As a beginners guide I'm taking things slowly so I have to break the tutorial down to multiple videos. This is the first part and there is a link to the playlist below. I will add further parts to the playlist in the coming days.
The code is for Metatrader 5 but is almost the same for Metatrader 4 and I'll try to point out the differences as I go in the videos
Looking for a broker? Support the channel by using this link. We receive a commission on your trades from the broker at no cost to you:
orchardforex.com/live-account
Links:
Original Strategy Video: • 100 PIPS A DAY Highly ...
Earlier range breakout: • Time Range Breakout Ex...
Time entry formats: • Add this code to your ...
Web Page: orchardforex.com/build-a-set-...
Discord: orchardforex.com/discord/
Playlist for this series: • Set and Forget Breakout
#Breakout #Forex #metatrader #expert #finance - Розваги
Probably the best MQL/MetaTrader coding videos I've ever seen. Just awesome.
Great Detail - as always - probably the best educational MQL5 coding series I've seen so far 👍
Great to hear!
Thanks for making this well explained I learned a lot
Glad it was helpful!
Thanks a lot for producing such a great neatly coded EA explaining in detail of each component of the code why & when it has been coded for MT4 & MT5 separately. As a result, we got to know the technical aspect of good habits of proper coding of any EA by ourselves. So nice of you & thanks a lot once again.
You are welcome!
Thanks for another very educational video
You're welcome
Awesome Mr Arthur, it is so educating and at the same time entertaining. I am following this series attentively and I have learnt a lot.
Great to hear.
Good stuff! Let the games begin.
That's the plan!
Really enjoying this series. I've been working on coding a version of your Linear Regression Pullback Forex Strategy, and am looking forward to working on this one next.
Glad you enjoy it!
Hi, yet another so valuable course. Thank you for the risk management function, very interesting, also the way to maintain one single mqh for MQL4&5, I like this practice, it avoids having to balance between 2 files, with the risk of gaps, I'll adopt it.
Thank you
Brilliant content. Keep up the great work 👍
Thank you! Will do!
UPDATED
===================
Wohooooo!
Fixed it. Turns out I made some errors while typing along. These errors gave me a first demonstration of why you do your error handling the way you do them. Would never have known where to look without them. Laughed at myself for the errors.
===================
I think I broke something.....
It compiles OK but then when I run the strategy tester all I get is that annoying duck sound. On checking the Journal I find this...
"tester stopped because OnInit reports incorrect input parameters"
It's a pretty obvious message...but for the life of me....I don't know where to look
I think I fixed this particular issue. I missed out the ! in "if (!inputsOK) return INIT_PARAMETERS_INCORRECT;"
But now I'm getting some other errors relating to [NO MONEY]
Your tutorials are really helpful and bring a great education to us. Can you please make a short tutorial for an indicator, that draws the chart background red (when MA1 is < MA2) and green (when MA1 > MA2). I guess it works with rectangles, but I'm not sure. Thanks a lot in advance!
Nice. I'm sure after the next session the EA will perform better
It makes a 270% profit now. How much more are you expecting?
@@OrchardForex With my current broker I'm getting about a 50% profit with the same settings, so not sure what to expect after the optimization but looking at other brokers to see if I can get a better return
Thank you for your valuable time
It's my pleasure
Im working on the optimisation now.
@@OrchardForex I think there is a small issue with the system, it opens three trades with different TP, not one order with three levels of closing the position, which in this case the risk is multiplied by 3 each time the system enters the market.
@@WasimZayed That is covered in part 1
@OrchardForex Will check it again, thank you again 👍
Great ❤
Thank you
In the first place I would like to thank you for Your work It's awesome. I checked this code in MQL4 and it seems like it doesn't take into considereation the lowest low and the highest high from the settle time range. Tester every time opens position at the start of the time range and it's always buy position (becase it's first in code).
You may be missing data. I'll add that discussion to part 6.
I'm having he same issues in MT4 - I hope it comes to light in Part 6.
This is awesome!, glad to have found your channel to learn about mql4 , at some point I hope you are able to share the code for this EA, tia.
All parts are on the web pages
Amazing Tutorial, all kudos to you :-) Now, I coded this EA and trying to optimize it ... One thing I'm thinking is Range Start and End ... I'm using IC Markets and I assume the default start and end times in the code should work, but not sure? Do you know?
See part 1. Start and end times have to match the original strategy of 6PM EST
I like your coding, elegant and accounts for many conditions; however, i go more direct to the need of the EA... I kept getting bad results, but that was testing 2023. When I went back to 2022 like you tested, it was much better... so, i'd be interested if you will run your EA for Jan 2023 to current. The behavior is considerably different.
I don't seem to be able to post an image here.
I have a number of things to cover in part 6 about backtest results.
Everything compiled ok. Tester stuck at the start. Been trying to will the green bar on with no luck 😁 Did I need to set the time range before running the Tester or is it just a data issue. I seem to have enough history data for the pair?
You set the date range in the settings tab of the strategy tester.
I am getting different results. I don't know why. Do i have to change the input start and end time?. My broker is based on EEST-Eastern European Summer Time.
I think in part 1 I said if your broker doesn't use 5PM New Yourk you should change broker. There can be many things affecting your results like different data from the broker. I mention it in part 6.
hello, can you generate a code that allows me to open trades only for purchase and that each trade has a stoploss of -51 points and closes every 59 seconds.
thanks for your videos
It is for a test in metatrader 5
So you are doing a test and you would like me to provide the answers. I'll pass on that.
I can but why would I want to?
@@OrchardForex what is your rate, for a code like this
@@miguelcarvajal8083 For custom work go to orchardforex.com/custom-experts
I have followed the video, series and rewatched the again. for some reason the code on the mqh file, result into [Invalid stops]. can you clarify me where is my error or at least make a video, where you run through the code slowly so that i can see my own error comparing with your code. Unfortunately UA-cam does not allow me to post the entire code here
Invalid stops means pretty much what it says. The stop loss price is invalid for the trade. Maybe sl above entry ofr a buy or sl too close to the entry. There is an error message printed and you can see the values in that. If you think it's a problem in your code just download from the web page and compare.
@@OrchardForex Thank you for the reply Orchard. I didn't find a visible error in my code, just followed your video. I am an intermediate mql4 and mql5 coder. I will figure out what I can do to make the code work, you reply highlighted valuable insight, thank you......
@@thembelssengwayo6896 Just download the code from the web page and run that.
@@OrchardForex......Thank you Orchard I have downloaded the code from Website as per your advice. Indeed the code run flawlessly. This strategy is very much similar to a strategy that I am developing. It is not yet complete, it is almost close to completion yet it is profitable. My strategy is based on a multi_currency pairs though (22 symbols). I will keep following your new video as they come......Thank you once again, I really appreciate.
Is it possible to develop a telegram bot . That can send Private messages to group members?
ua-cam.com/video/PxzBZF7hbOo/v-deo.html