I appreciate your work sir if you can please do a complete course for mt4 To be honest you are the most resourceful programmer for mql4 I ever saw in youtube Best regards
sir, really, you are not just an excellent guro, but also a very good provider of knowledge given to you from above. thank you so much for sharing this wonderful video presentation. i like it so much. and I learnd a lot. Be blessed.
Thank you so much. its really useful for me. I manage to build my own EA with the help of your programming tutorial. I really appreciate and want to say you that, you are great. and don't stop teaching use. I m expecting more advance level of EA programing. so that I will be thankful for you.
This EA example works out good and it’s really profitable but my only problem is how I can limit the maximum order number. 🙏 I would really appreciate your feedback
I have been following your work for a while now. And I must say I enjoyed this particular tutorial more than orders, you did an absolutely beautiful teaching and I have learnt a lot more. Please will you consider doing a video on Arrays in determining swing lows and swing highs? This is one area of MQL programming I have been finding it difficult to understand. Thanks
Hello Mr. Arthur, I just wanted to say you are a great teacher and it is so useful to study your tutorial movies. Thank You very much for all your work and effort. As we are all ONE --> Giving is Receiving so you will surely benefit somehow from your hard work. Once again THANK YOU :-)
Thank you for this great tutorial, Arthur. 👍🙏 Would love you to do a similar beginners guide to MT5, highlighting the things to watch out for in MT5. I have watched one of your videos where you demonstrate how to write an EA in both MT4 and MT5, and the differences are not that great... but would be interested in hearing your thoughts on the differences between MT4 and MT5.
You are a great teacher and thanks for this RSI indicator. I would like to say that i am using RSI in line with the trendline indicator for noting when price closes below or above the Trendline. Because i prefer to enter a trade only when i have a Lower Low Lower close or Higher High Higher close candle at extreme RSI- Overbought/Oversold. Is it possible to add this part to this RSI in MT5. Meaning the same RSI codes + Candle close at lower low lower close or higher high higher close. A trendline can assist at the moment, but some time there is not trendline to be drawn only a candle that close higher or lower than previous 4-7 candles to your left
It was very useful. Gave thumb up. My feeling though is that there was some unnecessary code. The retcode thing. A lot about tickets. Return -1 and so on. Then again. I am too inexperienced. I guess I could try remove some of that code and see what will be different. Anyway. Always fun to code "together" with you.
very Helpful works fine on MT4 thank you, would've loved to have an MT5 version as I tried to convert it to MT5 but so many errors that just give me a headache :)
Hello Orchard, I am really very much thankful & appreciate your efforts to provide high quality indepth coding knowledge helping us to understand & learn MQL. However, in this RSI video seems line number 116 to 135 missing since I could not find these lines (Line number 115 shown at video time 48:51 minute but thereafter next line I could see is Line 136. Can you kindly share the missing line to help us understanding these lines as well.
Hello Sir...thank you so much...Please can you do an EA for Smoothed Heikin Ashi that can buy and sell...Also, please consider doing a complete A-Z course on MT4 Expert Adviser building on UDEMI...will gladly buy your course
Thanks for the very interactive and user-friendly training and education. Really inspired the simple way of teaching coding. I would request to develop an EA on Two RSI crossover can you plz help in this regard. The entire work and efforts will be rewarded as per the market value of the EA.
Thank you very much for this wonderful effort. Can you guide me to the language that I need to learn to be able to deal with expert advisor programming?
Hi, it seems like the download link is redirecting away from your website. Is there still a way to download the example file for reference? Much appreciated sorry I'm finding your videos so late, you are a great teacher.
There is no link to download the code. I think the links you are referring to are for downloading the metatrader platform and yes they redirect elsewhere. I don't host metatrader files.
@@OrchardForex on thanks! I must've misunderstood in the video or got this one mixed up with the MA expert video, I thought you mentioned there was a link to the example. New to coding looking for any amount of functional code to start dissecting from. All good, appreciate the response and also just wanted to make sure you knew your website was redirecting.
Hi Arthur, thank you for this awesome video! Would you kindly advice on building a EA based on RSI that would close a previously opened position (manual opened) IF RSI CROSSES level 70 and the vice versa, the EA would close an opened position IF RSI CROSSES level 30? I would opened manually and let the EA close the position (partially automated strategy), if it was opened a long position, the EA would close if RSI crosses lets say 70 line; if it was a short position the EA would close IF RSI crosses 30 line.. I'd open a position and set a stop loss (manually) and have two possible outcomes: close by the EA or by the stop loss which ever comes first. Thanks indeed and wish you a prosperous 2022!
hello teacher, thank you very much for the video. you are doing excellent work. If you'll excuse me, I had a question. I did everything. While testing, only the sales transaction is opened and the stop loss and take profit functions do not work. thank you. sorry for bad english
Check the OrderOpen function. That is where stop loss and take profit prices are calculated. You should have lines like stopLossPrice = (stopLoss==0.0) ? 0.0 : NormalizeDouble(... and the tne formula for the price, depending on buy or sell. Also make sure you have inputs with stop loss and take profit
Another great tutorial with the use of static variables. I've followed through almost all of your tutorials, particularly Framework. I've customized it to my needs and utilizing it for developing strategies for my own use. I'm finding it difficult to add Utilities code in a modular way. Not sure, if I would add it to Expert base OR Common Base, as it could be used anywhere in all kind of extensions like Signals OR Dashboard OR even in indicators. A guidance from you would be highly appreciated. Thanks.
It really depends on the utility. There is no problem with just having a function library. Not everything must be OO. If it is a utility for example lot sizing then maybe create a lot sizing class, create a sub class of expert base, and add the lot sizing class as a plugin to the expert child class. Just think about where the utility will be used.
@@OrchardForex I've a function library which stores functions like Profit (By Symbol/Magic/Buys/Sells....), OrderCount and alikes. Can you please tell me if I include this library in any class (multiple classes means it will be includeded multiple times whereever needed), In that case will it add to size OR only one copy of a function will be created after compilation (which will be good as it won't increase file size). Thanks.
@@videotalks Dpeends what you mean by include. If your library just has functions, no class name, like double MyFunc() ... then these are included only once. If you are duplicating these for each class like double MyClass::MyFunc()... then there is a copy for each class. For common utility functions you probably don't need to make them part of a class, so the first answer.
Hi Sir. Thanks for great videos. I have a question, is it possible to code buy and sell with ma and rsi in same indicator window? I want to buy when ma crosses above 50 level of rsi and vice versa. Is this at all possible?
Hey Arthur Can you please share the code? You jump around a lot and I cannot follow where you placed everything and also, it seems not all the variables are defined, etc.
my entry indicator says entry and my exit indicator says exit .so its a bug and it keeps repeating in my EA every time untill that cundle becomes candle nomber 2. how do i fix that bug please . your tutorials have been so much helpfull in journey
Tried it in the strategy tester. 9 trades in 10 years for the daily. Can that be correct? It never reaches overbought/oversold on the daily? Anyway. The main point was of course the coding and now I have done it successfully.
Awesome video! I just have one quick issue that I think you could help me with. I used some of the info provided here to create my RSI condition to add to my overall conditions. However, when I created the ticket = OrderSend () I received an error at the end of that line stating “open parentheses expected. I can’t seem to identify how I have an issue. ticket = OrderSend(Symbol(), OrderType, InpOrderSize, openPrice, 0, stopLossPrice, takeProfitPrice, InpTradeComment, InpMagicNumber);
Hi Orchard Forex, I have an issue just from the beginning. I used the setup wizard to create the outline mql5, but at the end of the MQL wizard as I press finish the metaeditor closes suddenly. But it doesn't happen when I open =>experts=>examples and any file inside of it. Could you help me with that? Thks
Thanks for this tutorial. I am trying to create ea based n bb where buy position will take place when candle stick upper lower wick crosses lower bb but body closes above lower bb only wick needs to be crossed regardless the candle bear or bull vise versa for sell order. First tp at mid bb or adjustable second tp lower or upper bb based on position type. At the moment doing this strategy in real account manually there are other rules too however, thinking to build skeleton first and later adding more rules by coding so would you please make videos on this
You have too many } or not enough {. Your function is finishing before the if. There should be more errors about unbalanced {} and in the editor settings you can turn on highlight matching {} to help.
@@OrchardForex It compiles fine until I start the if else statement. It's saying 'overbought' and 'oversold' are undeclared identifiers. How can I fix this? and thank you for replying if (rsi>50) { oversold = false; } else if (rsi
@@deandremathis1846 So the error about if expressions not allowed on global scope has been fixed. Then why do you think the 2 variables might be undeclared?
@@OrchardForex I had to really think about what you asked and it means OnTick() wasn't reading the static bool because of like you said too many {}. Thank you for your help
Hi Orchard forex, how can I run an EA on a custom timeframe? I tried running the built in Moving average EA on MT4 on an offline 2 minute chart. No trades are being made.
Real time. Thanks for your insight. I actually solved the problem by referencing global variables as signals for an EA sitting on the online chart to execute the trades.
Not much, the only actual check happening is that the input for RSI periods is > 0. The other code is really just setting variables to track the result of the test. A bit of overhead but good in a modular sense.
@@OrchardForex I have been referencing your video while creating the base for my own RSI EA. I have been getting errors in my OnInit section even when I scrap my own personal coding completely and copy everything exact. Even then I still have errors. I am not sure where I am going wrong. I am hoping for the exact coding that should be in OnInit for the EA to run. Note: I am a novice int OnInit() { //Event handler called when the expert is restarted - could be for many reasons ENUM_INIT_RETCODE result = INIT_SUCCEEDED; result = CheckInput(); if (result!=INIT_SUCCEEDED) return(result); return(INIT_SUCCEEDED); } ENUM_INIT_RETCODE CheckInput() { //Put some code here to check any input rules // I am just going to say period must be positive if (InpRSIPeriods
@@lxrdwright2013 You have asked several questions. The code shwon in the video is complete and correct and matches your code. Despite several questions you have chosen not to say what the errors are. I cannot help further.
Hi Arthur - Thank you for your videos. They are a great help as I'm trying to learn MT4 coding. I've been through this video a few times and when I set this code up in MT4 (v5.00build2376) - in the intial part where I'm putting input doubles, I'm getting errors when I go to compile (for example 'input' -unexpected token , then 'InpOverboughtLevel'- unexpected token, then '=' - unexpected token - then '80.0'-some operator expected....and so on. Just wondered what I might be doing that's causing this ....Thank you for your help.
As a guess try looking at the lines before the input line and see if one isn't terminated correctly. Manye an include without the opening or trailing < or " or a comment line that isn't right. There should be an error telling you about it but the error may not be the first error reported
@@OrchardForex Hi ..Thank you Arthur - I'll look later today. I like the RSI 80/20 on the FTSE100 (15 min) but don't take the signal until it's broken the proceeding candle low Tgt 3:1 (Stops at the most recent high of the last couple of candle highs). That's the main structural idea - It's ideal for me to get me into the trade - and I'm flexible on the exit depending general mood and candle action (i.e sometimes may be 2:1 or 1:1 or b/e) . If the stop gets taken out and the market moves higher - there's generally an indicator divergence so worth eyeing up, then you get those days when it's just hell bent iin heading in one direction ! This is what I was hoping to code in an EA if I ever achieve it !
Hello Sir I have something I'm experiencing challenges with, I have an indicator in MT5 that I would like to use as the main trigger in my EA, but this MT5 indicator only displays the price of the current pair on the data window. In this way I am not able to get a trigger that can be used to make the EA function. I have the source code for this indicator, I would just like to know what I could change/add to have 2 extra outputs in the data window. 1 buffer in the data window should != EMPTY_VALUE when the indicator has turned a certain color, while the other buffer is = EMPTY_VALUE, and vice versa.. Any help would be appreciated sir
When you refer to data window I think you mean the chart. There is a separate data window (ctrl+D). This might help ruclips.net/video/7Tr9zkclSuk/видео.html
@@OrchardForex lol no I know about the ctrl+D data window.. thats where Im looking and only see 1 value that is simply the value of the indicator buffer but it doesnt reflect any change when the indicator im working with changes color.. so I was just looking for a way to simply add 2 more buffers to that data window that might help me depict a change when it occurs on the indicator
@@jumpmanjxhnsxn7608 If you have the code then just add 2 more buffers and set the values to whatever you want. There should be enough information in the video I quoted. It sounds like the indicator you are using is doing as I show in this video where one buffer is just used for a current value, but is not showing a high or low separately.
best video on building a simple EA i have seen so far. very detailed descriptions.
Glad it was helpful!
I appreciate your work sir if you can please do a complete course for mt4 To be honest you are the most resourceful programmer for mql4 I ever saw in youtube
Best regards
Mr Arthur , you are an excellent teacher ! I started to study your tutorial movies . Best regards
Thank you
You have hit the magical pace for the video. I have understood every bit of it.
Thank you for that.
sir, really, you are not just an excellent guro, but also a very good provider of knowledge given to you from above. thank you so much for sharing this wonderful video presentation. i like it so much. and I learnd a lot. Be blessed.
Thank you very much for your support.
Hello
The courses you teach are excellent
Thanks a lot
Thank you! this video answers so many questions i had from article tutorials
Glad it was helpful!
Thank you so much. its really useful for me. I manage to build my own EA with the help of your programming tutorial. I really appreciate and want to say you that, you are great. and don't stop teaching use. I m expecting more advance level of EA programing. so that I will be thankful for you.
You are God sent, Sir! Your videos are clear and concise. Thank you
Glad you like them!
This EA example works out good and it’s really profitable but my only problem is how I can limit the maximum order number. 🙏 I would really appreciate your feedback
Very clear! Thank you for your patient explanations.
Thank you for your comments
Sr. I want to Say a Big Thanks for You!! my Respect to You, Regards from Dominican Republic, la tierra del Merengue!!!
You are very welcome
I have been following your work for a while now. And I must say I enjoyed this particular tutorial more than orders, you did an absolutely beautiful teaching and I have learnt a lot more.
Please will you consider doing a video on Arrays in determining swing lows and swing highs? This is one area of MQL programming I have been finding it difficult to understand. Thanks
Thanks, I will see where this can fit into the video shcedule.
Thanks for your excellent training courses
Thanks a lot, really appreciate all this effort. Thanks!!
Thanks a lot, mate, really appreciate the knowledge you're giving it for free.
My pleasure!
Hello Mr. Arthur, I just wanted to say you are a great teacher and it is so useful to study your tutorial movies. Thank You very much for all your work and effort. As we are all ONE --> Giving is Receiving so you will surely benefit somehow from your hard work. Once again THANK YOU :-)
You are very welcome
It was really useful for me, I hope you the best
1 year anniversery of this vid congrats bro
Thank you
Really enjoyed this video, will try to my make very own EA based on TDI
Thank you for this great tutorial, Arthur. 👍🙏 Would love you to do a similar beginners guide to MT5, highlighting the things to watch out for in MT5. I have watched one of your videos where you demonstrate how to write an EA in both MT4 and MT5, and the differences are not that great... but would be interested in hearing your thoughts on the differences between MT4 and MT5.
Think of MT5 like Windows 8
@@OrchardForex you in.yi.
@@OrchardForex h7
Please, kindly help to code RSI and MOVING AVERAGE reading together on RSI range 0 - 100
You are a great teacher and thanks for this RSI indicator.
I would like to say that i am using RSI in line with the trendline indicator for noting when price closes below or above the Trendline.
Because i prefer to enter a trade only when i have a Lower Low Lower close or Higher High Higher close candle at extreme RSI- Overbought/Oversold.
Is it possible to add this part to this RSI in MT5. Meaning the same RSI codes + Candle close at lower low lower close or higher high higher close. A trendline can assist at the moment, but some time there is not trendline to be drawn only a candle that close higher or lower than previous 4-7 candles to your left
It was very useful. Gave thumb up. My feeling though is that there was some unnecessary code. The retcode thing. A lot about tickets. Return -1 and so on. Then again. I am too inexperienced. I guess I could try remove some of that code and see what will be different. Anyway. Always fun to code "together" with you.
Remove it but most of that code is there in case things go wrong.
Great Video, Thank You!
very Helpful works fine on MT4 thank you,
would've loved to have an MT5 version as I tried to convert it to MT5 but so many errors that just give me a headache :)
Thanks a million for you invaluable content.. it's just wonderful
Glad you enjoy it!
Love your work!!!! Thank you.
Thank you too
Feeling more interest watching this series. Any training course you have?
Very very helpful. Thank you
Hello Orchard, I am really very much thankful & appreciate your efforts to provide high quality indepth coding knowledge helping us to understand & learn MQL. However, in this RSI video seems line number 116 to 135 missing since I could not find these lines (Line number 115 shown at video time 48:51 minute but thereafter next line I could see is Line 136. Can you kindly share the missing line to help us understanding these lines as well.
That's the newbar and orderopen functions already shown.
@@OrchardForex Yes, got it. Thanks a lot for your quick reply.
Can you please share a download link for this ea so that we can copy the code for learning purposes?
Hello Sir...thank you so much...Please can you do an EA for Smoothed Heikin Ashi that can buy and sell...Also, please consider doing a complete A-Z course on MT4 Expert Adviser building on UDEMI...will gladly buy your course
Thanks for the very interactive and user-friendly training and education. Really inspired the simple way of teaching coding. I would request to develop an EA on Two RSI crossover can you plz help in this regard. The entire work and efforts will be rewarded as per the market value of the EA.
Thank you very much for this wonderful effort. Can you guide me to the language that I need to learn to be able to deal with expert advisor programming?
MQL4 and the newer one MQL5
Hi , can we apprear the Rsi current level number such as 20 or 80 and sent notification via alert ?
hello sir , may i know how to cording for max trade layer for your ea.
Hi, it seems like the download link is redirecting away from your website. Is there still a way to download the example file for reference? Much appreciated sorry I'm finding your videos so late, you are a great teacher.
There is no link to download the code. I think the links you are referring to are for downloading the metatrader platform and yes they redirect elsewhere. I don't host metatrader files.
@@OrchardForex on thanks! I must've misunderstood in the video or got this one mixed up with the MA expert video, I thought you mentioned there was a link to the example. New to coding looking for any amount of functional code to start dissecting from. All good, appreciate the response and also just wanted to make sure you knew your website was redirecting.
Try this one, and maybe some that came before, there is a download. ruclips.net/video/8H_VpBat_NY/видео.html
HI Orchard, Could you please share me the file in github. I am struggling to get the file
Hi Arthur, thank you for this awesome video! Would you kindly advice on building a EA based on RSI that would close a previously opened position (manual opened) IF RSI CROSSES level 70 and the vice versa, the EA would close an opened position IF RSI CROSSES level 30? I would opened manually and let the EA close the position (partially automated strategy), if it was opened a long position, the EA would close if RSI crosses lets say 70 line; if it was a short position the EA would close IF RSI crosses 30 line.. I'd open a position and set a stop loss (manually) and have two possible outcomes: close by the EA or by the stop loss which ever comes first. Thanks indeed and wish you a prosperous 2022!
hello teacher, thank you very much for the video. you are doing excellent work. If you'll excuse me, I had a question. I did everything. While testing, only the sales transaction is opened and the stop loss and take profit functions do not work. thank you. sorry for bad english
Check the OrderOpen function. That is where stop loss and take profit prices are calculated. You should have lines like
stopLossPrice = (stopLoss==0.0) ? 0.0 : NormalizeDouble(... and the tne formula for the price, depending on buy or sell.
Also make sure you have inputs with stop loss and take profit
Another great tutorial with the use of static variables. I've followed through almost all of your tutorials, particularly Framework. I've customized it to my needs and utilizing it for developing strategies for my own use. I'm finding it difficult to add Utilities code in a modular way. Not sure, if I would add it to Expert base OR Common Base, as it could be used anywhere in all kind of extensions like Signals OR Dashboard OR even in indicators. A guidance from you would be highly appreciated. Thanks.
It really depends on the utility. There is no problem with just having a function library. Not everything must be OO. If it is a utility for example lot sizing then maybe create a lot sizing class, create a sub class of expert base, and add the lot sizing class as a plugin to the expert child class. Just think about where the utility will be used.
@@OrchardForex I've a function library which stores functions like Profit (By Symbol/Magic/Buys/Sells....), OrderCount and alikes. Can you please tell me if I include this library in any class (multiple classes means it will be includeded multiple times whereever needed), In that case will it add to size OR only one copy of a function will be created after compilation (which will be good as it won't increase file size). Thanks.
@@videotalks Dpeends what you mean by include. If your library just has functions, no class name, like double MyFunc() ... then these are included only once. If you are duplicating these for each class like double MyClass::MyFunc()... then there is a copy for each class. For common utility functions you probably don't need to make them part of a class, so the first answer.
Hello @orchardforex , how can I contact you for some assistance in fine tuning a bot? Thank you!
Hi Sir. Thanks for great videos. I have a question, is it possible to code buy and sell with ma and rsi in same indicator window? I want to buy when ma crosses above 50 level of rsi and vice versa. Is this at all possible?
Yes but it makes no sense. Just how often do you see the ma cross above or below 50?
@@OrchardForex I actually want to try looking for sells when MA is above the RSI 70 level and buys when it is below 30 level of RSI.
@@OrchardForex I would really appreciate if you could give me an idea of how to code it.
Nice work! Did you record the video for MT5? Thank you!
No this was only for MT4. I recommend MT4 as a much better product than MT5
Hey Arthur
Can you please share the code?
You jump around a lot and I cannot follow where you placed everything and also, it seems not all the variables are defined, etc.
my entry indicator says entry and my exit indicator says exit .so its a bug and it keeps repeating in my EA every time untill that cundle becomes candle nomber 2. how do i fix that bug please . your tutorials have been so much helpfull in journey
Sounds like you need to only process on new bar. Just check if (!NewBar()) return;
34:15 I don't understand why oversold and rsi>inpoversoldlevel can occur simultaneously. Thanks!
oversold is a flag that was set earlier when rsi
@@OrchardForex thanks!
Tried it in the strategy tester. 9 trades in 10 years for the daily. Can that be correct? It never reaches overbought/oversold on the daily?
Anyway. The main point was of course the coding and now I have done it successfully.
You can change the overbought and oversold levels but the point here is the coding, not the expert.
Awesome video! I just have one quick issue that I think you could help me with. I used some of the info provided here to create my RSI condition to add to my overall conditions. However, when I created the ticket = OrderSend () I received an error at the end of that line stating “open parentheses expected. I can’t seem to identify how I have an issue.
ticket = OrderSend(Symbol(), OrderType, InpOrderSize, openPrice, 0, stopLossPrice, takeProfitPrice, InpTradeComment, InpMagicNumber);
OrderType is a reserved function name. If you are using the function then it should be OrderType, otherwise change the variable name
Is this code available for download pls?
Hi Orchard Forex, I have an issue just from the beginning. I used the setup wizard to create the outline mql5, but at the end of the MQL wizard as I press finish the metaeditor closes suddenly. But it doesn't happen when I open =>experts=>examples and any file inside of it. Could you help me with that? Thks
Sounds like your copy of metatrader is broken. I suggest downloading again from your broker and installing fresh.
i try to rewrite the EA but am having error code, please can you help to take a look atit
I can't give any help unless you supply the error and the line of code where you get the error.
@@OrchardForex sir, have you seen my reply
Thanks for this tutorial. I am trying to create ea based n bb where buy position will take place when candle stick upper lower wick crosses lower bb but body closes above lower bb only wick needs to be crossed regardless the candle bear or bull vise versa for sell order. First tp at mid bb or adjustable second tp lower or upper bb based on position type. At the moment doing this strategy in real account manually there are other rules too however, thinking to build skeleton first and later adding more rules by coding so would you please make videos on this
Several concepts here. I'll have to consider how they could be added to a tutorial.
I am having an error "iRSI wrong parameters count"
double rsi = iRSI(Symbol(), Period(), InRSIPeriods, InpRSIPrice, 1);
and "OrderSend wrong parameters count"
ticket = OrderSend(Symbol(), orderType, InpOrderSize, openPrice, 0, stopLossPrice, takeProfitPrice, InpTradeComment, InpMagicNumber);
These are both correct. Possibly one of the variables is the wrong data type but otherwise this looks correct. Compare them to the help for each.
@@OrchardForex yes i found the error I was using it on mt5 platform my bad
@@OrchardForex why does expert advisor isn't working with XAUUSD pair?
I keep getting the error in the compiler 'if' - expressions are not allowed on a global scope
You have too many } or not enough {. Your function is finishing before the if. There should be more errors about unbalanced {} and in the editor settings you can turn on highlight matching {} to help.
@@OrchardForex It compiles fine until I start the if else statement. It's saying 'overbought' and 'oversold' are undeclared identifiers. How can I fix this? and thank you for replying
if (rsi>50) {
oversold = false;
} else
if (rsi
@@deandremathis1846 So the error about if expressions not allowed on global scope has been fixed. Then why do you think the 2 variables might be undeclared?
@@OrchardForex I had to really think about what you asked and it means OnTick() wasn't reading the static bool because of like you said too many {}. Thank you for your help
Hi Orchard forex, how can I run an EA on a custom timeframe? I tried running the built in Moving average EA on MT4 on an offline 2 minute chart. No trades are being made.
Real time or strategy tester? I think you will have problems with the strategy tester.
Real time. Thanks for your insight. I actually solved the problem by referencing global variables as signals for an EA sitting on the online chart to execute the trades.
Hi I am getting errors for my Init section
Can you go over or confirm what was in that section?
Not much, the only actual check happening is that the input for RSI periods is > 0. The other code is really just setting variables to track the result of the test. A bit of overhead but good in a modular sense.
@@OrchardForex Can I have an example of what that looks like please?
@@lxrdwright2013 Yes, it's in the video 13:46
@@OrchardForex I have been referencing your video while creating the base for my own RSI EA. I have been getting errors in my OnInit section even when I scrap my own personal coding completely and copy everything exact. Even then I still have errors. I am not sure where I am going wrong. I am hoping for the exact coding that should be in OnInit for the EA to run.
Note: I am a novice
int OnInit() {
//Event handler called when the expert is restarted - could be for many reasons
ENUM_INIT_RETCODE result = INIT_SUCCEEDED;
result = CheckInput();
if (result!=INIT_SUCCEEDED) return(result);
return(INIT_SUCCEEDED);
}
ENUM_INIT_RETCODE CheckInput() {
//Put some code here to check any input rules
// I am just going to say period must be positive
if (InpRSIPeriods
@@lxrdwright2013 You have asked several questions. The code shwon in the video is complete and correct and matches your code. Despite several questions you have chosen not to say what the errors are. I cannot help further.
400 moving average, very good for ea
please send the ex4 file
Hi Arthur - Thank you for your videos. They are a great help as I'm trying to learn MT4 coding.
I've been through this video a few times and when I set this code up in MT4 (v5.00build2376) - in the intial part where I'm putting input doubles, I'm getting errors when I go to compile (for example 'input' -unexpected token , then 'InpOverboughtLevel'- unexpected token, then '=' - unexpected token - then '80.0'-some operator expected....and so on.
Just wondered what I might be doing that's causing this ....Thank you for your help.
As a guess try looking at the lines before the input line and see if one isn't terminated correctly. Manye an include without the opening or trailing < or " or a comment line that isn't right. There should be an error telling you about it but the error may not be the first error reported
@@OrchardForex Hi ..Thank you Arthur - I'll look later today. I like the RSI 80/20 on the FTSE100 (15 min) but don't take the signal until it's broken the proceeding candle low Tgt 3:1 (Stops at the most recent high of the last couple of candle highs). That's the main structural idea - It's ideal for me to get me into the trade - and I'm flexible on the exit depending general mood and candle action (i.e sometimes may be 2:1 or 1:1 or b/e) . If the stop gets taken out and the market moves higher - there's generally an indicator divergence so worth eyeing up, then you get those days when it's just hell bent iin heading in one direction !
This is what I was hoping to code in an EA if I ever achieve it !
can i use this in real account?
this will work in a live account, but this is an example and you must be aware of the risk of running this in a live account.
How I can contact you?
You can try the email on out contact page www.orchardforex.com/contact
Any US based developers out there? Do I need a license or any special tax preparation when selling EA, Indicators etc on MQL5?
The reason I watched it untill the end is because of explaining each line as you go...I'm not like that😂😂copy that
Thank you. That's good to hear.
Hello Sir I have something I'm experiencing challenges with, I have an indicator in MT5 that I would like to use as the main trigger in my EA, but this MT5 indicator only displays the price of the current pair on the data window. In this way I am not able to get a trigger that can be used to make the EA function. I have the source code for this indicator, I would just like to know what I could change/add to have 2 extra outputs in the data window. 1 buffer in the data window should != EMPTY_VALUE when the indicator has turned a certain color, while the other buffer is = EMPTY_VALUE, and vice versa.. Any help would be appreciated sir
When you refer to data window I think you mean the chart. There is a separate data window (ctrl+D). This might help ruclips.net/video/7Tr9zkclSuk/видео.html
@@OrchardForex lol no I know about the ctrl+D data window.. thats where Im looking and only see 1 value that is simply the value of the indicator buffer but it doesnt reflect any change when the indicator im working with changes color.. so I was just looking for a way to simply add 2 more buffers to that data window that might help me depict a change when it occurs on the indicator
so I can use that as the main trigger for my EA, I dont know if you could help me with it, could I send you the mql5 file for the indicator?
@@jumpmanjxhnsxn7608 If you have the code then just add 2 more buffers and set the values to whatever you want. There should be enough information in the video I quoted. It sounds like the indicator you are using is doing as I show in this video where one buffer is just used for a current value, but is not showing a high or low separately.
@@OrchardForex Okay Thank You, The video does have the answers I'm looking for !
Direct no non sense teaching