Mql4 reference смотреть последние обновления за сегодня на .
🤍 With MQL4 for Metatrader4 we create an Expert Advisor that can pass an array as a parameter to a user defined function - by reference. In this video, we are going to create an Expert Advisor that is able to pass a complete array as a parameter to different function. So let’s find out how to do that with MQL4. To get started, please click on a little icon here or press F4 on your keyboard. Now you should see the Metaeditor window and here you want to click on file. New file, Expert Advisor from template, continue. I will call this file simple array reference. Click on continue, continue and finish. Now you can delete everything above the ontick function and the two comment lines here. We start by creating a small array. This is an integer array and we want to fill our array with a few numbers. Please keep in mind that the first array item is always index zero. These array items are like boxes and we assign values to these boxes. This is just for a simple example and it’s a good idea to create small little programs like this one to find out how things work, because now we want to find out if we are able to pass our array as a parameter to a user defined function that is called add values. This function doesn’t exist so far, so we need to create it in a few seconds and we will get a returned result. So let’s create a chart output here. By using the comment statement. It will output the text the returned result is followed by the result that we have created, but this function doesn’t exist so far. So we need to create it now and our function will be called add values and it will get to the array as a single parameter. And we are using this little trick here. This is for INT Integer and this little ampersands symbol is used for references, so now we can try to add a few values by adding the array indexes zero, one and two, and finally we use the return statement to return the result to the main function, and that’s about it. Well, if you have no idea what all the code here does or if this was too fast for you, maybe you want to watch one of the other videos in this basic video series. And on our website, you can now find a link for basic courses that also contain the source codes for this basic video stuff. There is also the link for the Premium Course. This was another idea of a Premium Course member. And if you are already a Premium Course member and have an idea for a video like this one, please let me know. For now, please click on the Compile button or press F7 on your keyboard, that should work without any errors. And if that is the case, you can click on a little button here or press F4 to go back to Metatrader. And in Metatrader we click on View, Strategy tester or press Control and R. Please pick the new file simple array reference dot EX4. Enable the visual mode here and start your test. Here is the Expert Advisor, and it says the returned result is fifty six. So now let’s go and check the source code. We have added up eight and 16. So this would be 24. The third item here is thirty two. And if we add all three items, the result is fifty six. So let’s actually add another value here for index three. Now recompile the code, stop the current test and restart it. And this time it says that the returned result is one hundred and twenty. And in this little video, you have learned how to add up all the elements of an array that we have passed by a reference, and you have coded it yourself with a few lines of MQL4 code.
In this video you will learn how to make our dll pass variables 'by reference' and have the dll change the values in memory. It's not as confusing as it sounds. Give it a look if you've watched the previous video below. Learn mql4 coding at 🤍 Previous video you need to watch first. 🤍 Video from last year about passing by reference. 🤍 To download the video and the files subscribe here: 🤍
*Complete MT5 Programming Course: 🤍 *Recommended Broker: 🤍 *Free Trading Journal: 🤍 FTMO Funded Trading: 🤍 myForexFunds Funded Trading: 🤍 *These Links redirect to my webpage where you can find free or paid products and lots of useful information. These Links are Affiliate Links. If you use this link you can support the channel because I will receive a commission form the company. You do not have any disadvantages of course! Learn about the benefits of automated trading. After programming trading strategies for a while I started teaching how to program expert advisors for the MT4 (MetaTrader 4) and MT5 (MetaTrader 5). Until now I only did videos in German but now I will start this channel with English videos to reach a larger audience of traders and help them improve their trading. There will be no fake trading on this channel and no lies. I show trading as it is - the good and the bad sides. Stay tuned and subscribe because you don't want to miss ;) Instagram: 🤍 Trading in derivative products such as futures, options, CFDs, Forex and certificates involves a considerable risk. These products are not suitable for every investor. Investors could potentially lose all or more of the original investment. If anything, only money that equals personal risk capital and can be lost without jeopardizing financial security or lifestyle should be used. Partially or fully automated trading programs can only be used to support the trader. Past performance is not an indication of future results.
Mql4 Programming Tutorials and Forex Trading Training. 🤍 Learn to trade here. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Be a supporter: 🤍 Structures are very similar to classes.. Kind of the step between enumerations and classes if you will. Hopefully after this video you will understand how to write your own new data types using structures.. Thank you patreon patrons..
In answer to a question on why & is used in functions and how the const keyword affects it. Free downloads for Metatrader 4 and 5 MT4: 🤍 MT5: 🤍 Follow our regular market updates: Web: 🤍 Twitter: 🤍 Facebook: 🤍 Telegram: 🤍
This video shows how to use a file to set inputs for your expert or indicator. You might use this if inputs are being set by an external application or to remotely update settings on your VPS expert See the Orchard blog post at: 🤍 To download the Metatrader 4 and 5 platforms and open demo accounts MT4: 🤍 MT5: 🤍 Related Videos and Playlists MQL5 video: 🤍 Do you want to suggest or vote for a topic? 🤍 Web: 🤍 Twitter: 🤍 Telegram: 🤍 00:00 - Start 00:11 - Introduction 01:16 - Donchian Channel Indicator 09:47 - Donchian Channel Demo 10:45 - Mods to read from file 26:32 - Demo from file 27:54 - Conclusion
When you use iCustom in your experts or indicators how do you avoid problems when the indicator you expect to be there isn't? Free downloads for Metatrader 4 and 5 MT4: 🤍 MT5: 🤍 Follow our regular market updates: Web: 🤍 Contact: 🤍 Twitter: 🤍 Facebook: 🤍 Telegram: 🤍
🤍 With MQL4 we can Code a custom function when we need one for our Expert Advisor. In this Video we are going to create a function, double a value and return it to the main function... In this video we are going to create a custom function, in our case the function will double a value each time when the price changes so let's find out how to do that. First we want to click on a little icon here or press a F4 in Metatrader and now you should see the Metaeditor window and here you want to click on: “File/ New/ Expert Advisor (template)” from template, “Continue”, I will call this file: “SimpleFunction”, click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function and the two comment lines here. First we want to create a static variable for the counter, it will be called: “counter”, it's an integer (int) variable and the modifier: “static” is used to declare a local variable. A local variable is only available inside of one function, when you highlight the word: “static” and press F1 you will see that the “MQL4 Reference” says that the storage class of “static” defines a static variable, the static modifier is indicated before the data type and it exists throughout the function lifetime. Now we want to call an external function to double the value, the function we call will be named: “DoubleTheValue” (double the value) and we will pass the “counter” from the static variable here. Let’s create an output for the current value by using the “Comment” function, it will output the words: “Counter Value” and the current value of the “counter” on our screen but if we compile the code right now we will get an error that says that the double the value (DoubleTheValue) function is not defined, so let's create that function. The first thing is always to define what kind of value will be returned by the function, in our case we are going to double whole numbers, so we will return an integer value (int), this is the name of the function, I have called it: double the value (DoubleTheValue) but you could use any other name and inside the round braces here we pass the value of the “counter” to the new function, here is where we pass it when we call the function: double the value (DoubleTheValue) and here is where we get the value inside of the function and you can see that we use another name here, you don't need to call it “counter” because this is just the value of the “counter” that has been passed here. Let’s add two curly braces so this would be the declaration of the custom function but when we compile now we will see that “not all control paths return a value” and that is because we didn't do anything inside of the function and we have not returned a result, so let's take the counter value (CounterValue), multiply it by 2 and store the result in a new variable called: double value (DoubleValue) and afterwards we are going to return the result by using the “return” command, actually it's a “return operator”, it terminates the current function execution and returns the control to the calling program and that's about it. So let's compile the code one more time, now you should not get any errors and no warnings and if that is the case you can click on the little button here or press F4 to go back to Metatrader. And inside of Metatrader we want to click on: “View/ Strategy Tester” or press CTRL and R, please pick the new file: “SimpleFunction.ex4”, enable the visual mode here and start a test and now you should see the counter value and a doubled value that comes up every time the price changes, this is a very simple example we only do one thing inside of the custom function and we only pass one parameter, you could perform much more complicated stuff but in this short video you have learned how to create a custom function with MQL4 and you have done it yourself with a few lines of MQL4 code.
This video teach you how to program MQL language in order to create objects in chart, and how to use Mql4 ObjectCreate and ObjectSet in your coding, in order to print text objects in your chart. With MQL4 we create an indicator to draw an object on the chart, in this case it will be a simple text on the chart. If you learn MQL4 and you master how to program MQL4 programming language then you will be a better trader, you will be able to create different objects and shapes in your chart as drawing lines, arrows, rectangles, text etc. With MQL language you will be able to automate your daily trading. With this MQL tutorial you will be able to create your free automated software, algorithmic trading, your automated app as well as automated strategies, you will make much more profit with less time, and less effort. I invite you to follow this tutorial and the coming tutorial in order to master the MQL4 programming language. Even you are a beginner, this MQL4 tutorial will make you better than other traders, this mql4 course is dedicated for beginners. PLEASE SUBSCRIBE TO OUR CHANNEL TO GIVE US THE MOTIVATION TO GROW THE CHANNEL AND HELP MORE PEOPLE. THANK YOU :) 🤍 #Mql4 #Mql #Mql4tutorial #Mt4 #learnMql #learnMql4 #HowtoprogramMQL4 #HowtoprogramMQL
🤍 With MQL4 for Metatrader4 we create an Expert Advisor to calculate the long term trend with an SMA crossover EA ...
🤍 With MQL4 for Metatrader4 we can create an Expert Advisor (a program for automated trading in MT4) that is able to automatically do what humans can do. In this video we are going to create a very simple EA by using the default template... In this video we want to talk about the MQL4 template that is used to create a basic Expert Advisor and we also want to talk about the content inside of that template. An Expert Advisor is an automated program that is able to do everything that humans also could do. This is one of those Expert Advisors, its trading right now; it is able to open and close positions without any human interaction and to create one of those Expert Advisors you would click on this little icon here or press F4 on your keyboard. This is the programming environment that comes with Metatrader 4 and MQL4 and to create a new Expert Advisor we can use the wizard, we just need to click on: “New/ Expert Advisor (template)” from template, now we click on “Continue”, I will call this version: “SimpleEATemplate”, click on “Continue”, “Continue” and “Finish”. And here is our template! The upper part contains some information about the name of the template, the copyright and the website that we have provided in the process, these double slashes are comments, so everything that comes behind double slashes is ignored by the complier it’s just for us humans to make things more readable Here we have some properties for the copyright, the link, the version and there is also a property called: “strict”. If you mark the property expression and hit the F1 key you will see the help file and it will explain that a property is additional and it’s a specific parameter. For example “strict” means that the compiler should use the strict compilation mode, the copyright property would be used for the company name and so on. Inside of the template you will find an “OnInit” and an “OnDeinit” and an “OnTick” function. These are built-in functions, let’s mark “OnInit”, press F1 and we learn that the “OnInit” function is used for initialization because it’s the first thing that is running as soon as we start our Expert Advisor. “OnDeinit” is the function that will run before you close your Expert Advisor; you can use it to clean up before you close your Expert Advisor. The most important function is the “OnTick” function because this one will run every time when a new tick for a symbol is received and that is always the case when the price changes. You will find further functions like: “OnTimer” and “OnTester”, if you are interested just open the MQL4 reference by pressing F1. For our simple example we can remove everything above the “OnTick” function because this one is the one that is most interesting, we can also remove the two comment lines here and everything between the two brackets here will be executed each time when the price changes. Right now you could click on the “Compile” button here and you would already have a working version. So far it doesn’t do very much; we are going to change that in the next few videos. In this video you have learned how to create a new empty Expert Advisor that is created from a template and you have done it by generating a template with a few lines of MQL4.
🤍 With MQL4 for Metatrader4 we create an Expert Advisor to create a button object on the chart that can be used as a buy button - because we also will create the event handling for the button... In this video we are going to create a simple buy button object directly on the chart, so let’s find out how to code that with mql4. To get started please click on a little icon here or press F4 on your keyboard, now you should see the Metaeditor window and here you want to click on file, new file, expert advisor from template, continue, I will call this file, simple buy button, click on continue, continue and finish. Now you can delete everything above the ontick function and the two comment lines here. Inside of the ontick function, we are going to use object create, this will create an object of a defined type. The first parameter is for the current symbol on the chart, the second parameter is the name, the third parameter is obj underscore button if you mark that and press F1 you will see that we have lots of different object types and this is the one we are going to use, it will place a button on your chart. The next parameter here is the window, we would like to have the button in front of the candles that’s window zero. If you would use an oscillator like the MACD that would create a separate window below window zero, that would be window one but let’s place the button on the main chart, we have no values for the date time and for the price because we are going to set the placement for our button by setting a few properties now. To do that we use object set integer for the current symbol on the chart, the second parameter is the name of the object, in our case, it’s the buy button, the property that we want to change is object property x distance and we will set it to two hundred pixels. Afterwards, I would like to change the width, so let’s repeat that object set integer for the current symbol on the chart, the name of the object is the same, this time we are going to change a different property, this is called object property x size, let’s set that also to two hundred pixels. To set the distance from the upper or the lower border we repeat the whole thing that we have done here but this time we change the property object property y distance, let’s set that also to two hundred pixels. Of course, we also need to define the button height that’s done by using obj properties y size, and I have used fifty pixels here. We can pick one of four corners for our button that is done by changing obj property underscore corner in my case I have chosen corner three and to make the button useful we need to set some object property text. Let’s remove the bracket here because this is for the end of the function. Now you could actually compile the code but the button wouldn’t do anything and to change that we need to add some event handling, therefore, we need to use a predefined function that is called on chart event. It uses several parameters. The first one is for the event id and the other parameters are used to pass values depending on the object type. Let’s find out what kind of event happened and to do that we check if the id equals chart event underscore object underscore click. If you mark that one and press F1 you will see that we have lots of different events, for example, key down for the keyboard, this would be a click on the chart but we need this one because we want to find out if the object was clicked. That’s where we can use the sparam value because it will pass the name of the object, in our case it’s the buy button, so let’s create a comment statement that will output the value for the s parameter, so it should say buy button was pressed and afterwards we use order send for the current symbol on the chart to open a buy position for ten micro lot, so please don’t do that on your real account, use a demo account. You can create one from right inside of Metatrader and one more thing, the on chart event will not work in the strategy tester, so you actually need to drag the expert advisor onto a real chart. Let’s close the if statement and the function and that’s about it. If this was too fast for you or if you have no idea what all the code here does maybe you want to watch one of the other videos in the basic video series or maybe even the premium course on our website might be interesting for you. This actually was another suggestion from a premium course member and if you are already a premium course member and have ideas for videos like this one just send me an email but for now please click on the compile button, I don’t have any errors and if that is the case you can click on a little button here or press F4 to go back to Metatrader. And in Metatrader please make sure that you are on the demo account, please open an empty chart, look for the new file simple buy button in the navigator window and drag it on the chart.
When passing ANSI or Unicode Strings to our mql4 Dll we must be careful about managing memory leaks. What's a memory leak you ask? It is bits of code left in memory that builds up and crashes our computer. This video will explain how to prevent this and also how to pass ansi chars.. and unicode shorts back and forth to our dlls.. Thank you patrons.. remember to hit that thumbs up!.. or down... Learn Mql4 Programming at 🤍 Learn to trade here. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Support the Channel and download videos and files at... 🤍 and/or...Be a supporter: 🤍 Subscribe to the 2013 archives and download all of the videos and files. 🤍 Please like, share, and subscribe and click the notification bell. 🤍
🤍 If we want to check several timeframes, it would be obviously a lot of work to create a separate module for each time frame so we want our module to handle all the time frames and we don’t want to recode it every time. And, we want people to be able to change the time frame in the expert advisor properties. Please hit the F4 key to bring up Meta Editor and remove every occurrence of the time frame value. So now, we would call our module CheckAnyTrend. And we would now declare a variable called extern double TrendFrame with the value of 10080. If you mark the word extern, and hit the F1 key, you will see in the MQL4 reference that external variables are available from the properties window. In the OnTick function, we want to call the CheckTrend function and handover the value TrendFrame to calculate the trend. Now, I open the CheckTrend MQ4 file and save it with the name CheckAnyTrend.MQ4. Right here, within the round brackets, it will receive the double value TrendFrame and it will now use the value TrendFrame to calculate the trend. So we have no fixed numbers anymore and now, we would be able to use our module for each and every time frame. Don’t forget to save it, and I will also give the main expert advisor a new name. The compilation succeeded but we got warnings. The reason is: The iMA function expects an integer for the time frame and we have used the double value. We are going to fix this in the next part. For now, hit the F4 key, select the new expert advisor and hit the Start button. Okay it works. In fact, the double value is more accurate than an integer value. This is the reason it says it’s a possible loss and it’s a warning so you should correct it, but you don’t absolutely have to, everything you absolutely have to correct would have created an error over here
🤍 With MQL4 for Metatrader4 we create an Expert Advisor to allow or disallow trading based on a start time and a stop time. We are using datetime to get the current time and allow or disallow automated trading. In this video we will create a filter that is going to allow or disallow trading based on the current time so let's find out how to do that with mql4. To get started please click on a little icon here or press F4 on your keyboard. Now you should see the Metaeditor window and here you want to click on file, new file, expert advisor from template, continue, I will call this file, simple time filter, click on continue, continue and finish. Now you can remove everything above the ontick function and the two comment lines here. We start by creating an input string for the start trading time, this one is set to 9:00 am but I will change it to 1:00 am in this case, the input modifier will allow any user to change the values in the expert properties tab without any recompilation, we also need a stop trading time, this is set to 10:00 am so trading will be allowed between 1:00 am and 10:00 am, obviously we need to find out if the current time is between those two timestamps, so let's create a variable current time, and finally, we want to allow or disallow trading that's done with this variable, trading is allowed, it's a bool so it can either be true or false. Inside of the ontick function, we start by getting the current time that's a datetime variable and we are using the function time local, so let's mark that and press F1 and we learn that it returns the local time of the computer where the client terminal is running so that's your PC and in the next step we use time to string to convert the time that we have calculated, we want to use a special format called time underscore minutes, let's mark that and press F1 and now you see that we will get this format, hours and minutes divided by a colon. To check for the entry conditions we are going to use a function that is called check trading time and if the return value is true we consider to open a position, this function doesn't exist so far so we need to code it later on. The second entry condition will be if orders total returns a value of zero so this is true when we have no open orders or no open positions and if both conditions are true we are going to use order send to buy ten micro lot. Obviously, you wouldn't do that on a real account you would add other things like entry signals from an indicator or something like that but for this simple example, it's good enough. Let's add a chart output the comment statement will output if trading is allowed, the current time, the start trading time and the stop trading time that we have defined but now we need to create this function here, it is called check trading time and it's boolean so it can either return true or false. In mql4 that will be represented by zero for false and one would be true and to set the trading allowed variable we are going to look into the current time, we are using string substring to find a certain value and the value that we are looking for is the start trading time, let's mark that and press F1. String substring has an original string and we are going to look for the value inside of the string, the starting position in our case is zero, the second parameter is for the length of the substring, in our case it's five and if we can find the defined start trading time within the current time we will set the trading is allowed variable to true. Otherwise, if the current time contains the defined stop trading time we would set the trading is allowed variable to false. Finally, we use the return statement to return the trading is allowed result to the main function and that's about it. If this was too fast for you or if you have no idea what all the code here does maybe you want to watch one of the other videos in this basic video series first or maybe even the premium course on our website might be interesting for you. This was another suggestion that came from a premium course member and if you are already a premium course member and have an idea for a video like this one please let me know. For now, please click on the compile button or press F7 on your keyboard you shouldn't get any errors here and if this is the case you can click on a little button here or press F4 to go back to Metatrader. And inside Metatrader we click on view, strategy tester or press control and r, please pick the new file simple time filter dot ex4, mark the option for the visual mode here and start your test. Here we are! The current start writing time is 1:00 am so within a few seconds we should see the first position right here on the chart and the filter should switch to one, that happened right now, now let's click on stop, go to the expert properties and we are going to change the start reading time here, restart the test and this time we should see the first trade
Ever wonder how to CREATE and then WRITE to or READ from a file using mql4 programming? In this video I will use the file writing and file reading functions to save parameters so that our indicator will open the way that it was left when closed. You will learn how the FilesExist, FileOpen, FileClose, FileWrite, FileReadNumber and FileReadString functions work. To learn Mql4 Coding go to 🤍 To download this video and the file written please subscribe to the archives. 🤍 I hope you are able to use this basic information in your projects. A special thanks go to my patrons who help support me and those subscribed to the archives. If you have not already subscribed, please do so and choose to get notified by clicking the bell. Merely subscribing will NOT let you know when I release a new video. I'm not sure why... It seems that is what subscribing would mean doesn't it? LOL.. Become a patron if you like at 🤍 Learn to trade here. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Subscribe to the 2013 archives and download all of the videos and files from 2013 🤍
In this part of the series I demonstrate a simple but useful class to use as a dashboard display, either from an indicator or expert advisor. The dashboard contains the elements to display text on screen with the application creating the content. Future parts will extend on this to include: * Error handling and additional features * An alternative dashboard approach * Viewing the dashboard remotely (useful for monitoring a VPS) * Development of more complex on screen indicators using object oriented techniques * Development of an expert advisor using object oriented techniques The code developed in this video is available for free download at : 🤍
MQL5 includes an OnTrade event that fires when a trade change happens. This code will show you how to implement something similar in MQL4 Downloading the code The code shown in the video is available to our premium discord members. Premium membership is a monthly subscription. To join our discord server and download this and other code 🤍 Free downloads for Metatrader 4 and 5 MT4: 🤍 MT5: 🤍 Follow our regular market updates: Web: 🤍 Twitter: 🤍 Facebook: 🤍 Telegram: 🤍 Discord: 🤍
🤍 Get Your Free Membership Now! We have already discussed how to open and close market orders through a FOREX robot. Today we will learn how you can get your Algorithmic Trading system to adjust market orders. In order to do this you will need to use the OrderModify() function. Modifying market orders is used to adjust the StopLoss (e.g. trailing stoploss), TakeProfit, and other parameters of the orders. In many trading systems it is imperative to modify existing market orders and that is why I have included this topic in this basic course. If you enjoyed this tutorial, then don't put it off and sign up for your FREE membership at the ForexBoat Trading Academy today: 🤍
This is a MACD indicator programming video on MQL4. This is a basic programming video for beginners in MQL4. I go over how to program in detail a MACD step by step. This is very basic and can lead to more complicated formulas. Please use the data so you can build upon and make your own formulas better. This will be part of a guide in a programming MQL4 series. The data or formula for this is in my email if you want it please go to my website and send me an email there and I will send it to you. YouTube doesn't allow me to paste it in here for some odd reason. In the video this is my first attempt in creating a programming guide so please understand and give me feedback on the video. I will create more as I go that will be more in depth in this MQL4 guide. - If you enjoy this video, please like and share this video. Don't forget to subscribe to this channel for more updates. Stay Tuned. Check out my programming services, create indicators and trading Robots for clients 🤍 Check out other information about trading and investing at my website 🤍 If you are looking for a custom made trading robot, indicator, script or program check out my fiverr 🤍 Join my Telegram group to get access to myself and important Updates 🤍 Forex Trading account join start today 🤍 ???If you want a 1 free share of stock company click this below!??? 🤍 Get free $10 worth of crypto making and funding a Coinbase Account 🤍 helpful information for the video forex, macd, macd indicator, forex trading, expert advisor, mt4, macd indicator explained, mql4, automated trading, macd trading strategy, macd strategy, metatrader 4, algo trading, ea,trading strategy, trading robot, mql4 tutorial, forex robot, indicator, mql4 programming tutorial, programming, macd explained, moving average, macd indicator strategy, macd indicator mt4, macd forex, macd trading, technical analysis, macd forex trading strategy, how to trade forex, macd indicator mql4 programming, mql4, mql4 tutorial, mql4 example, macd example, macd strategy, macd automated, automate macd, automate metatrader, mt4, mt4 ea, mt4 expert advisor, algo trading, trading strategy, learn mql4, mql4 lessons, howto macd, howto metatrader, howto mql4, algo trader, trading bot, trading robot, forex, trading, forex trading, mql4 book, mql4 reference, mql4 teacher, mql4 forum, mql4 tutorial, mql4 example, macd example, macd strategy, macd automated, automate macd, automate metatrader, algo trading, trading strategy, learn mql4, mql4 lessons, howto macd, howto metatrader, howto mql4, algo trader, trading bot, trading robot, forex, trading, forex trading, mql4 book, mql4 reference, mql4 teacher, mql4 forum, mql4, mql4 tutorial, mql4 example, macd example, macd strategy, macd automated, automate macd, automate metatrader, trading strategy, learn mql4, mql4 lessons, howto macd, howto metatrader, how to mql4, algo trader, trading bot, trading robot, forex, trading, forex trading, mql4 book, mql4 reference, mql4 teacher, mql4 forum,
🤍 In this video, I would like to show you something that I think is very helpful. And right now you see that I'm doing backtests in MetaTrader 5. Because MetaTrader 5 is able to to do that. And it's very fast because MetaTrader 5 does support multicore processing. Each of my CPU cores can now do 25 tasks, as I am right now doing 101 complete backtests. And when you watch the results here, you will see that we have profits, and each of those tests has a different amount of total trades and a different expected payoff and a different result. And that's because I'm doing it with random entries. Now you might ask yourself, why should anybody use a random entry to do tests? Well, actually, this is a good way to find out if your system works, because not the entry is the most important component. It's rather how you react. And it doesn't make sense to make decisions based on a handful of open positions. So you can see in each of these 101 test series, I have about 3000 total trades. I'm running the test for a whole year. I do it often and this one gave us good results. This is the one that I did before. Those results are also okay as we have no losses. But there are times when you will see spikes like this one. This is a drawdown in the middle of the year. And as I said, in the beginning, you have to define the time span. In my case, it starts on the 1st of January and it ends at the last day of the year. And this drawdown is right in the middle of the year. So the system has time to recover. But what do you think would happen if I said that the backtest should end on September 16th? Well, I think you would be less satisfied with the results because that would have been a loss. And this is where people actually give up. Because when you see something like this happen on a real account, you will be convinced that all that trading stuff doesn't work, and you will be sure that the system will never recover again. And those back tests here, actually, yes, they take time, but they don't take much work. The only thing I do is to pick the next currency pair here. Click on Start. Now I see that the four cores are going to work. Here is the status, and now we see the first results. Each green point here represents a profit, but it doesn't mean that it needs to always be a profit, just with a few changes in the system. For example, here in the risk percentage value, I could easily modify the system in a way that it only produces losses. And that's why I think that the best idea to invest time is to do mass testing like I do with this system. Metatrader 5 is able to automatically import all the historical data that is needed for a test. And by now we have made 86 out of 101 tests so far. It looks good for this currency pair. Now this test series is finished. This time we have about two and a half thousand trades for each test. The drawdown looks very good. That isn't always the case. And if you think that 24% is too high, you might want to adjust the settings for your own needs. It really depends on your risk tolerance and your account type. My account type is good for up to 70% drawdowns as my broker has low margin requirements. Let's do another one. I have not modified any settings but you really need to find out if the currency pairs you trade will work and I go with the ones that produce good results and I leave out the ones that produce bad results. I always do backtests for at least one year. And when I'm done with all the currency pairs that I trade I will start right over with the year 2020, do 101 tests for each of these currency pairs. And afterwards I will do the same thing for 2019! And that's how you can do hundreds and hundreds of tests on a single rainy afternoon if you use meter MetaTrader 5. I have to admit I wasn't willing to change from MetaTrader 4 to meter MetaTrader 5 for a long time. But this mass testing ability and the fact that historical data is imported automatically really saves a lot of time. And we can get a lot of real trading experience in a fraction of the time you would need otherwise. So if you would like to see results like this one, I think you should at least try MetaTrader 5 and do this mass testing thing. It's not very hard to set it up. I have some other videos about it. In this video we have done 1, 2, 3, 4 different currency pairs so far. The results look good. Thank you for watching. And I will see you in the next video.
How to create a trading robot on MQL4 / MT4 using the Trendwave indicator. This is a basic programming video for beginners in MQL4. This is a how to program video using MQL4 language. I go step by step in how to create a simple and basic trading robot that can execute buy orders and exit those same orders. The code for the video is in the pin comment also on my website. This information can be combined with other indicators and trading robots since the code is easy and very flexible for beginners. Thank you for watching and please Like, Share and Subscribe! Please check out my website for more about trading, politics, business and money! 🤍 Join our Telegram group for updates and access to myself 🤍 If you are looking for a custom made trading robot, indicator, script or program check out my fiverr 🤍 Check out my programming services, create indicators and trading Robots for clients 🤍 ???If you want a 1 free share of stock company click this below!??? 🤍 Get free $10 worth of crypto making and funding a Coinbase Account 🤍 Subscribe now: 🤍 ?? RECOMMENDED VIDEOS ?? ?? 5 books to read: (🤍 Other details for the video. mql4,mql4 tutorial,learn mql4,mql4 reference,mql4 video,mql4 book,mql4 forum,mql4 course,mql4 programming tutorial,mql4 lessons,forex,mql4 programming for beginners,mql4 for beginners,forex trading,mql4 programming,mql4 example,mql4 expert advisor,trendwave,trendwave indicator,best mt4 indicator,trend wave,best forex indicator,how to trade,mt4,trending,metatrader indicator,mt4 indicator,trading strategy,indicator,mql4 tutorial, mql4 book, learn mql4, mql4 reference, mql4 video
In this video I show you how to integrate custom MT4 indicators into your expert advisor programming. We insert the low pass filter indicator from a previous video into our EA that we've been coding in the last series. It's actually very simple once you know how and the video shows you step by step how to do it. If you're still not sure you can download the EA and source code for reference, or to try out! 🤍 The free indicator I use: 🤍 The series on how to use indicators: 🤍 If you like the video, don't forget to like and subscribe, and also join in the conversation at 🤍toolkitfortraders.com where we'll be releasing all the free downloadable indicators and EAs. Toolkit for Traders is dedicated to giving traders free expert advisors, indicators, and education to make your trading successful. I have seen too many scams and been burnt by false promises. I want to create a space where we can share the love and encourage each other as we learn to trade. Our website is 🤍 we hope to see you there! -Disclaimer- I am not a registered financial adviser and hold no formal qualifications to give financial advice. Everything that is provided in this video is purely for educational purposes only. All information here should be independently verified, researched and confirmed. Trading foreign currencies can be a challenging and potentially profitable opportunity for investors. However, before deciding to participate in the Forex market, you should carefully consider your investment objectives, level of experience, and risk appetite. Most importantly, do not invest money you cannot afford to lose.
🤍 With MQL5 for Metatrader5 we create an Expert Advisor that can pass an array as a parameter to a user defined function - by reference In this video, we are going to find out how we can pass a whole array as a parameter to a different function, this is possible. So let's find out how to do that with an Mql5. To get started, please click on a little icon here or press F4 on your keyboard. Now you should see the Metaeditor window. And here you want to click on file, new file, Expert Advisor from template, continue. I will call this file simple array reference. Click on continue. Continue and finish. Now you can delete everything above the Ontick function and the two comment lines here. We start by creating a simple small array for integer values, because this is just a simple example to show the concept. And it makes a lot of sense to create small programs like this one to find out how things work. So now we assign values to our array. Please remember the first value can be found when you access index zero. All the array values are whole numbers. We want to use those numbers for a simple calculation. So we want to pass the whole array to a function that is called addvalues. And please remember, usually we are going to pass parameters, but this is a whole array and the returned result should be shown on the chart. So let's add a comment statement here that will show us the text. The returned result is followed by the result that we have calculated. But this function doesn't exist, so we need to create it now. And here is where we need to add this little symbol here. It's the ampersand symbol inside of our user defined function. We want to add the values for the array for index zero, one and two. And afterwards we are going to return the results to our main function, and that's about it. If you have no idea what all the code here does, all of this was too fast for you, you probably want to watch one of the other videos in the basic video series first. By the way, on our website, we have a link for additional courses where you can get the source codes for this basic video stuff. That's also where you can find the link for the Premium Course. This was a suggestion of a Premium Course member, and if you are a Premium Course member and have an idea for a video like this one, please let me know. For now, let's click on View toolbar and press the Compile button. Or you could also press F7 on your keyboard. You shouldn't get any errors. And if that is the case, you can click on a little icon here or press F4 to go back to Metatrader. And in Metatrader you want to click on View Strategy tester or Press Control and R. Please pick the new file simple array reference dot .ex5. Mark, the option for the Visual mode, if you can't see that, you might need to drag this little bar upwards. So now please click on start. And here is our returned result. It is fifty six. We have added the first three values here. That is eight plus 16. So this would be twenty four. And when we add this value, this will be fifty six. So let's add actually another value here. Recompile the code and when we stop the test and start a new one, you should see a new value that is returned. This time it is one hundred and twenty. So our little Expert Advisor works as expected. And in this little video you have learned how to pass an array to a user defined function and you have coded it yourself with a few lines of MQL5 code.
This is a RSI indicator programming video on MQL4. This is a basic programming video for beginners in MQL4. I go over how to program in detail a RSI step by step. This is very basic and can lead to more complicated formulas. Please use the data so you can build upon and make your own formulas better. This will be part of a guide in a programming MQL4 series. The data or formula for this is in my email if you want it please go to my website and send me an email there and I will send it to you. YouTube doesn't allow me to paste it in here for some odd reason. In the video this is my first attempt in creating a programming guide so please understand and give me feedback on the video. I will create more as I go that will be more in depth in this MQL4 guide. - If you enjoy this video, please like and share this video. Don't forget to subscribe to this channel for more updates. Stay Tuned. Check out my programming services, create indicators and trading Robots for clients 🤍 Check out other information about trading and investing at my website 🤍 If you are looking for a custom made trading robot, indicator, script or program check out my fiverr 🤍 Join my Telegram group to get access to myself and important Updates 🤍 Forex Trading account join start today 🤍 ???If you want a 1 free share of stock company click this below!??? 🤍 Get free $10 worth of crypto making and funding a Coinbase Account 🤍 helpful information for the video mql4, mql4 tutorial, rsi, rsi ea, rsi expert advisor, rsi strategy, rsi explained, rsi automated, rsi for beginners, algo trading, trading robot, mql4 code, mql4 example, mql4 video, mql4 youtube, learn mql4, mql4 lessons, relative strenght index, mql4 book, mql4 reference, learn mql4 trading, mql4, mql4 tutorial, rsi, rsi ea, rsi expert advisor, rsi strategy, rsi explained, rsi automated, rsi for beginners, algo trading, trading robot, mql4 code, mql4 example, mql4 video, mql4 youtube, learn mql4, mql4 lessons, relative strenght index, mql4 book, mql4 reference, learn mql4 trading, forex, rsi, forex trading, mql4, mt4, algo trading, mql4 tutorial, metatrader 4, automated trading, expert advisor, rsi indicator, relative strength index, forex robot, programming, mql4 programming tutorial, trading robot, indicator, rsi expert advisor, mql4 expert advisor, ea,metatrader, mql4 lessons, mql4 reference, mql4 book, trading strategy, mql4 course, rsi tutorial, trading, mql4 forum, metatrader4, step by step, rsi trading strategy, algotrading, mt4 indicatorcounted, rsi ea, rsi indicator mql4 programming
Mql4 Programming Tutorials and Forex Trading Training. 🤍 Learn to trade here. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Be a supporter: 🤍 Passing by reference was hard for me to wrap my brain around when I was learning to code. Hopefully in this video I will demystify it for you a little bit. It is much more common since Object Oriented Programming was brought into MT4. When passing the memory address of where a piece of data such as an array, structure or object is held, it enables the function to make changes to all of the various values of that compound type data. Those changes are seen instantly by all other functions using that piece of information. Changing a variables value within a function where the variable was passed by value has no effect in what it's value is in memory as you will see.. sit back and enjoy.. and try the homework mentioned in the pop up... If you are a broker that would like to send me an easy link to your mt4 platform for my 15 thousand viewers then please email me at jim🤍jimdandyforex.com If you'd like to support my channel, check out the affiliate links below to the two things I get asked about most... my hat and my mic... My Mic a Shure 55SH Series II.. 🤍 My Authentic Greek Fisherman's Cap.. 🤍 This is links to the equipment I use in this video. My Camtasia Software: 🤍 My WebCam... Logitech HD Pro Webcam C920s Pro HD 🤍 My Green Screen and Lights.. Green Screen with Lights. 🤍 My Audio Mixer. Behringer Xenyx 502 Audio Mixer. 🤍 Cable to hook mixer to computer. BreakOut Cable Dual 1/4 inch to 3.5m trs 🤍 I hope to build this community of traders and coders and those who want to be traders and coders. In order to do that you I must have viewer engagement. Not just with me but even with each other. So please like, share, and subscribe and click the notification bell.
Mql4 Progamming Tutorials and Forex Trading Training. 🤍 Added February 2019 If you have the money to trade but not the knowledge then I suggest you go to this "TierOneTrading" platform and spend a dollar to get the 14 day trial. This will give you partial access to the platform and help you decide if you have the knowledge and discipline to trade. Invest in your education FIRST. 🤍 Trade Management Tool: 🤍 My kindle book at: 🤍 Become a Patreon patron 🤍 Like, Share and Subscribe PipPip #mql4... In this lesson we make our first EA HELLO UNIVERSE!!! You will learn how to use the Comment() function along with Period() and Symbol() and some keyboard shortcuts as well. Update: due to popular demand I have developed some better videos and a site at 🤍 eventually the full course will have over 80 videos that take your from knowing nothing to writing your own scrpts, indicators and Expert Advisors.
In this Mql4 Tutorial we will be sending message to Telegram using the WebRequest function. I was not familiar with telegram and had never been able to get WebRequest to work for me before I made this video. Hopefully it will help you use it in your coding. Learn to trade here. 🤍 My simple kindle book at: 🤍 Paperback version. 🤍 Tip Jar: 🤍 My Expert: Jimdandy Trade Management Tool.. 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 Support the Channel and download videos and files at... 🤍 Be a supporter: 🤍 Please like, share, and subscribe and click the notification bell. Broker link. 🤍?refid=13908
Mql4 Progamming Tutorials and Forex Trading Training. 🤍 Download my Trade Management Tool at 🤍 Learn from my kindle book at: 🤍 Please consider becoming a Patreon patron at 🤍 Make a PayPal donation.. 🤍 Please remember to give it a big thumbs up and share it around through your favorite social media. In this video I explain why we sometimes use a comma to separate parameters and arguments when constructing a string, and sometimes we use the plus + sign. It can be confusing when you compile an old file in the new compiler and get all of those warnings. Hopefully this will tell you what to do with them.. Also I get to try out my green screen.. If you'd like to support my channel, check out the affiliate links below to the two things I get asked about most... my hat and my mic... My Mic a Shure 55SH Series II.. 🤍 My Authentic Greek Fisherman's Cap.. 🤍 My Green Screen and Lights.. Green Screen with Lights. 🤍
Mql4 Programming Tutorials and Forex Trading Training. 🤍 Have money but don't know how to trade? Go here and invest in an education FIRST... Tier One Trading 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Be a supporter: 🤍 If you've been coding very long you have seen this error appear when you compile your code.... "Wrong Parameters Count"... .What parameters? What's the right count? How do I fix it?.. No worries... you'll know after you watch this video.
Algorithmic Trading course: 🤍 Blog and Workshops: 🤍 #Algorithmictrading #TechnicalAnalysis #MQL4
Mql4 Programming Tutorials and Forex Trading Training. 🤍 Added February 2019 If you have the money to trade but not the knowledge then I suggest you go to this "TierOneTrading" platform and spend a dollar to get the 14 day trial. This will give you partial access to the platform and help you decide if you have the knowledge and discipline to trade. Invest in your education FIRST. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Be a supporter: 🤍 Hello everyone I just uploaded my lesson 7, It explains in very simple turns what a function call is and how it's done. And many other things. I spend extra time here for those that were like me and knew nothing of how a program runs and communicates within itself. If you'd like to support my channel, check out the amazon affiliate links below to the two things I get asked about most... my hat and my mic... Although this old video is horrible... nowadays this is what I use. My Mic a Shure 55SH Series II.. 🤍 My Authentic Greek Fisherman's Cap.. 🤍 This is links to the equipment I use in this video. My Camtasia Software: 🤍 My WebCam... Logitech HD Pro Webcam C920. 🤍 My Green Screen and Lights.. Green Screen with Lights. 🤍 My Audio Mixer. Behringer Xenyx 502 Audio Mixer. 🤍 Cable to hook mixer to computer. BreakOut Cable Dual 1/4 inch to 3.5m trs 🤍 I hope to build this community of traders and coders and those who want to be traders and coders. In order to do that you I must have viewer engagement. Not just with me but even with each other. So please like, share, and subscribe and click the notification bell.
This is a full beginner guide in programming an Expert Advisor for #MQL4 trading robot or algo trading or algorithmic trading also for #MT4. I cover in detail how to create a stochastics indicator trading robot or expert advisor using this indicator: stochastics oscillator. The #stochastics oscillator indicator is a momentum indicator comparing a particular closing price of a security to a range of its prices over a certain period of time. I will be conducting this basic indicator trading strategy on GBPJPY. This Strategy I am programming on MT4 / MQL4 can be used on other forex pairs but must be modified for that currency pair. This how to guide will require some basic knowledge in the MQL4 area but overall this video has enough for any beginner in the MQL4 space. Creating this expert advisor or using this expert advisor is also for beginners and can be changed around to suit your trading strategy since the code is very basic and easy to use and understand. For this how to guide if you need any help you can refer to the MQL4 help guide in MT4 program by pressing F1 key. These MQL4 videos are all in a playlist to help learn more about programming all in a few lessons. I hope this video helps you on you MQL4 or programming journey! Leaving a comment I can answer your questions or you can head to my website and I can help you there or go to my fiverr page for more professional help or join my telegram for a direct stream to me. #stochasticoscillator Thank you for watching and please Like, Share and Subscribe! Please check out my website for more about trading, politics, business and money! 🤍 Join our Telegram group for updates and access to myself 🤍 Check out my programming services, create indicators and trading Robots for clients 🤍 If you are looking for a custom made trading robot, indicator, script or program check out my fiverr 🤍 ???If you want a 1 free share of stock company click this below!??? 🤍 Get free $10 worth of crypto making and funding a Coinbase Account 🤍 Subscribe now: 🤍 ?? RECOMMENDED VIDEOS ?? ?? 5 books to read: (🤍 Other details for the video. mql4 tutorial, mql4 course, learn mql4, mql4 forum, mql4 reference, mql4 book, mql4 video, mql4 youtube, mql4 lessons, mql4 programming, forex, mql4 example, algo trading, expert advisor, trading, metatrader, mql4 programming for beginners, mql4 programming tutorial, forex trading, mql4 coding, mt4, mql4 for beginners, mt4 indicator counted, metatrader 4, automated trading, metatrader programming, trading tutorial, ea, metatrader4, programming course, mql4 programming lesson 1, trading robot, mql4 tutorials, mql4 courses, programming, metaeditor, algorithmic trading, indicator, forex robot, expert advisor tutorial, learn, mql4 code examples, mql4, day trading, forex trading, trading strategies, trading strategy, forex strategy stochastics, stochastics indicator, stochastic, stochastic indicator, stochastics momentum index, stochastics trading, stochastics system, stochastics strategy, stochastics oscillator, slow stochastics, stochastic oscillator, stochastic trading strategy
🤍 With this Expert Advisor we will import external MQL4 source code into our main file, so that it can be used over and over again for automated trading with Metatrader4. In this video I would like to show you something, it’s how to import external source codes. This is a strategy test and when I click on stop you will see that we have an rsi signal here that’s actually what’s calculated inside of the strategy test but you don’t see anything because I didn’t change the template so far and its possible to exchange the module, the external source code. If you click on the include folder inside of your Metatrader installation directory, you will see files that have the extension mqh. There are lots and lots of files inside of those folders and you can open them with Metaeditor or with any editor and this is what you see. This is all source code, its readable for humans, these are hundreds and hundreds of lines of source code, they are provided by Metaquotes but we want to find out how to import our own source codes, so please click on the little button here or press F4. Now you should see the Metaeditor window and here you want to click on file, new, expert advisor from template, continue, I will call this file simple source code import, click on continue, continue and finish, now you can delete everything above the on tick function and the two comment lines here. We start by using an include statement, I would like to use a file that is located inside of a folder that is called import. I have created this folder and the file I would like to import is called check entry underscore macd, this is an mq4 file so it’s a source code file, so I don’t have to write all the source code again, I just do it once for each entry and I can import it over and over again in all of my systems. Now we will create a string variable that is called signal and it will call a function that is called check entry to get the signal for the macd, and finally, we will use the comment statement to output the word signal, followed by the calculated signal and that’s all. Now I can click on the compile button, and it works without any errors but remember you would need to have the same source code file here otherwise the compilation process will not work. In my case, I can click on the little button here or press F4 to go back to Metatrader. Now I click on view, strategy tester or press ctrl and r, I pick the new file simple source code import dot ex4, enable the visual mode here and start a test. Here is the expert advisor, it creates buy and sell signals and when I stop it you will see that it actually has calculated the macd indicator, so let's exchange that and use rsi in the source code, I re-compile the code, restart the test and when I stop it this time you will see this is the rsi indicator. Actually, I have created these import files for several expert advisors and indicators and once you have created one of these files here you can use them over and over again. Let’s copy this one, that’s for the bollinger bands, I will paste the file inside of the import folder that I have created, let’s close this one, exchange the entry, click on compile and when I start a new test and stop it you will see the bollinger bands are calculated. This is a very easy way to code something once and re-use it again and again, and in this little video you have learned how to include external source code files and you have coded it yourself with a few lines of mql4 code.
🤍 Text on the chart is nice, but we want dynamic data to be included like the Ask price. The comment function in MQL4 can do that and even more...
In this video I will show you how to fix your sample dll the comes with metatrader 4. You no doubt have found that the sample dll code provided by Metaquotes does not work... this video will show you how to repair it.. I use Visual Studio 2019 Community version.. it is a free program. 🤍 It is a pretty huge program. #mql4#dll#Programming mql4 Programming at 🤍 Learn to trade here. 🤍 My Expert: Jimdandy Trade Management Tool.. Free download 🤍 My Trade Simulator: DownLoad Skill Builder and hone your trading skills. 🤍 My simple kindle book at: 🤍 Tip Jar: 🤍 Support the Channel and download videos and files at... 🤍 and/or...Be a supporter: 🤍 Subscribe to the 2013 archives and download all of the videos and files. 🤍 Please like, share, and subscribe and click the notification bell.
🤍 With MQL4 for Metatrader4 we create an Expert Advisor that is able to recognize keystrokes and output the pressed key in a Message box. In this video, we want to find out how to catch a key event with mql4. A key event is whenever you press a key on your keyboard that is a so-called chart event, so this is the chart, you don't see very much right now but when I press the key a I will get a message box that says a key was pressed and the key was a. So let's confirm that with okay. Now I will press the b key and here is the next message box, the key that was pressed is key b and now we want to find out how to code that in mql4. To do that please click on the little button here or press F4 on your keyboard, now you should see the Metaeditor and here you want to click on file, new, expert advisor from template, continue, I will call this file simple key event, click on continue, continue and finish, now we can delete everything that is above the on tick function and let's also remove the two comment lines here. So most of the time we would use the on tick function because this is the function that is automatically called whenever the price changes on the chart but in our case, we are looking for a key that is pressed, so we need another event. This one is called on chart event and we need to pass a few parameters, we already have done that before for the mouse click event but let's repeat the parameters. The first one is an integer value, it's called event id and it will give us the event that happened, in our case we are looking for a key that was pressed. An event could be something like an object that was created or a mouse-click. The second parameter is a long value and this is no mistake, it's the way to pass a value as a reference and because it's a long value its called lparam, actually we will see that what we need is not a long value but it is passed in the lparam. The next parameter is a double value so it's called dparam and the last one also passed as a reference is called sparam because it's a string. That's it for the parameters, so let's find out what we can do. We want to check if the event id equals chart event underscore key down – all in capital letters – and if that is the case we use the function translate key to get the value of the lparam, we convert it to an integer value here and we also want to create a message box for the output, that is done with the message box function that comes with mql4. We want to output the text: key was, followed by the converted key code, this is the heading and here we use an ok button to confirm the message box, it is actually able to handle a lot of flags, you could use something like a yes/no and a cancel button, these are all the return codes, so you can actually check which of the contained buttons was pressed, we don't need that for this simple example, please don't forget the closing brackets here and now you can click on the compile button, that should work without any errors but if you don't understand what all the code here does maybe you want to watch the other videos in this basic video series or maybe even the premium course could be interesting for you. In my case the compilation process was successful, so now I can click on a little button here or press F4 to go back to Metatrader. This is an empty chart window and now I simply drag the expert advisor from the navigator panel onto the chart, click on ok, now you should see that the simple key event is enabled here, so let's press the m key and now the message box comes up and says that a key was pressed, the key was m and in this little video you have learned how to recognize key codes with mql4 and you have coded it yourself with a few lines of mql4 code.
Mql4 Progamming Tutorials and Forex Trading Training. 🤍 Trade Management Tool: 🤍 My kindle book at: 🤍 Become a Patreon patron 🤍 Have you ever been looking at your platform on a VPS and suddenly realized that you are looking at an 'old' picture? The VPS is disconnected and you did not realize it. Normally they will reconnect themselves but sometimes they just freeze. In this video I will show you how to write a simple little indicator that will let you know that you are looking at a 'live' picture. Please remember to...Like, Share and Subscribe PipPip #mql4...
This video will be easier to follow if you have already seen part 4: 🤍 This part in the MQL4 OOP series builds on the dashboard created in part 4, adding error checking and the ability to select the display corner for the dashboard. This is primarily a tutorial on technique and software design. The next part will introduce the multi column dashboard and following parts will create telemetry components to allow remote monitoring of expert advisors and then move on to building an expert advisor using the components already created. The code used in the tutorial along with code for earlier tutorials in this series can be downloaded from Orchard Forex: 🤍 Use this playlist to view other parts in this series: 🤍
🤍 In this video, I would like to briefly discuss one particular situation and that is a recent trend reversal on the chart. We see two moving averages here. One calculates the value for 1000 candles and the other one, this red moving average is for 11 hundred candles. And when that's up, we have a downtrend. As you can see, it was like that for a long time and predominantly the price moved below these moving averages until that suddenly changed here on September 13. If we zoom into the chart by hitting the plus key, we see this pretty big candle here and that caused the price to move from one side to the other side of the moving averages. That means because the green moving average is currently above, in theory we have an incipient uptrend. However, because the price is below both moving averages, there is no trading until we have a crossover here or the price moves back to the other side. This has the advantage that we are not trading against the long-term trend. Even if our own entry signal provides us with buy and sell signals here, we will only trade again when the current signal direction matches the long-term trend. This has worked quite well over the last few weeks. We are now at an account balance of $10,105. Currently we are in profit here. Who would like, can look at that on the web page PlatinSystem.Org to analyze it more exactly. There you can find the statistics. And currently we see here no trading history, because I have changed the system yesterday again. Because I have taken the situation as an opportunity to set up here above and below the moving average a transition zone, in which is not traded. This means that if the price moves here in the area of the moving averages, then no trade will be opened, because the direction can change again at any time. But if you zoom into the chart and look at this over the last weeks, you can see that we are already in a pretty stable downtrend. And now it's just a matter of waiting to see if the trend finally turns. That would mean the price stays permanently above these two moving averages and the green average stays above the green one. Only then would that be a permanent trend reversal from the descent of the Euro US Dollar. Or we will see another crossover here shortly. At the moment, it looks more like that. That would be a signal that the downtrend continues. And then we would like to continue to sell. Of course, now in the short term, to make things more interesting, we could change the values here for the moving averages. But that's not the point. Because although the entry signal does not determine whether a system is profitable or not, it is part of a fixed set of rules that should be followed. Just like in a soccer game. There are lines and goals and referees. And no one would show up to a soccer game with flippers and a golf club. That's why I'm just going to enjoy the quiet time here until trading turns itself back on. I can just drag the system here onto the chart and have it trade with the default values. And in this simple video you learned how to use two simple moving averages to determine the long term trend direction for your own system so that it will only trade automatically when the long term trend and your own entry signal match. Thanks for watching and see you in the next video.