<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:rawvoice="https://blubrry.com/developer/rawvoice-rss/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0">

<channel>
	<title>MQL5 Tutorial</title>
	<atom:link href="https://mql5tutorial.com/feed/?max-results=150" rel="self" type="application/rss+xml"/>
	<link>https://mql5tutorial.com/</link>
	<description>MQL5 Expert Advisor Algo Trading for Metatrader5</description>
	<lastBuildDate>Sat, 25 Apr 2026 08:05:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<atom:link href="https://pubsubhubbub.appspot.com/" rel="hub"/>
	<itunes:author>Raimund Bauer</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5Tutorial_Itunes.png"/>
	
	<podcast:medium>podcast</podcast:medium>
	<image>
		<title>MQL5 Tutorial</title>
		<url>https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5Tutorial_Itunes.png</url>
		<link>https://mql5tutorial.com</link>
	</image>
	
	<podcast:podping usesPodping="true"/>
	<copyright>Crowdcompany UG haftungsbeschraenkt</copyright><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords><itunes:summary>With MQL5 and Metatrader5 you can  create your own trading robot to trade 24/7 exactly according to your own rules. Learn MQL5 or start with precoded modules that can be adjusted exactly to your own needs.</itunes:summary><itunes:subtitle>MQL5 TRADING TUTORIAL FOR AUTOMATED TRADING IN METATRADER 5</itunes:subtitle><itunes:category text="Business"><itunes:category text="Investing"/></itunes:category><itunes:category text="Business"/><itunes:category text="Technology"><itunes:category text="Software How-To"/></itunes:category><itunes:category text="Business"><itunes:category text="Investing"/></itunes:category><itunes:category text="Technology"/><itunes:owner><itunes:email>Raimund.Bauer@crowdcompany-UG.com</itunes:email><itunes:name>Raimund Bauer</itunes:name></itunes:owner><item>
		<title>MQL5 Tutorial English – AI Trading Backflip – How Your Instincts Work Against You</title>
		<link>https://mql5tutorial.com/mql5-tutorial-english-ai-trading-backflip-how-your-instincts-work-against-you/</link>
		
		
		<pubDate>Sat, 25 Apr 2026 08:05:36 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4431</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-english-ai-trading-backflip-how-your-instincts-work-against-you/"><img title="A man in a suit sitting at a table with a laptop." src="https://d8wyob5mxqc1u.cloudfront.net/MQL2026/trading-backflip-splash-en-mql5.png" alt="A man in a suit sitting at a table with a laptop." width="" /></a>
	</div>
<p>	Here is something that sounds almost too good to be true. Making money in the markets is entirely possible &#8211; and the path there is surprisingly straightforward. So straightforward, in fact, that it&#8217;s hard to understand why more people aren&#8217;t doing it. &#160; The catch: you have to act consistently against your own instincts. Every single time. Your mind tells you to buy &#8211; so you sell. Your gut tells you to hold &#8211; so you close. Experience tells you to wait &#8211; so you act immediately. &#160; And if that doesn&#8217;t work out? Your broker is more than happy to step in. Reliably, persistently, and with genuine appreciation for your loyalty. &#160; Brokers do particularly well with beginners &#8211; not because they set out to, but because trading generates emotions like almost nothing else. And when emotions take over, most people are just trying to feel good. That, however, is precisely the opposite of what actually works. &#160; Let me put it another way. Have you ever considered attempting a backflip? Everything you need, you already have: two legs, a body, a head. The difficulty isn&#8217;t physical &#8211; it&#8217;s that you have to send that head backwards over yourself. &#160; The moment you leave the ground, there is no changing your mind. Anyone who reconsiders halfway through lands exactly where you&#8217;d expect &#8211; on that head. &#160; Trading follows the same logic exactly. The moment you start questioning an open position and hesitate, you&#8217;ve already secured the worst possible result. &#160; The real issue isn&#8217;t trading. It&#8217;s that most people hit the ground head-first on their first attempt &#8211; and then spend a surprisingly long time trying to figure out how they ended up there.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-english-ai-trading-backflip-how-your-instincts-work-against-you/">MQL5 Tutorial English &#8211; AI Trading Backflip &#8211; How Your Instincts Work Against You</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-english-ai-trading-backflip-how-your-instincts-work-against-you/"><img title="A man in a suit sitting at a table with a laptop." src="https://d8wyob5mxqc1u.cloudfront.net/MQL2026/trading-backflip-splash-en-mql5.png" alt="A man in a suit sitting at a table with a laptop." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>Here is something that sounds almost too good to be true. Making money in the markets is entirely possible &#8211; and the path there is surprisingly straightforward. So straightforward, in fact, that it&#8217;s hard to understand why more people aren&#8217;t doing it.</p>
<p>&nbsp;</p>
<p>The catch: you have to act consistently against your own instincts. Every single time. Your mind tells you to buy &#8211; so you sell. Your gut tells you to hold &#8211; so you close. Experience tells you to wait &#8211; so you act immediately.</p>
<p>&nbsp;</p>
<p>And if that doesn&#8217;t work out? Your broker is more than happy to step in. Reliably, persistently, and with genuine appreciation for your loyalty.</p>
<p>&nbsp;</p>
<p>Brokers do particularly well with beginners &#8211; not because they set out to, but because trading generates emotions like almost nothing else. And when emotions take over, most people are just trying to feel good. That, however, is precisely the opposite of what actually works.</p>
<p>&nbsp;</p>
<p>Let me put it another way. Have you ever considered attempting a backflip? Everything you need, you already have: two legs, a body, a head. The difficulty isn&#8217;t physical &#8211; it&#8217;s that you have to send that head backwards over yourself.</p>
<p>&nbsp;</p>
<p>The moment you leave the ground, there is no changing your mind. Anyone who reconsiders halfway through lands exactly where you&#8217;d expect &#8211; on that head.</p>
<p>&nbsp;</p>
<p>Trading follows the same logic exactly. The moment you start questioning an open position and hesitate, you&#8217;ve already secured the worst possible result.</p>
<p>&nbsp;</p>
<p>The real issue isn&#8217;t trading. It&#8217;s that most people hit the ground head-first on their first attempt &#8211; and then spend a surprisingly long time trying to figure out how they ended up there.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-english-ai-trading-backflip-how-your-instincts-work-against-you/">MQL5 Tutorial English &#8211; AI Trading Backflip &#8211; How Your Instincts Work Against You</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 13</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-13/</link>
		
		
		<pubDate>Tue, 14 Jan 2025 17:28:35 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4405</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; Okay, today is December 30th. So Christmas is over and we are now at a profit of about twelve euros. This means that trading picked up again a bit after Christmas. We have a few more positions here and if you are wondering why the different sums are appearing here, it is because I have selected the one-hour chart here and I have also set up my system so that it only checks once an hour to see if we have an entry or exit signal. This can sometimes lead to such irregularly high profits. The reason for this is that if I were to run my system on a minute-by-minute or price-change basis, it would require significantly more computing power. In principle, this is justifiable. &#160; However, I have not noticed any improvement. That&#8217;s why I&#8217;m leaving it at the hour. You can see here, when you move the mouse over it, that a position was opened and a position was closed at a profit of €3.90. This is the last position. If we zoom in a little closer, we can see that there is a second position and that the two are connected by this dashed line. This means that both positions were opened at different times but closed at the same time. One of the main problems is that beginners now do the math and say, “Man, I made a profit of €12 in x days. Then I extrapolate that one-to-one and that means I earn so-and-so much.” Unfortunately, this is not realistic in practice, because there are always phases where we experience drawdowns and these can last for days, weeks or even months. &#160; And that is why most traders lose their nerve after a while, because they see their account melting away in their mind&#8217;s eye and have the very strong feeling that the risk is much higher than the profit expectation and that the trading risk cannot be justified. And it is to be expected that a lot will change in the United States at the beginning of January and here in Germany in February. And such changes can usually be seen quite quickly on the chart. The question is whether they will work for or against us, but we&#8217;ll see. In one of the next videos, I also have to set up advanced statistics for this system so that you can track online what, when, and how it happened. For now, I&#8217;m satisfied with the result, the system is running, and I&#8217;ll see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-13/">MQL5 TUTORIAL &#8211; Christmas Edition Part 13</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe  id="_ytid_16103"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/VwnEaMjGV5o?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: 
<p>&nbsp;</p>
<p>Okay, today is December 30th. So Christmas is over and we are now at a profit of about twelve euros. This means that trading picked up again a bit after Christmas. We have a few more positions here and if you are wondering why the different sums are appearing here, it is because I have selected the one-hour chart here and I have also set up my system so that it only checks once an hour to see if we have an entry or exit signal. This can sometimes lead to such irregularly high profits. The reason for this is that if I were to run my system on a minute-by-minute or price-change basis, it would require significantly more computing power. In principle, this is justifiable.</p>
<p>&nbsp;</p>
<p>However, I have not noticed any improvement. That&#8217;s why I&#8217;m leaving it at the hour. You can see here, when you move the mouse over it, that a position was opened and a position was closed at a profit of €3.90. This is the last position. If we zoom in a little closer, we can see that there is a second position and that the two are connected by this dashed line. This means that both positions were opened at different times but closed at the same time. One of the main problems is that beginners now do the math and say, “Man, I made a profit of €12 in x days. Then I extrapolate that one-to-one and that means I earn so-and-so much.” Unfortunately, this is not realistic in practice, because there are always phases where we experience drawdowns and these can last for days, weeks or even months.</p>
<p>&nbsp;</p>
<p>And that is why most traders lose their nerve after a while, because they see their account melting away in their mind&#8217;s eye and have the very strong feeling that the risk is much higher than the profit expectation and that the trading risk cannot be justified. And it is to be expected that a lot will change in the United States at the beginning of January and here in Germany in February. And such changes can usually be seen quite quickly on the chart. The question is whether they will work for or against us, but we&#8217;ll see. In one of the next videos, I also have to set up advanced statistics for this system so that you can track online what, when, and how it happened. For now, I&#8217;m satisfied with the result, the system is running, and I&#8217;ll see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-13/">MQL5 TUTORIAL &#8211; Christmas Edition Part 13</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 12</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-12/</link>
		
		
		<pubDate>Mon, 13 Jan 2025 17:26:34 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4403</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; So, Christmas is over and we have opened the first few positions. You can see here in the account history that we have currently made a profit of €2.69 and you might wonder why it says €2.71 here at the front. Let&#8217;s click here in the column, look at orders and deals. Then it is €2.71. &#160; As soon as we switch it to trades, it is €2.69. Let&#8217;s try it with the calculator. 1.08 plus 0.76 plus 1.04 is 2.88. Now we subtract 19 cents in losses and that leaves us with 2.69 euros. You can see the direction quite well here. So, In means we have opened a position. Out means we have closed a position. There are currently no open positions. That doesn&#8217;t surprise me, though, because there isn&#8217;t much change here between Christmas and New Year. I expect it to pick up significantly at the beginning of January. &#160; However, we can already see quite clearly here that our system works fundamentally. Let&#8217;s take a look at the journal. The times can also be seen there and so far we have no fundamental errors in communication. So I would say that our system has passed the first real-time test and we will then take a look in the next few days to see how things progress.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-12/">MQL5 TUTORIAL &#8211; Christmas Edition Part 12</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe  id="_ytid_31445"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/LrLVX3EBI3s?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>So, Christmas is over and we have opened the first few positions. You can see here in the account history that we have currently made a profit of €2.69 and you might wonder why it says €2.71 here at the front. Let&#8217;s click here in the column, look at orders and deals. Then it is €2.71.</p>
<p>&nbsp;</p>
<p>As soon as we switch it to trades, it is €2.69. Let&#8217;s try it with the calculator. 1.08 plus 0.76 plus 1.04 is 2.88. Now we subtract 19 cents in losses and that leaves us with 2.69 euros. You can see the direction quite well here. So, In means we have opened a position. Out means we have closed a position. There are currently no open positions. That doesn&#8217;t surprise me, though, because there isn&#8217;t much change here between Christmas and New Year. I expect it to pick up significantly at the beginning of January.</p>
<p>&nbsp;</p>
<p>However, we can already see quite clearly here that our system works fundamentally. Let&#8217;s take a look at the journal. The times can also be seen there and so far we have no fundamental errors in communication. So I would say that our system has passed the first real-time test and we will then take a look in the next few days to see how things progress.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-12/">MQL5 TUTORIAL &#8211; Christmas Edition Part 12</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL –</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-10/</link>
		
		
		<pubDate>Sat, 11 Jan 2025 17:22:48 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4401</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; We have already seen the first results and the task now is to find out what we can do to make our system 100 percent safe. And the easiest way to test that is simply to take a much too small account. I&#8217;ll take a deposit of €10 here, start my test and within a second the test is finished. We can now see in the backtest that we have used €10 and lost it immediately. It went down almost immediately. Let&#8217;s change the deposit and go up to €50 and start our test. Then we should now see in the process that our account is initially developing quite well. We are now at €62, and are now exceeding €70. Now we are at 85, 90, 95. So that&#8217;s clearly not going any longer. &#160; Now we&#8217;ve passed 100, but that&#8217;s as far as it goes. We got to €129 and then our account crashed. Again, it lasted much longer, but in the end it was over. Let&#8217;s just go to the other extreme and say we have €100,000 available. And if I start the test here now, I&#8217;ll see if I can make it a little more visible, then we can simultaneously observe the development here above and the equity and balance curve here below. That looks much less threatening. I&#8217;ll let this run through to the end of the test period. That was it so far. We have a positive result. Here is the drawdown. But at no time was our entire account at risk. The disadvantage, of course, is that the profit in relation is not that high either, so it doesn&#8217;t matter. &#160; But what we have learned is that with a €10 account, we can be pretty sure that we will ruin it within a very short time. And that was the first task. So, if the account is too small, there is usually a very high risk that we will reduce the account balance to zero quite quickly.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-10/">MQL5 TUTORIAL &#8211; Christmas Edition Part 10</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe  id="_ytid_57705"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/93KwoJjrn2o?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>We have already seen the first results and the task now is to find out what we can do to make our system 100 percent safe. And the easiest way to test that is simply to take a much too small account. I&#8217;ll take a deposit of €10 here, start my test and within a second the test is finished. We can now see in the backtest that we have used €10 and lost it immediately. It went down almost immediately. Let&#8217;s change the deposit and go up to €50 and start our test. Then we should now see in the process that our account is initially developing quite well. We are now at €62, and are now exceeding €70. Now we are at 85, 90, 95. So that&#8217;s clearly not going any longer.</p>
<p>&nbsp;</p>
<p>Now we&#8217;ve passed 100, but that&#8217;s as far as it goes. We got to €129 and then our account crashed. Again, it lasted much longer, but in the end it was over. Let&#8217;s just go to the other extreme and say we have €100,000 available. And if I start the test here now, I&#8217;ll see if I can make it a little more visible, then we can simultaneously observe the development here above and the equity and balance curve here below. That looks much less threatening. I&#8217;ll let this run through to the end of the test period. That was it so far. We have a positive result. Here is the drawdown. But at no time was our entire account at risk. The disadvantage, of course, is that the profit in relation is not that high either, so it doesn&#8217;t matter.</p>
<p>&nbsp;</p>
<p>But what we have learned is that with a €10 account, we can be pretty sure that we will ruin it within a very short time. And that was the first task. So, if the account is too small, there is usually a very high risk that we will reduce the account balance to zero quite quickly.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-10/">MQL5 TUTORIAL &#8211; Christmas Edition Part 10</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 9</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-9/</link>
		
		
		<pubDate>Fri, 10 Jan 2025 17:20:27 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4399</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; Okay, let&#8217;s take a look at how the system works here. We have an equity, which is the net balance. This is always reduced when we open a position, because every position is initially in the red. We also have the balance, which is the gross balance. And the gross balance always increases when we make a profit and there are currently no open positions. For example, right now our gross balance has increased by €10 and we have no open position because our oscillator is between these two lines. &#160; Now it is below the lower line, which is a buy signal, and if we are in an uptrend, a position will then be opened. Whether we have an upward or downward trend can be seen quite well with the help of these moving averages here. And now let&#8217;s speed up the whole thing and let it run for a while. Then we see how many positions our system automatically opens and closes. Here in the strategy test, there is the so-called history. There you can see the opening and closing of the position for each individual position. The “Operations” tab works in a similar way and the journal is always interesting, because this is where we would also see if errors occur. For example, a calculated value may not work because the broker has defined that the stop loss must not be so close to the purchase price, or there could be requotes or problems with the margin. &#160; We would see all these errors here. Our system is trading peacefully all the time and we have now reached €9,636.00. What the strategy tester does not show is the historical curve. We can see that here in MetaTrader 5 itself. You can display the chart and it shows us how our Expert Advisor behaves over the course of our set trading period. All in all, we have a positive result here and now, of course, the question arises: can I improve this result? And if so, how would I do it? To answer that, let&#8217;s change a few things and we&#8217;ll do it the other way around. We&#8217;ll try to find out what measures can be taken to ruin a system immediately.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-9/">MQL5 TUTORIAL &#8211; Christmas Edition Part 9</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_37410"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/PGkskIGcarE?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>Okay, let&#8217;s take a look at how the system works here. We have an equity, which is the net balance. This is always reduced when we open a position, because every position is initially in the red. We also have the balance, which is the gross balance. And the gross balance always increases when we make a profit and there are currently no open positions. For example, right now our gross balance has increased by €10 and we have no open position because our oscillator is between these two lines.</p>
<p>&nbsp;</p>
<p>Now it is below the lower line, which is a buy signal, and if we are in an uptrend, a position will then be opened. Whether we have an upward or downward trend can be seen quite well with the help of these moving averages here. And now let&#8217;s speed up the whole thing and let it run for a while. Then we see how many positions our system automatically opens and closes. Here in the strategy test, there is the so-called history. There you can see the opening and closing of the position for each individual position. The “Operations” tab works in a similar way and the journal is always interesting, because this is where we would also see if errors occur. For example, a calculated value may not work because the broker has defined that the stop loss must not be so close to the purchase price, or there could be requotes or problems with the margin.</p>
<p>&nbsp;</p>
<p>We would see all these errors here. Our system is trading peacefully all the time and we have now reached €9,636.00. What the strategy tester does not show is the historical curve. We can see that here in MetaTrader 5 itself. You can display the chart and it shows us how our Expert Advisor behaves over the course of our set trading period. All in all, we have a positive result here and now, of course, the question arises: can I improve this result? And if so, how would I do it? To answer that, let&#8217;s change a few things and we&#8217;ll do it the other way around. We&#8217;ll try to find out what measures can be taken to ruin a system immediately.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-9/">MQL5 TUTORIAL &#8211; Christmas Edition Part 9</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 8</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-8/</link>
		
		
		<pubDate>Thu, 09 Jan 2025 17:19:10 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4397</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; We have now set up a demo account and a cent account. The MetaTrader is basically set up and now, of course, we want to trade with it. To do that, we first need a version that automates it for us. So let&#8217;s download the Christmas Edition here, I&#8217;ll copy it and put it in my personal folder in the.MT5 folder, which is hidden but can be shown by selecting “Show hidden files”. There is a drive C in it. There are several subfolders in it. Below Program files, we find MetaTrader5 and there we have to go to the MQL5 &#8211; Experts folder. Here we can insert the file and also unzip it directly. This then gives us this folder and everything is in here. The main components are these two green files. &#160; One is the system library, which is compiled and where a large part of the settings for the Expert Advisor are made under the hood. The other file here can be edited by yourself using the corresponding MQ5 version and here, for example, you can select the entry. As I said, I prefer the Williams Percent Range Oscillator as an entry signal. If we now click on Experts on the right and select Update, we should already find our demo version. Here you can change the settings. For example, you can increase or decrease the trading risk here. Let&#8217;s do a first test. To do that, we click on View, “Strategy Tester” or press Control and R. We want to do a single test with the system just mentioned. &#160; I&#8217;m doing euro-US dollar because that&#8217;s the most popular currency pair in trading. I&#8217;m looking for a period from 2024 to the end of 2024. Let&#8217;s make it a bit bigger, then we can see here that we can set a delay. I would like to have every tick. My deposit would now be €9,500. My leverage is 1,500. I&#8217;ll leave out the visual mode for now, because that would take quite a while. And when I click on Start Test, the historical data for the year should now be downloaded. You can also see that here in the journal. And our system is already starting to trade. Let&#8217;s just let it run. So, and that was it. The display here may look a bit distorted. This was a hefty drawdown. &#160; Let&#8217;s check one of these free robots here. Start a test and the results will look like this. Let&#8217;s try this one. It makes these beautiful sawtooth lines. But all in all, we now have our system set up to work for automated trading. In the next video, we want to take a look at how such settings work and how you can test and optimize a system like this.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-8/">MQL5 TUTORIAL &#8211; Christmas Edition Part 8</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_87684"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/WUOBSE_hr_8?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>We have now set up a demo account and a cent account. The MetaTrader is basically set up and now, of course, we want to trade with it. To do that, we first need a version that automates it for us. So let&#8217;s download the Christmas Edition here, I&#8217;ll copy it and put it in my personal folder in the.MT5 folder, which is hidden but can be shown by selecting “Show hidden files”. There is a drive C in it. There are several subfolders in it. Below Program files, we find MetaTrader5 and there we have to go to the MQL5 &#8211; Experts folder. Here we can insert the file and also unzip it directly. This then gives us this folder and everything is in here. The main components are these two green files.</p>
<p>&nbsp;</p>
<p>One is the system library, which is compiled and where a large part of the settings for the Expert Advisor are made under the hood. The other file here can be edited by yourself using the corresponding MQ5 version and here, for example, you can select the entry. As I said, I prefer the Williams Percent Range Oscillator as an entry signal. If we now click on Experts on the right and select Update, we should already find our demo version. Here you can change the settings. For example, you can increase or decrease the trading risk here. Let&#8217;s do a first test. To do that, we click on View, “Strategy Tester” or press Control and R. We want to do a single test with the system just mentioned.</p>
<p>&nbsp;</p>
<p>I&#8217;m doing euro-US dollar because that&#8217;s the most popular currency pair in trading. I&#8217;m looking for a period from 2024 to the end of 2024. Let&#8217;s make it a bit bigger, then we can see here that we can set a delay. I would like to have every tick. My deposit would now be €9,500. My leverage is 1,500. I&#8217;ll leave out the visual mode for now, because that would take quite a while. And when I click on Start Test, the historical data for the year should now be downloaded. You can also see that here in the journal. And our system is already starting to trade. Let&#8217;s just let it run. So, and that was it. The display here may look a bit distorted. This was a hefty drawdown.</p>
<p>&nbsp;</p>
<p>Let&#8217;s check one of these free robots here. Start a test and the results will look like this. Let&#8217;s try this one. It makes these beautiful sawtooth lines. But all in all, we now have our system set up to work for automated trading. In the next video, we want to take a look at how such settings work and how you can test and optimize a system like this.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-8/">MQL5 TUTORIAL &#8211; Christmas Edition Part 8</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 7</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-7/</link>
		
		
		<pubDate>Wed, 08 Jan 2025 17:17:14 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4394</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; I have already mentioned that I like to use CENT accounts and therefore I want to set up a CENT account right now. I am here on my broker&#8217;s website and now I can choose what I want. I would like to use the MetaTrader 5. The account model is MT5 Pro Cent. It is very important that we select a hedging system. As a currency, I can choose euros or US dollars here and I personally find the leverage of 1:000 a bit high. You can even go up to 2000. I usually use 1:500. This makes it easier for me to compare with other systems that I have already traded. Now you can assign a password here and if I click on confirm, my account should be created. That&#8217;s happened now. Now, of course, we still have to deposit money. Alternatively, I can make a transfer from my credit here. Let&#8217;s do that now. I&#8217;m selecting €100 here. &#160; The status is pending. So that may take a bit. Let&#8217;s copy our account number already. Of course, an update is offered again now. This typically always happens when you are about to do something else. Unfortunately, MetaQuotes has recently acquired a bad habit. And that is the fact that certain systems report after a certain time that they have to be recompiled because the version is too old. I think that this is to force people to always install the latest version of MetaTrader 5, similar to what is already done with Windows. I now right-click here on Accounts and open an account. My broker is called RoboForex. I click on Next. &#160; Now I can connect to a current account here. The username is my account number. Now I enter my password and click on Done. And as you can see, my account is connected. Due to the current euro-US dollar exchange rate, 10,000 dollars have now become 9,541 euros. Converted, this means that for every 100 euros deposited, I now have 95.41 euros available on my cent account, which are traded as if they were 9,541 euros. And when it comes to payment, it is then recalculated accordingly using the factor of 100. In any case, I have now connected my demo account and my cent account and in the next video we will continue with automatic trading.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-7/">MQL5 TUTORIAL &#8211; Christmas Edition Part 7</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_63124"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/Y2N5zbLhJKI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts:<a href="https://swiy.co/RobotTrading"> 
<p>&nbsp;</p>
<p>I have already mentioned that I like to use CENT accounts and therefore I want to set up a CENT account right now. I am here on my broker&#8217;s website and now I can choose what I want. I would like to use the MetaTrader 5. The account model is MT5 Pro Cent. It is very important that we select a hedging system. As a currency, I can choose euros or US dollars here and I personally find the leverage of 1:000 a bit high. You can even go up to 2000. I usually use 1:500. This makes it easier for me to compare with other systems that I have already traded. Now you can assign a password here and if I click on confirm, my account should be created. That&#8217;s happened now. Now, of course, we still have to deposit money. Alternatively, I can make a transfer from my credit here. Let&#8217;s do that now. I&#8217;m selecting €100 here.</p>
<p>&nbsp;</p>
<p>The status is pending. So that may take a bit. Let&#8217;s copy our account number already. Of course, an update is offered again now. This typically always happens when you are about to do something else. Unfortunately, MetaQuotes has recently acquired a bad habit. And that is the fact that certain systems report after a certain time that they have to be recompiled because the version is too old. I think that this is to force people to always install the latest version of MetaTrader 5, similar to what is already done with Windows. I now right-click here on Accounts and open an account. My broker is called RoboForex. I click on Next.</p>
<p>&nbsp;</p>
<p>Now I can connect to a current account here. The username is my account number. Now I enter my password and click on Done. And as you can see, my account is connected. Due to the current euro-US dollar exchange rate, 10,000 dollars have now become 9,541 euros. Converted, this means that for every 100 euros deposited, I now have 95.41 euros available on my cent account, which are traded as if they were 9,541 euros. And when it comes to payment, it is then recalculated accordingly using the factor of 100. In any case, I have now connected my demo account and my cent account and in the next video we will continue with automatic trading.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-7/">MQL5 TUTORIAL &#8211; Christmas Edition Part 7</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 6</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-6/</link>
		
		
		<pubDate>Tue, 07 Jan 2025 17:15:35 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4392</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; When we install the MetaTrader for the first time, we are shown four such charts. These are preset and show different indicators or oscillators. Basically, you have to get away from the idea that what is displayed is also what is actually traded. This is because I can display an indicator on my chart that has no function but only serves to make something visually more visible. That&#8217;s why we want to change the charts a bit now. The first thing that is displayed up here is this quick trading function. This should lead to people manually opening or closing a position on the chart. For automated trading, we can deactivate this here via this small button. These indicators that are displayed can also be marked and we can either display the properties here. For example, we could change the number of candles or we can right click and delete the indicator. &#160; Also, right-click on properties. Here we can define whether we want to see bars, candles or lines for the price movements. But we I can also do that in the bar at the top. I can determine whether my chart should scroll automatically. This means that I always see the current state here on the right-hand side, and I can also move it a little to the left by activating chart shift. This would be very useful, for example, if you wanted to project indicators into the future. Under the second tab, I can show or hide the ticker, which is the text at the top. Completely remove the quick trading buttons, and I am also not a fan of having this grid displayed. The trading levels and the trading history are not yet visible here. This would show us where we have already opened and closed positions. That&#8217;s why I&#8217;ll leave it as it is and you can change the colors again using this tab if you like. &#160; For now, I&#8217;ll leave it as it is and click on okay. And so that I don&#8217;t have to do this every time, I can save it as a template. To do this, I right click with the mouse, select Templates, Save Template, and there are two names that are reserved. One is default. This would now always be displayed when we do live trading. That means in real time, which does not happen at the moment because there are no price changes at the weekend. I can also save the template under the name tester. This is then the template that is always loaded in the strategy tests. If I want, I can also save further templates here at any time or reload templates. This is quite useful if you want to make visual decisions on the chart. For automated trading, however, this setting is actually okay. I will import my robot trading system here and a lot of additional information will be displayed. &#160; For now, we have defined and saved our template. We can now also load it for the other charts if we wish. I will first deactivate all other currency pairs and save this as the default profile under profiles. If I now close and reopen the MetaTrader, my standard view in the standard profile with my standard template should be reloaded as I left time, and that worked. We will continue in the next part with the import of an automated trading system.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-6/">MQL5 TUTORIAL &#8211; Christmas Edition Part 6</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_34330"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/X_8tMxwj1VQ?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>When we install the MetaTrader for the first time, we are shown four such charts. These are preset and show different indicators or oscillators. Basically, you have to get away from the idea that what is displayed is also what is actually traded. This is because I can display an indicator on my chart that has no function but only serves to make something visually more visible. That&#8217;s why we want to change the charts a bit now. The first thing that is displayed up here is this quick trading function. This should lead to people manually opening or closing a position on the chart. For automated trading, we can deactivate this here via this small button. These indicators that are displayed can also be marked and we can either display the properties here. For example, we could change the number of candles or we can right click and delete the indicator.</p>
<p>&nbsp;</p>
<p>Also, right-click on properties. Here we can define whether we want to see bars, candles or lines for the price movements. But we I can also do that in the bar at the top. I can determine whether my chart should scroll automatically. This means that I always see the current state here on the right-hand side, and I can also move it a little to the left by activating chart shift. This would be very useful, for example, if you wanted to project indicators into the future. Under the second tab, I can show or hide the ticker, which is the text at the top. Completely remove the quick trading buttons, and I am also not a fan of having this grid displayed. The trading levels and the trading history are not yet visible here. This would show us where we have already opened and closed positions. That&#8217;s why I&#8217;ll leave it as it is and you can change the colors again using this tab if you like.</p>
<p>&nbsp;</p>
<p>For now, I&#8217;ll leave it as it is and click on okay. And so that I don&#8217;t have to do this every time, I can save it as a template. To do this, I right click with the mouse, select Templates, Save Template, and there are two names that are reserved. One is default. This would now always be displayed when we do live trading. That means in real time, which does not happen at the moment because there are no price changes at the weekend. I can also save the template under the name tester. This is then the template that is always loaded in the strategy tests. If I want, I can also save further templates here at any time or reload templates. This is quite useful if you want to make visual decisions on the chart. For automated trading, however, this setting is actually okay. I will import my robot trading system here and a lot of additional information will be displayed.</p>
<p>&nbsp;</p>
<p>For now, we have defined and saved our template. We can now also load it for the other charts if we wish. I will first deactivate all other currency pairs and save this as the default profile under profiles. If I now close and reopen the MetaTrader, my standard view in the standard profile with my standard template should be reloaded as I left time, and that worked. We will continue in the next part with the import of an automated trading system.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-6/">MQL5 TUTORIAL &#8211; Christmas Edition Part 6</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 5</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-5/</link>
		
		
		<pubDate>Mon, 06 Jan 2025 17:12:45 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4390</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; Okay, our MetaTrader is now up and running. Even after changing the energy-saving settings, our server no longer wants to constantly go into sleep mode. And we still have to set two or three things before we can use it. Today is the weekend, so there will be no price changes. Let&#8217;s go to Extras – Options. The server settings are okay so far. I don&#8217;t need messages, so I can deactivate them. I used to reduce the maximum number here in the charts because the computing power of older computers was still quite modest. On the trading tab, I always set a default size that is as small as possible. This prevents you from accidentally clicking on the chart and opening a large position when you don&#8217;t actually want to. &#160; The important tab for us here is this expert tab. Here we have to allow algorithmic trading. As a security feature, you can disable the option to continue trading after an account or profile change. I don&#8217;t need that here. The import of DLLs is useful if we want to use an external statistics service, such as FXBlue or MyFxBook. And one of the first things I always turn off are these annoying event sounds. With a virtual server, I don&#8217;t really care, but I always turn them off anyway. And if we click on OK now, we should have the basic settings done. Algorithmic trading is now allowed up here. The tabs below are also becoming more and more from year to year. &#160; The tab for trading is important for us. Here we see the account balance and we would see positions. And you can display columns in the positions, for example the swap costs. These can be quite significant and are not displayed at all by default. In addition, you can display the comment here, provided that you use a system that works with comments. And there is one more subtlety: even if algorithmic trading is allowed up here, it is still possible that a different setting has been selected on the chart. In the next video, we will set up the chart differently and also save a template for automated trading.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-5/">MQL5 TUTORIAL &#8211; Christmas Edition Part 5</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_16562"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/FRw58Ib3ID4?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>Okay, our MetaTrader is now up and running. Even after changing the energy-saving settings, our server no longer wants to constantly go into sleep mode. And we still have to set two or three things before we can use it. Today is the weekend, so there will be no price changes. Let&#8217;s go to Extras – Options. The server settings are okay so far. I don&#8217;t need messages, so I can deactivate them. I used to reduce the maximum number here in the charts because the computing power of older computers was still quite modest. On the trading tab, I always set a default size that is as small as possible. This prevents you from accidentally clicking on the chart and opening a large position when you don&#8217;t actually want to.</p>
<p>&nbsp;</p>
<p>The important tab for us here is this expert tab. Here we have to allow algorithmic trading. As a security feature, you can disable the option to continue trading after an account or profile change. I don&#8217;t need that here. The import of DLLs is useful if we want to use an external statistics service, such as FXBlue or MyFxBook. And one of the first things I always turn off are these annoying event sounds. With a virtual server, I don&#8217;t really care, but I always turn them off anyway. And if we click on OK now, we should have the basic settings done. Algorithmic trading is now allowed up here. The tabs below are also becoming more and more from year to year.</p>
<p>&nbsp;</p>
<p>The tab for trading is important for us. Here we see the account balance and we would see positions. And you can display columns in the positions, for example the swap costs. These can be quite significant and are not displayed at all by default. In addition, you can display the comment here, provided that you use a system that works with comments. And there is one more subtlety: even if algorithmic trading is allowed up here, it is still possible that a different setting has been selected on the chart. In the next video, we will set up the chart differently and also save a template for automated trading.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-5/">MQL5 TUTORIAL &#8211; Christmas Edition Part 5</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 4</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-4/</link>
		
		
		<pubDate>Sun, 05 Jan 2025 17:12:24 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4388</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading Okay, in the last video we had already installed the MetaTrader. Now I have to restart my server again because it keeps switching to energy-saving mode. If we turn everything off, it might be better. Somehow you can&#8217;t find anything here now. So where is our MetaTrader installation? Normally you can find this script in the home directory. There&#8217;s another one here. This refers to the installation, just like this one. If we go to the settings at the top, we can say that we would like to show hidden files. This also works with Control+H. And if you do that, you can see that these slightly hidden folders appear here. Actually, a desktop file should also be created. Why mine was missing is a mystery to me. In any case, it worked during the second installation. And after we have started the MetaTrader, we can now set up an account here. Let&#8217;s choose “Metaquotes” for a demo account. Now we have to fill out this form. This would correspond to a deposit of 500 Euros on a cent account. The leverage of 1 to 500 is relatively difficult to get in Germany and Europe. I use it all the time with my broker RoboForex. I agree to the terms and conditions for opening the account, click on Next and here I get my access data for the demo account. Now another package is being installed. But that&#8217;s pretty quick. And here is our demo account ready for trading. The setup was successful so far. Then our account should be connected and available immediately and we are ready to make the settings in the next video to proceed with automated trading.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-4/">MQL5 TUTORIAL &#8211; Christmas Edition Part 4</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_79823"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/rlV1xqVTf8s?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts:  Okay, in the last video we had already installed the MetaTrader. Now I have to restart my server again because it keeps switching to energy-saving mode. If we turn everything off, it might be better. Somehow you can&#8217;t find anything here now. So where is our MetaTrader installation? Normally you can find this script in the home directory. There&#8217;s another one here. This refers to the installation, just like this one. If we go to the settings at the top, we can say that we would like to show hidden files. This also works with Control+H. And if you do that, you can see that these slightly hidden folders appear here. Actually, a desktop file should also be created. Why mine was missing is a mystery to me. In any case, it worked during the second installation. And after we have started the MetaTrader, we can now set up an account here. Let&#8217;s choose “Metaquotes” for a demo account. Now we have to fill out this form. This would correspond to a deposit of 500 Euros on a cent account. The leverage of 1 to 500 is relatively difficult to get in Germany and Europe. I use it all the time with my broker RoboForex. I agree to the terms and conditions for opening the account, click on Next and here I get my access data for the demo account. Now another package is being installed. But that&#8217;s pretty quick. And here is our demo account ready for trading. The setup was successful so far. Then our account should be connected and available immediately and we are ready to make the settings in the next video to proceed with automated trading.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-4/">MQL5 TUTORIAL &#8211; Christmas Edition Part 4</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 3B</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3b/</link>
		
		
		<pubDate>Sat, 04 Jan 2025 17:08:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4386</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; Now that we have set up our Debian server for €3.29 so that we can get started with it, we would of course also like to install the MetaTrader. To do this, we first go back to the console, switch on the graphical mode here and we see the message: Display Output is not active. So let&#8217;s turn off the server and restart it. This may take a few seconds. Now we can see something again. And when our interface is loading, we open Firefox, go to the website Metatrader 5 dot com and click on Download for Linux. Then there is this command, which we copy out, open the console, that is, the Linux terminal, and paste it in here. Now I have to enter the password and realize that I am not authorized at all. So I log in again as root, because I still have to enter a file that allows me to make changes to the system. This is done with this line here. &#160; That&#8217;s my username and these are the rights I give myself. The file is called sudoers. These are all the people who are allowed to access sudo on the system, which means execute as root, that means with full rights. Let&#8217;s try that again. Then our script should actually start and perform the installation of MetaTrader 5. Various package lists are now being downloaded here. Yes, I want to continue. The MetaTrader and some Linux files are now being installed in the background. These include Wine, among other things. Wine is a Windows emulator. The logo is this red wine glass and you can install it directly from the sources of the Linux distribution. The advantage is that Wine is able to run Windows programs on a Linux system. Meanwhile, we have already reached version 10, so it has been around for a few years and you can now get graphically demanding games to run with it. Our MetaTrader doesn&#8217;t need that much graphics power. Nevertheless, quite a bit is installed. The nice thing is that it&#8217;s all automated now. In the past, you had to do some tricks. &#160; Here is the MT5 Setup EXE. Now there is a Wine-Mono package for the Dotnet environment. And when that&#8217;s done, we should be done pretty quickly. And now it&#8217;s time. We can start the MetaTrader 5. In the past, there was always a problem here, where you had to change one or two settings, because otherwise you couldn&#8217;t load any installation data. This works much better now and the installation is already complete. Our MetaTrader 5 is installed and started. The next video will continue with the setup.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3b/">MQL5 TUTORIAL &#8211; Christmas Edition Part 3B</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_83103"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/MstmWQqNEWM?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>Now that we have set up our Debian server for €3.29 so that we can get started with it, we would of course also like to install the MetaTrader. To do this, we first go back to the console, switch on the graphical mode here and we see the message: Display Output is not active. So let&#8217;s turn off the server and restart it. This may take a few seconds. Now we can see something again. And when our interface is loading, we open Firefox, go to the website Metatrader 5 dot com and click on Download for Linux. Then there is this command, which we copy out, open the console, that is, the Linux terminal, and paste it in here. Now I have to enter the password and realize that I am not authorized at all. So I log in again as root, because I still have to enter a file that allows me to make changes to the system. This is done with this line here.</p>
<p>&nbsp;</p>
<p>That&#8217;s my username and these are the rights I give myself. The file is called sudoers. These are all the people who are allowed to access sudo on the system, which means execute as root, that means with full rights. Let&#8217;s try that again. Then our script should actually start and perform the installation of MetaTrader 5. Various package lists are now being downloaded here. Yes, I want to continue. The MetaTrader and some Linux files are now being installed in the background. These include Wine, among other things. Wine is a Windows emulator. The logo is this red wine glass and you can install it directly from the sources of the Linux distribution. The advantage is that Wine is able to run Windows programs on a Linux system. Meanwhile, we have already reached version 10, so it has been around for a few years and you can now get graphically demanding games to run with it. Our MetaTrader doesn&#8217;t need that much graphics power. Nevertheless, quite a bit is installed. The nice thing is that it&#8217;s all automated now. In the past, you had to do some tricks.</p>
<p>&nbsp;</p>
<p>Here is the MT5 Setup EXE. Now there is a Wine-Mono package for the Dotnet environment. And when that&#8217;s done, we should be done pretty quickly. And now it&#8217;s time. We can start the MetaTrader 5. In the past, there was always a problem here, where you had to change one or two settings, because otherwise you couldn&#8217;t load any installation data. This works much better now and the installation is already complete. Our MetaTrader 5 is installed and started. The next video will continue with the setup.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3b/">MQL5 TUTORIAL &#8211; Christmas Edition Part 3B</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 3</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3/</link>
		
		
		<pubDate>Fri, 03 Jan 2025 17:06:32 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4384</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; First of all, let&#8217;s create a new server that we can then use to operate our system later. I already have two servers here that are for AI solutions that I create for companies, but we will now add a server for trading. This is relatively easy to do at Hetzner, is GDPR-compliant and also relatively inexpensive. We can opt for different operating systems here. I&#8217;ll take Debian here, I&#8217;d like a shared CPU for Intel AMD compatible systems and the cheapest version with 4 GB RAM and 40 GB memory for €3.29 a month is enough for me here. &#160; We click on Order now and here is already our third system. This is now being created. We can click on the three dots here to open the console and then we are already in the login area. The access data comes here by email. We copy the password, log in with it here on the server. The password must now be changed. In other words, we do that. That worked too. A short update so that the system files are updated. Now we&#8217;ll do an upgrade. This should actually be pretty fast. And as you can see, the performance isn&#8217;t bad at all. Considering that we booked a very affordable system, it&#8217;s running pretty quickly. We should be ready in a few seconds. OK, let&#8217;s try the graphical installation, because we had one or two problems with the ISO image. For example, the keyboard layout was wrong. That&#8217;s why I&#8217;m selecting German here. &#160; I&#8217;m in Germany, I speak German. Now it&#8217;s loading a bit. All in all, it&#8217;s pretty fast here. Now a few network components are being configured and I can assign a name. Let&#8217;s use MQL5 Tutorial. We&#8217;ll leave the domain as it is. Assign a password for the root user. Then I create my own account. I also have to assign a password for that. The partitioning is loaded. Everything on one partition. Continue. Yes, please format. And now the base system is installed. This may take a while. The server is running here in Nuremberg, in other words, it is GDPR-compliant in Germany. It will probably take a little while. I&#8217;ll get a drink then. The installation continues. We can still choose a server from which we will get the updates. We don&#8217;t need a proxy. Now software is being installed. No, I don&#8217;t want to send statistical data. And here we can now choose which graphical user interface we like. I&#8217;ll try KDE Plasma. Click on Next. Now we just have to wait for a while. We should be ready right now. Now the boot loader is being installed. &#160; Yes, please. One more short update. Final installation. The installation is complete and ready. Now we just eject our ISO image and restart our server. And if we&#8217;re lucky, we should see a graphical interface immediately. To do that, you have to turn on this GUI mode down here. Let&#8217;s see if our login works. KDE is loading here and here is our graphical desktop interface. All in German. For example, we can add our terminal to the bar down here and this time our umlauts work and the keyboard layout is completely in German. Firefox is already there too. In other words, we can open the metatrader5. com website. That works too. And this is where we can download Linux, which is what we will be doing in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3/">MQL5 TUTORIAL &#8211; Christmas Edition Part 3</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_50059"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/p08o2xar8i0?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>First of all, let&#8217;s create a new server that we can then use to operate our system later. I already have two servers here that are for AI solutions that I create for companies, but we will now add a server for trading. This is relatively easy to do at Hetzner, is GDPR-compliant and also relatively inexpensive. We can opt for different operating systems here. I&#8217;ll take Debian here, I&#8217;d like a shared CPU for Intel AMD compatible systems and the cheapest version with 4 GB RAM and 40 GB memory for €3.29 a month is enough for me here.</p>
<p>&nbsp;</p>
<p>We click on Order now and here is already our third system. This is now being created. We can click on the three dots here to open the console and then we are already in the login area. The access data comes here by email. We copy the password, log in with it here on the server. The password must now be changed. In other words, we do that. That worked too. A short update so that the system files are updated. Now we&#8217;ll do an upgrade. This should actually be pretty fast. And as you can see, the performance isn&#8217;t bad at all. Considering that we booked a very affordable system, it&#8217;s running pretty quickly. We should be ready in a few seconds. OK, let&#8217;s try the graphical installation, because we had one or two problems with the ISO image. For example, the keyboard layout was wrong. That&#8217;s why I&#8217;m selecting German here.</p>
<p>&nbsp;</p>
<p>I&#8217;m in Germany, I speak German. Now it&#8217;s loading a bit. All in all, it&#8217;s pretty fast here. Now a few network components are being configured and I can assign a name. Let&#8217;s use MQL5 Tutorial. We&#8217;ll leave the domain as it is. Assign a password for the root user. Then I create my own account. I also have to assign a password for that. The partitioning is loaded. Everything on one partition. Continue. Yes, please format. And now the base system is installed. This may take a while. The server is running here in Nuremberg, in other words, it is GDPR-compliant in Germany. It will probably take a little while. I&#8217;ll get a drink then. The installation continues. We can still choose a server from which we will get the updates. We don&#8217;t need a proxy. Now software is being installed. No, I don&#8217;t want to send statistical data. And here we can now choose which graphical user interface we like. I&#8217;ll try KDE Plasma. Click on Next. Now we just have to wait for a while. We should be ready right now. Now the boot loader is being installed.</p>
<p>&nbsp;</p>
<p>Yes, please. One more short update. Final installation. The installation is complete and ready. Now we just eject our ISO image and restart our server. And if we&#8217;re lucky, we should see a graphical interface immediately. To do that, you have to turn on this GUI mode down here. Let&#8217;s see if our login works. KDE is loading here and here is our graphical desktop interface. All in German. For example, we can add our terminal to the bar down here and this time our umlauts work and the keyboard layout is completely in German. Firefox is already there too. In other words, we can open the metatrader5. com website. That works too. And this is where we can download Linux, which is what we will be doing in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-3/">MQL5 TUTORIAL &#8211; Christmas Edition Part 3</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Christmas Edition Part 2</title>
		<link>https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-2/</link>
		
		
		<pubDate>Thu, 02 Jan 2025 17:04:08 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4382</guid>

					<description><![CDATA[<p>&#160; Trade the system yourself with Metaquotes demo accounts: https://swiy.co/RobotTrading &#160; If you have watched the last video and like the results, you might ask yourself at this point: What does this system actually do? To answer that, let&#8217;s go to the settings and turn on the visual mode. 14 years would be a bit much now. Let&#8217;s take 2024. I prefer the euro/US dollar because it is the most traded currency in the Forex sector. And I trade on the 1-hour chart because I believe that this is a period that most people take into account. And trading is partly about psychology, even though there are now a great many automated systems on the market. &#160; I have set a random delay here, I want to trade every single tick, in other words every price change, and my default value here is 10,000 US dollars. You can also switch this to euros. Now I&#8217;ll just click on Start Test and I also want to use visual mode. And what we see here is the so-called strategy tester. In the upper area, we see the individual candles. Each of them represents an hour. We have two moving averages here. These are calculated in such a way that there is a larger and a smaller long-term average, and these two averages can be used to determine the long-term trend direction. Here in the lower window, we see the Williams Percent Range oscillator. This has recently become my favorite oscillator for entries and, in my opinion, works very, very well. And up here in the area, we see all the text output. You can see here that buy and sell signals are generated and what is happening now is exactly what I said earlier. We see a myriad of positions being traded and for a human being it would be hard to bear at this point, because the account could potentially suffer quite a lot of damage here. But as we can see, it has been resolved and in the end result we should now see this drawdown appearing on the chart. &#160; Our system has recovered here and is now trading again. By the way, this is a problem with the Linux version. The display above is not really stable, because normally we would have to see a few more sliders and the display for the market data is also gone. However, we should be finished with our test in a moment, because it only takes about 3:30 minutes and we have already arrived in November. And at this point, most people would get scared and close their accounts. Unfortunately, such drawdowns cannot be avoided. There are always major or minor slumps in equity. Here my controller has now reappeared and I&#8217;m trying to speed it up. Of course, I now have 20 other programs running on my computer in addition to the recording software and the MetaTrader, and that puts a lot of strain on this Windows emulation. &#160; But we don&#8217;t have to go through with this now. The main thing is to explain how it works. It says up here that my license is about to expire. This has to do with the fact that the Robot Trading System is a system for end customers and each of them gets a separate license for an account. I&#8217;ll extend it for myself right away and the next video will be about the basics of making trading decisions here. That&#8217;s it for this video, and I&#8217;ll see you again in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-2/">MQL5 TUTORIAL &#8211; Christmas Edition Part 2</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_35494"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/SIq7f6Fd7_Q?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Trade the system yourself with Metaquotes demo accounts: <a href="https://swiy.co/RobotTrading"> </a></p>
<p>&nbsp;</p>
<p>If you have watched the last video and like the results, you might ask yourself at this point: What does this system actually do? To answer that, let&#8217;s go to the settings and turn on the visual mode. 14 years would be a bit much now. Let&#8217;s take 2024. I prefer the euro/US dollar because it is the most traded currency in the Forex sector. And I trade on the 1-hour chart because I believe that this is a period that most people take into account. And trading is partly about psychology, even though there are now a great many automated systems on the market.</p>
<p>&nbsp;</p>
<p>I have set a random delay here, I want to trade every single tick, in other words every price change, and my default value here is 10,000 US dollars. You can also switch this to euros. Now I&#8217;ll just click on Start Test and I also want to use visual mode. And what we see here is the so-called strategy tester. In the upper area, we see the individual candles. Each of them represents an hour. We have two moving averages here. These are calculated in such a way that there is a larger and a smaller long-term average, and these two averages can be used to determine the long-term trend direction. Here in the lower window, we see the Williams Percent Range oscillator. This has recently become my favorite oscillator for entries and, in my opinion, works very, very well. And up here in the area, we see all the text output. You can see here that buy and sell signals are generated and what is happening now is exactly what I said earlier. We see a myriad of positions being traded and for a human being it would be hard to bear at this point, because the account could potentially suffer quite a lot of damage here. But as we can see, it has been resolved and in the end result we should now see this drawdown appearing on the chart.</p>
<p>&nbsp;</p>
<p>Our system has recovered here and is now trading again. By the way, this is a problem with the Linux version. The display above is not really stable, because normally we would have to see a few more sliders and the display for the market data is also gone. However, we should be finished with our test in a moment, because it only takes about 3:30 minutes and we have already arrived in November. And at this point, most people would get scared and close their accounts. Unfortunately, such drawdowns cannot be avoided. There are always major or minor slumps in equity. Here my controller has now reappeared and I&#8217;m trying to speed it up. Of course, I now have 20 other programs running on my computer in addition to the recording software and the MetaTrader, and that puts a lot of strain on this Windows emulation.</p>
<p>&nbsp;</p>
<p>But we don&#8217;t have to go through with this now. The main thing is to explain how it works. It says up here that my license is about to expire. This has to do with the fact that the Robot Trading System is a system for end customers and each of them gets a separate license for an account. I&#8217;ll extend it for myself right away and the next video will be about the basics of making trading decisions here. That&#8217;s it for this video, and I&#8217;ll see you again in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-christmas-edition-part-2/">MQL5 TUTORIAL &#8211; Christmas Edition Part 2</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 Tutorial – How to simply adjust user input with MQL5</title>
		<link>https://mql5tutorial.com/mql5-tutorial-how-to-simply-adjust-user-input-with-mql5/</link>
		
		
		<pubDate>Sun, 15 Dec 2024 10:08:27 +0000</pubDate>
				<category><![CDATA[socialmedia2018]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=523</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-how-to-simply-adjust-user-input-with-mql5/"><img title="AlgorithmicTrading070" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/How%20to%20simply%20adjust%20user%20input%20with%20MQL5.png" alt="MQL5 Tutorial &#8211; How to simply adjust user input with MQL5" width="" /></a>
	</div>
<p>	&#160; Introduction to Enhancing a Simple Expert Advisor (00:00 &#8211; 00:07) Introduction to improving a simple expert advisor by allowing user adjustments, following the results of a year-long test. Reviewing the Year-Long Test Results (00:07 &#8211; 00:19) Overview of the test results: 73 trades made, with 54 short trades and 19 long trades, and the lack of adjustable inputs. Enabling User Adjustments for Lot Size (00:19 &#8211; 00:30) The goal to enable users to adjust the lot size of trades, which is currently hard-coded in the source code. Modifying the Expert Advisor to Include Input Variables (00:30 &#8211; 00:43) Steps to modify the expert advisor to include input variables, specifically for adjusting the lot size. Creating a Dynamic Input Variable for Lot Size (00:43 &#8211; 00:56) Instructions on creating a dynamic input variable for lot size, allowing it to be changed by the user. Replacing Fixed Lot Size with the New Variable (00:56 &#8211; 01:03) Replacing the fixed lot size in the code with the new variable and saving the changes. Compiling the Code and Testing the New Feature (01:03 &#8211; 01:17) Compiling the updated code and testing the new feature in Metatrader, with visualization enabled. Observing the Adjustable Lot Size in Action (01:17 &#8211; 01:28) Observing the first trade with the new adjustable lot size and stopping the test to change the input. Changing the Lot Size and Testing Again (01:28 &#8211; 01:43) Adjusting the lot size to a different value and testing again to demonstrate the flexibility of the new input feature. &#160; In one of our other videos we have created a simple buy trade system and this is the result of a whole year. It made seventy three trades, fifty four were short trades and nineteen were long trades. You see under the input tab we have absolutely no values here so we cannot set anything that is not hardcoded in our source code. Now we want the user to be able to adjust the Lot Size of a trade here, to do that we simply click on Simple Buy Trade and click Modify. This is how our short E.A. looks like and this is the Lot Size. To create a dynamic value that can be changed by the user you have to make it an input variable and will be a double variable, and we will call it MyLotSize. Let&#8217;s assign ten Micro Lot here, copy the name and exchange the fixed ten Micro Lot Size here with our new variable. I will save it as Simple Buy Trade with input. Let&#8217;s compile the code and hit F4 to bring up the Meta Trader. I will select the system here, check the visualization option and start the test. This is our first trade and its ten Micro Lot. Let&#8217;s stop the test, go to inputs and change it to 0.2, now it is 20 Micro Lot. If you make something adjustable by the user, you can do it by making it an input. Afterwards the value can be simply changed without recompiling the code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-simply-adjust-user-input-with-mql5/">MQL5 Tutorial &#8211; How to simply adjust user input with MQL5</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-how-to-simply-adjust-user-input-with-mql5/"><img title="AlgorithmicTrading070" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/How%20to%20simply%20adjust%20user%20input%20with%20MQL5.png" alt="MQL5 Tutorial &#8211; How to simply adjust user input with MQL5" width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>&nbsp;</p>
<ol>
<li><strong>Introduction to Enhancing a Simple Expert Advisor</strong> (00:00 &#8211; 00:07) Introduction to improving a simple expert advisor by allowing user adjustments, following the results of a year-long test.</li>
<li><strong>Reviewing the Year-Long Test Results</strong> (00:07 &#8211; 00:19) Overview of the test results: 73 trades made, with 54 short trades and 19 long trades, and the lack of adjustable inputs.</li>
<li><strong>Enabling User Adjustments for Lot Size</strong> (00:19 &#8211; 00:30) The goal to enable users to adjust the lot size of trades, which is currently hard-coded in the source code.</li>
<li><strong>Modifying the Expert Advisor to Include Input Variables</strong> (00:30 &#8211; 00:43) Steps to modify the expert advisor to include input variables, specifically for adjusting the lot size.</li>
<li><strong>Creating a Dynamic Input Variable for Lot Size</strong> (00:43 &#8211; 00:56) Instructions on creating a dynamic input variable for lot size, allowing it to be changed by the user.</li>
<li><strong>Replacing Fixed Lot Size with the New Variable</strong> (00:56 &#8211; 01:03) Replacing the fixed lot size in the code with the new variable and saving the changes.</li>
<li><strong>Compiling the Code and Testing the New Feature</strong> (01:03 &#8211; 01:17) Compiling the updated code and testing the new feature in Metatrader, with visualization enabled.</li>
<li><strong>Observing the Adjustable Lot Size in Action</strong> (01:17 &#8211; 01:28) Observing the first trade with the new adjustable lot size and stopping the test to change the input.</li>
<li><strong>Changing the Lot Size and Testing Again</strong> (01:28 &#8211; 01:43) Adjusting the lot size to a different value and testing again to demonstrate the flexibility of the new input feature.</li>
</ol>
<p>&nbsp;</p>
<p>In one of our other videos we have created a simple buy trade system and this is the result of a whole year.<br />
It made seventy three trades, fifty four were short trades and nineteen were long trades.<br />
You see under the input tab we have absolutely no values here so we cannot set anything that is not hardcoded in our source code.<br />
Now we want the user to be able to adjust the Lot Size of a trade here, to do that we simply click on Simple Buy Trade and click Modify.<br />
This is how our short E.A. looks like and this is the Lot Size.<br />
To create a dynamic value that can be changed by the user you have to make it an input variable and will be a double variable, and we will call it MyLotSize.<br />
Let&#8217;s assign ten Micro Lot here, copy the name and exchange the fixed ten Micro Lot Size here with our new variable.<br />
I will save it as Simple Buy Trade with input. Let&#8217;s compile the code and hit F4 to bring up the Meta Trader.<br />
I will select the system here, check the visualization option and start the test. This is our first trade and its ten Micro Lot.<br />
Let&#8217;s stop the test, go to inputs and change it to 0.2, now it is 20 Micro Lot.<br />
If you make something adjustable by the user, you can do it by making it an input.<br />
Afterwards the value can be simply changed without recompiling the code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-simple-buy-trade-with-user-input-ea-from-mql5-tutorial/?tmstv=1777110366" rel="nofollow" id="download-link-464" data-redirect="false" >
	Download &ldquo;MQL5 Simple Buy Trade with User Input EA from MQL5 Tutorial&rdquo;	<small>SimpleBuyTradeWithInput.txt		&ndash; Downloaded 453 times		&ndash; 381.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-simply-adjust-user-input-with-mql5/">MQL5 Tutorial &#8211; How to simply adjust user input with MQL5</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="6581426" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/podcast/MQL5-Tutorial-How-to-simply-adjust-user-input.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>1:51</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>&amp;#160; Introduction to Enhancing a Simple Expert Advisor (00:00 &amp;#8211; 00:07) Introduction to improving a simple expert advisor by allowing user adjustments, following the results of a year-long test. Reviewing the Year-Long Test Results (00:07 &amp;#8211; 00:19) Overview of the test results: 73 trades made, with 54 short trades and 19 long trades, and the lack of adjustable inputs. Enabling User Adjustments for Lot Size (00:19 &amp;#8211; 00:30) The goal to enable users to adjust the lot size of trades, which is currently hard-coded in the source code. Modifying the Expert Advisor to Include Input Variables (00:30 &amp;#8211; 00:43) Steps to modify the expert advisor to include input variables, specifically for adjusting the lot size. Creating a Dynamic Input Variable for Lot Size (00:43 &amp;#8211; 00:56) Instructions on creating a dynamic input variable for lot size, allowing it to be changed by the user. Replacing Fixed Lot Size with the New Variable (00:56 &amp;#8211; 01:03) Replacing the fixed lot size in the code with the new variable and saving the changes. Compiling the Code and Testing the New Feature (01:03 &amp;#8211; 01:17) Compiling the updated code and testing the new feature in Metatrader, with visualization enabled. Observing the Adjustable Lot Size in Action (01:17 &amp;#8211; 01:28) Observing the first trade with the new adjustable lot size and stopping the test to change the input. Changing the Lot Size and Testing Again (01:28 &amp;#8211; 01:43) Adjusting the lot size to a different value and testing again to demonstrate the flexibility of the new input feature. &amp;#160; In one of our other videos we have created a simple buy trade system and this is the result of a whole year. It made seventy three trades, fifty four were short trades and nineteen were long trades. You see under the input tab we have absolutely no values here so we cannot set anything that is not hardcoded in our source code. Now we want the user to be able to adjust the Lot Size of a trade here, to do that we simply click on Simple Buy Trade and click Modify. This is how our short E.A. looks like and this is the Lot Size. To create a dynamic value that can be changed by the user you have to make it an input variable and will be a double variable, and we will call it MyLotSize. Let&amp;#8217;s assign ten Micro Lot here, copy the name and exchange the fixed ten Micro Lot Size here with our new variable. I will save it as Simple Buy Trade with input. Let&amp;#8217;s compile the code and hit F4 to bring up the Meta Trader. I will select the system here, check the visualization option and start the test. This is our first trade and its ten Micro Lot. Let&amp;#8217;s stop the test, go to inputs and change it to 0.2, now it is 20 Micro Lot. If you make something adjustable by the user, you can do it by making it an input. Afterwards the value can be simply changed without recompiling the code. The post MQL5 Tutorial &amp;#8211; How to simply adjust user input with MQL5 appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>&amp;#160; Introduction to Enhancing a Simple Expert Advisor (00:00 &amp;#8211; 00:07) Introduction to improving a simple expert advisor by allowing user adjustments, following the results of a year-long test. Reviewing the Year-Long Test Results (00:07 &amp;#8211; 00:19) Overview of the test results: 73 trades made, with 54 short trades and 19 long trades, and the lack of adjustable inputs. Enabling User Adjustments for Lot Size (00:19 &amp;#8211; 00:30) The goal to enable users to adjust the lot size of trades, which is currently hard-coded in the source code. Modifying the Expert Advisor to Include Input Variables (00:30 &amp;#8211; 00:43) Steps to modify the expert advisor to include input variables, specifically for adjusting the lot size. Creating a Dynamic Input Variable for Lot Size (00:43 &amp;#8211; 00:56) Instructions on creating a dynamic input variable for lot size, allowing it to be changed by the user. Replacing Fixed Lot Size with the New Variable (00:56 &amp;#8211; 01:03) Replacing the fixed lot size in the code with the new variable and saving the changes. Compiling the Code and Testing the New Feature (01:03 &amp;#8211; 01:17) Compiling the updated code and testing the new feature in Metatrader, with visualization enabled. Observing the Adjustable Lot Size in Action (01:17 &amp;#8211; 01:28) Observing the first trade with the new adjustable lot size and stopping the test to change the input. Changing the Lot Size and Testing Again (01:28 &amp;#8211; 01:43) Adjusting the lot size to a different value and testing again to demonstrate the flexibility of the new input feature. &amp;#160; In one of our other videos we have created a simple buy trade system and this is the result of a whole year. It made seventy three trades, fifty four were short trades and nineteen were long trades. You see under the input tab we have absolutely no values here so we cannot set anything that is not hardcoded in our source code. Now we want the user to be able to adjust the Lot Size of a trade here, to do that we simply click on Simple Buy Trade and click Modify. This is how our short E.A. looks like and this is the Lot Size. To create a dynamic value that can be changed by the user you have to make it an input variable and will be a double variable, and we will call it MyLotSize. Let&amp;#8217;s assign ten Micro Lot here, copy the name and exchange the fixed ten Micro Lot Size here with our new variable. I will save it as Simple Buy Trade with input. Let&amp;#8217;s compile the code and hit F4 to bring up the Meta Trader. I will select the system here, check the visualization option and start the test. This is our first trade and its ten Micro Lot. Let&amp;#8217;s stop the test, go to inputs and change it to 0.2, now it is 20 Micro Lot. If you make something adjustable by the user, you can do it by making it an input. Afterwards the value can be simply changed without recompiling the code. The post MQL5 Tutorial &amp;#8211; How to simply adjust user input with MQL5 appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – Simple Commodity Channel Index</title>
		<link>https://mql5tutorial.com/mql5-tutorial-a-simple-commodity-channel-index/</link>
		
		
		<pubDate>Sun, 08 Dec 2024 14:31:47 +0000</pubDate>
				<category><![CDATA[socialmedia2018]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MQL5 Entry Signals]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=640</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-a-simple-commodity-channel-index/"><img title="A businessman looking at his laptop at night." src="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Commodity-Channel-Index.png" alt="A businessman looking at his laptop at night." width="" /></a>
	</div>
<p>	With MQL5 for Metatrader5 we can use the ICCI function that is built in to create an Expert Advisor that will use the Commodity Channel Index Indicator to create entry signals on our Forex Trading Chart&#8230; This video is about the commodity channel index. The commodity channel index is an oscillator and it will tell you if something is overbought or oversold. This is one of the oscillators I like because it is very easy to understand. It has one hundred plus and a one hundred minus line here and whenever the value rises above the upper line, it&#8217;s overbought. In the other case if the indicator falls below the lower line, it&#8217;s oversold. The commodity channel index can be created with the MQL 5 function ICCI that is built-in into MQL 5. And now we want to create a little Expert Advisor that will tell us when the market is overbought or oversold. To do that please click the little button here or hit the F4 key on your keyboard. That will bring up the Meta Editor, and here we want to select File, New, Expert Advisor from template, continue. And we will call the Expert Advisor Simple Commodity Channel Index. Now click on Continue, Continue, Finish, everything above the Ontick function can be removed and we will also delete the two comment lines here and we will start by creating a little array for our prices. It’s a double array and we will call it my price array. And for the definition of our commodity channel index, we will use the ICCI function of MQL 5. For the current symbol on the chart and the selected period, this might be Euro/U.S. dollar and this might be the minute chart or the hourly chart, and the calculation is done for fourteen candles, because this is the default value of the commodity channel index when you drag it on your chart by using Insert, Indicators, Oscillators, commodity channel index. And it is calculated based on the close prices. In the next step we need to sort the price array from the current candle downwards by using the function arraysetasseries for the price we have created here. And now we use copy buffer for the CCI definition from line here. This is for the first line, it is line zero. And for the current candle that&#8217;s candle zero, and we need the values for three candles, that&#8217;s the three here, and we want to store the results in my price array. We want to get the CCI value of the current candle in our price array. Okay now we need the chart output depending on the value so if our value is above the upper line we want to put the text “Overbought” on our chart by using the comment function. And if it&#8217;s below the lower line we want to output the text “Oversold.” And when it&#8217;s between the lines we just use an empty output because we have no signal. Okay that&#8217;s it. If you&#8217;re ready, please click on the little compile button here or hit the F7 key on your keyboard. That should compile your Expert Advisor without any error or warnings. And in that case we want to bring up the MetaTrader by pressing the F4 key or hitting the little button over here. In Metatrader please click on View, Strategy Tester or hit control and R. That should show you the strategy tester panel, and here we want to select the simple commodity channel index.ex5 file. Please make sure to mark the visualisation option here and click on start. And here is our Expert Advisor at work. Now it&#8217;s below the lower line and then it says oversold and when it&#8217;s above the upper line it says overbought. Okay, now you know how you can use the Commodity Channel Index Indicator to create entry signals in your own Expert Advisor. And you have done it yourself with a few lines of MQL 5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-a-simple-commodity-channel-index/">MQL5 Tutorial &#8211; Simple Commodity Channel Index</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-a-simple-commodity-channel-index/"><img title="A businessman looking at his laptop at night." src="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Commodity-Channel-Index.png" alt="A businessman looking at his laptop at night." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
With MQL5 for Metatrader5 we can use the ICCI function that is built in to create an Expert Advisor that will use the Commodity Channel Index Indicator to create entry signals on our Forex Trading Chart&#8230;</p>
<p>This video is about the commodity channel index.<br />
The commodity channel index is an oscillator and it will tell you if something is overbought or oversold.<br />
This is one of the oscillators I like because it is very easy to understand.<br />
It has one hundred plus and a one hundred minus line here and whenever the value rises above the upper line, it&#8217;s overbought.<br />
In the other case if the indicator falls below the lower line, it&#8217;s oversold.<br />
The commodity channel index can be created with the MQL 5 function ICCI that is built-in into MQL 5.<br />
And now we want to create a little Expert Advisor that will tell us when the market is overbought or oversold.<br />
To do that please click the little button here or hit the F4 key on your keyboard. That will bring up the Meta Editor, and here we want to select File, New, Expert Advisor from template, continue.<br />
And we will call the Expert Advisor Simple Commodity Channel Index. Now click on Continue, Continue, Finish, everything above the Ontick function can be removed and we will also delete the two comment lines here and we will start by creating a little array for our prices.<br />
It’s a double array and we will call it my price array. And for the definition of our commodity channel index, we will use the ICCI function of MQL 5.<br />
For the current symbol on the chart and the selected period, this might be Euro/U.S. dollar and this might be the minute chart or the hourly chart, and the calculation is done for fourteen candles, because this is the default value of the commodity channel index when you drag it on your chart by using Insert, Indicators, Oscillators, commodity channel index.<br />
And it is calculated based on the close prices.<br />
In the next step we need to sort the price array from the current candle downwards by using the function arraysetasseries for the price we have created here.<br />
And now we use copy buffer for the CCI definition from line here.<br />
This is for the first line, it is line zero. And for the current candle that&#8217;s candle zero, and we need the values for three candles, that&#8217;s the three here, and we want to store the results in my price array.<br />
We want to get the CCI value of the current candle in our price array.<br />
Okay now we need the chart output depending on the value so if our value is above the upper line we want to put the text “Overbought” on our chart by using the comment function.<br />
And if it&#8217;s below the lower line we want to output the text “Oversold.”<br />
And when it&#8217;s between the lines we just use an empty output because we have no signal.<br />
Okay that&#8217;s it. If you&#8217;re ready, please click on the little compile button here or hit the F7 key on your keyboard.<br />
That should compile your Expert Advisor without any error or warnings. And in that case we want to bring up the MetaTrader by pressing the F4 key or hitting the little button over here.<br />
In Metatrader please click on View, Strategy Tester or hit control and R. That should show you the strategy tester panel, and here we want to select the simple commodity channel index.ex5 file.<br />
Please make sure to mark the visualisation option here and click on start. And here is our Expert Advisor at work.<br />
Now it&#8217;s below the lower line and then it says oversold and when it&#8217;s above the upper line it says overbought.<br />
Okay, now you know how you can use the Commodity Channel Index Indicator to create entry signals in your own Expert Advisor. And you have done it yourself with a few lines of MQL 5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-simple-commodity-channel-index-expert-advisor-from-mql5-tutorial/?tmstv=1777110366" rel="nofollow" id="download-link-643" data-redirect="false" >
	Download &ldquo;MQL5 Simple Commodity Channel Index Expert Advisor from MQL5 Tutorial&rdquo;	<small>SimpleCommodityChannelIndex.txt		&ndash; Downloaded 344 times		&ndash; 928.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-a-simple-commodity-channel-index/">MQL5 Tutorial &#8211; Simple Commodity Channel Index</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="15429386" type="video/mp4" url="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Commodity-Channel-Index.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>5:16</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>With MQL5 for Metatrader5 we can use the ICCI function that is built in to create an Expert Advisor that will use the Commodity Channel Index Indicator to create entry signals on our Forex Trading Chart&amp;#8230; This video is about the commodity channel index. The commodity channel index is an oscillator and it will tell you if something is overbought or oversold. This is one of the oscillators I like because it is very easy to understand. It has one hundred plus and a one hundred minus line here and whenever the value rises above the upper line, it&amp;#8217;s overbought. In the other case if the indicator falls below the lower line, it&amp;#8217;s oversold. The commodity channel index can be created with the MQL 5 function ICCI that is built-in into MQL 5. And now we want to create a little Expert Advisor that will tell us when the market is overbought or oversold. To do that please click the little button here or hit the F4 key on your keyboard. That will bring up the Meta Editor, and here we want to select File, New, Expert Advisor from template, continue. And we will call the Expert Advisor Simple Commodity Channel Index. Now click on Continue, Continue, Finish, everything above the Ontick function can be removed and we will also delete the two comment lines here and we will start by creating a little array for our prices. It’s a double array and we will call it my price array. And for the definition of our commodity channel index, we will use the ICCI function of MQL 5. For the current symbol on the chart and the selected period, this might be Euro/U.S. dollar and this might be the minute chart or the hourly chart, and the calculation is done for fourteen candles, because this is the default value of the commodity channel index when you drag it on your chart by using Insert, Indicators, Oscillators, commodity channel index. And it is calculated based on the close prices. In the next step we need to sort the price array from the current candle downwards by using the function arraysetasseries for the price we have created here. And now we use copy buffer for the CCI definition from line here. This is for the first line, it is line zero. And for the current candle that&amp;#8217;s candle zero, and we need the values for three candles, that&amp;#8217;s the three here, and we want to store the results in my price array. We want to get the CCI value of the current candle in our price array. Okay now we need the chart output depending on the value so if our value is above the upper line we want to put the text “Overbought” on our chart by using the comment function. And if it&amp;#8217;s below the lower line we want to output the text “Oversold.” And when it&amp;#8217;s between the lines we just use an empty output because we have no signal. Okay that&amp;#8217;s it. If you&amp;#8217;re ready, please click on the little compile button here or hit the F7 key on your keyboard. That should compile your Expert Advisor without any error or warnings. And in that case we want to bring up the MetaTrader by pressing the F4 key or hitting the little button over here. In Metatrader please click on View, Strategy Tester or hit control and R. That should show you the strategy tester panel, and here we want to select the simple commodity channel index.ex5 file. Please make sure to mark the visualisation option here and click on start. And here is our Expert Advisor at work. Now it&amp;#8217;s below the lower line and then it says oversold and when it&amp;#8217;s above the upper line it says overbought. Okay, now you know how you can use the Commodity Channel Index Indicator to create entry signals in your own Expert Advisor. And you have done it yourself with a few lines of MQL 5 code. The post MQL5 Tutorial &amp;#8211; Simple Commodity Channel Index appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>With MQL5 for Metatrader5 we can use the ICCI function that is built in to create an Expert Advisor that will use the Commodity Channel Index Indicator to create entry signals on our Forex Trading Chart&amp;#8230; This video is about the commodity channel index. The commodity channel index is an oscillator and it will tell you if something is overbought or oversold. This is one of the oscillators I like because it is very easy to understand. It has one hundred plus and a one hundred minus line here and whenever the value rises above the upper line, it&amp;#8217;s overbought. In the other case if the indicator falls below the lower line, it&amp;#8217;s oversold. The commodity channel index can be created with the MQL 5 function ICCI that is built-in into MQL 5. And now we want to create a little Expert Advisor that will tell us when the market is overbought or oversold. To do that please click the little button here or hit the F4 key on your keyboard. That will bring up the Meta Editor, and here we want to select File, New, Expert Advisor from template, continue. And we will call the Expert Advisor Simple Commodity Channel Index. Now click on Continue, Continue, Finish, everything above the Ontick function can be removed and we will also delete the two comment lines here and we will start by creating a little array for our prices. It’s a double array and we will call it my price array. And for the definition of our commodity channel index, we will use the ICCI function of MQL 5. For the current symbol on the chart and the selected period, this might be Euro/U.S. dollar and this might be the minute chart or the hourly chart, and the calculation is done for fourteen candles, because this is the default value of the commodity channel index when you drag it on your chart by using Insert, Indicators, Oscillators, commodity channel index. And it is calculated based on the close prices. In the next step we need to sort the price array from the current candle downwards by using the function arraysetasseries for the price we have created here. And now we use copy buffer for the CCI definition from line here. This is for the first line, it is line zero. And for the current candle that&amp;#8217;s candle zero, and we need the values for three candles, that&amp;#8217;s the three here, and we want to store the results in my price array. We want to get the CCI value of the current candle in our price array. Okay now we need the chart output depending on the value so if our value is above the upper line we want to put the text “Overbought” on our chart by using the comment function. And if it&amp;#8217;s below the lower line we want to output the text “Oversold.” And when it&amp;#8217;s between the lines we just use an empty output because we have no signal. Okay that&amp;#8217;s it. If you&amp;#8217;re ready, please click on the little compile button here or hit the F7 key on your keyboard. That should compile your Expert Advisor without any error or warnings. And in that case we want to bring up the MetaTrader by pressing the F4 key or hitting the little button over here. In Metatrader please click on View, Strategy Tester or hit control and R. That should show you the strategy tester panel, and here we want to select the simple commodity channel index.ex5 file. Please make sure to mark the visualisation option here and click on start. And here is our Expert Advisor at work. Now it&amp;#8217;s below the lower line and then it says oversold and when it&amp;#8217;s above the upper line it says overbought. Okay, now you know how you can use the Commodity Channel Index Indicator to create entry signals in your own Expert Advisor. And you have done it yourself with a few lines of MQL 5 code. The post MQL5 Tutorial &amp;#8211; Simple Commodity Channel Index appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 TUTORIAL – Multi Currency Trading explained (in 4 min)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-multi-currency-trading-explained-in-4-min/</link>
		
		
		<pubDate>Sun, 10 Nov 2024 10:59:40 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4367</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-multi-currency-trading-explained-in-4-min/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/Basics/AI/78-Multi-Currency-Order/Thumbnail.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
<p>	&#160; In this video, we are going to create an Expert Advisor. Let&#8217;s see how we can do that. We start by opening Metaeditor, which can be done by clicking a little icon or pressing F4. The code begins by including the Trade module, which provides functions for trading operations. We then create an instance of the CTrade class, which will allow us to execute buy and sell trades. An input variable named MassTest is defined with a default value of 1, which can be used for mass testing purposes. The OnTick function is where the main logic of the Expert Advisor is executed. First, we calculate the Ask price for the current symbol and normalize it to the number of digits specified by the _Digits variable. Similarly, we calculate and normalize the Ask prices for the GBPUSD and USDCAD currency pairs. &#160; Next, we calculate the Bid price for the current symbol and normalize it, followed by the Bid prices for GBPUSD and USDCAD. A string variable named signal is created to store the trading signal. We initialize the random number generator using the current tick count and generate a random number between 0 and 1. If the random number is 0, we set the signal to &#8220;buy,&#8221; and if it is 1, we set the signal to &#8220;sell.&#8221; If the signal is &#8220;sell&#8221; and the total number of open positions is less than 10, we execute a sell trade for 0.10 lots, which is equivalent to 10 Micro Lots. The trade is executed at the Bid price with a take profit set 250 points below the Bid price. This process is repeated for the GBPUSD and USDCAD currency pairs. If the signal is &#8220;buy&#8221; and the total number of open positions is less than 10, we execute a buy trade for 0.10 lots at the Ask price with a take profit set 250 points above the Ask price. This is also repeated for the GBPUSD and USDCAD pairs. &#160; Once the code is complete, we press F7 to compile it. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you might want to check out the Premium course on our website or watch one of the basic videos first. After compiling, we go back to MetaTrader by pressing F4 or clicking on the icon. In MetaTrader, we press Control and R to start the strategy tester, select the Expert Advisor we just created, enable the visual mode, and start a strategy test. We should then see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, feel free to send us an email. In this video, we have learned how to create an Expert Advisor that uses random signals to execute buy and sell trades with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-multi-currency-trading-explained-in-4-min/">MQL5 TUTORIAL &#8211; Multi Currency Trading explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-multi-currency-trading-explained-in-4-min/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/Basics/AI/78-Multi-Currency-Order/Thumbnail.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">In this video, we are going to create an Expert Advisor. Let&#8217;s see how we can do that. We start by opening Metaeditor, which can be done by clicking a little icon or pressing F4. The code begins by including the Trade module, which provides functions for trading operations. We then create an instance of the CTrade class, which will allow us to execute buy and sell trades. An input variable named MassTest is defined with a default value of 1, which can be used for mass testing purposes. The OnTick function is where the main logic of the Expert Advisor is executed. First, we calculate the Ask price for the current symbol and normalize it to the number of digits specified by the _Digits variable. Similarly, we calculate and normalize the Ask prices for the GBPUSD and USDCAD currency pairs. </span></span></p>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">Next, we calculate the Bid price for the current symbol and normalize it, followed by the Bid prices for GBPUSD and USDCAD. A string variable named signal is created to store the trading signal. We initialize the random number generator using the current tick count and generate a random number between 0 and 1. If the random number is 0, we set the signal to &#8220;buy,&#8221; and if it is 1, we set the signal to &#8220;sell.&#8221; If the signal is &#8220;sell&#8221; and the total number of open positions is less than 10, we execute a sell trade for 0.10 lots, which is equivalent to 10 Micro Lots. The trade is executed at the Bid price with a take profit set 250 points below the Bid price. This process is repeated for the GBPUSD and USDCAD currency pairs. If the signal is &#8220;buy&#8221; and the total number of open positions is less than 10, we execute a buy trade for 0.10 lots at the Ask price with a take profit set 250 points above the Ask price. This is also repeated for the GBPUSD and USDCAD pairs. </span></span></p>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">Once the code is complete, we press F7 to compile it. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you might want to check out the Premium course on our website or watch one of the basic videos first. After compiling, we go back to MetaTrader by pressing F4 or clicking on the icon. In MetaTrader, we press Control and R to start the strategy tester, select the Expert Advisor we just created, enable the visual mode, and start a strategy test. We should then see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, feel free to send us an email. In this video, we have learned how to create an Expert Advisor that uses random signals to execute buy and sell trades with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</span></span></p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-multi-currency-trading-explained-in-4-min/">MQL5 TUTORIAL &#8211; Multi Currency Trading explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – How to draw arrow symbols on the Chart (explained in 3 min)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-how-to-draw-arrow-symbols-on-the-chart-explained-in-3-min/</link>
		
		
		<pubDate>Wed, 02 Oct 2024 09:31:38 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4356</guid>

					<description><![CDATA[<p>&#160; https://mql5tutorial.com/?arrow &#160; In this video, we are going to create an Expert Advisor that places an arrow object on the chart at the medium price between the current Ask and Bid prices. Let&#8217;s see how we can do that. We start Metaeditor by clicking the little icon or pressing F4. First, we get the current Ask price using the SymbolInfoDouble function with the SYMBOL_ASK parameter. The NormalizeDouble function is used to format the Ask price to the number of digits specified by _Digits. Next, we get the current Bid price in a similar manner, using the SymbolInfoDouble function with the SYMBOL_BID parameter, and again formatting it with NormalizeDouble. We then calculate the medium price by averaging the Ask and Bid prices. This is done by adding the Ask and Bid prices together and dividing by two. To generate a random number, we initialize the random generator with MathSrand using the current tick count from GetTickCount. We then calculate a random number between 0 and 99 using MathRand and the modulo operator. We create an arrow object named MyObject on the chart using ObjectCreate. &#160; The parameters include the symbol, object name, object type (OBJ_ARROW), and the time and price where the object will be placed, which are TimeCurrent and the medium price, respectively. The arrow code for the object is set using ObjectSetInteger with the OBJPROP_ARROWCODE property and the random number generated earlier. We set the size of the arrow object using ObjectSetInteger with the OBJPROP_WIDTH property and a value of 20. The object is moved to the current candle high using ObjectMove, with parameters including the symbol, object name, time, and medium price. Finally, we display a comment on the chart showing the Ask price, Bid price, and medium price using the Comment function. After writing the code, we press F7 to compile it. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website or watch one of the basic videos first. &#160; If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that places an arrow object on the chart at the medium price between the current Ask and Bid prices with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-draw-arrow-symbols-on-the-chart-explained-in-3-min/">MQL5 TUTORIAL &#8211; How to draw arrow symbols on the Chart (explained in 3 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_13030"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/cTxtmvRvER0?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p><a href="https://mql5tutorial.com/?arrow"> </a></p>
<p>&nbsp;</p>
<p>In this video, we are going to create an Expert Advisor that places an arrow object on the chart at the medium price between the current Ask and Bid prices. Let&#8217;s see how we can do that. We start Metaeditor by clicking the little icon or pressing F4. First, we get the current Ask price using the SymbolInfoDouble function with the SYMBOL_ASK parameter. The NormalizeDouble function is used to format the Ask price to the number of digits specified by _Digits. Next, we get the current Bid price in a similar manner, using the SymbolInfoDouble function with the SYMBOL_BID parameter, and again formatting it with NormalizeDouble. We then calculate the medium price by averaging the Ask and Bid prices. This is done by adding the Ask and Bid prices together and dividing by two. To generate a random number, we initialize the random generator with MathSrand using the current tick count from GetTickCount. We then calculate a random number between 0 and 99 using MathRand and the modulo operator. We create an arrow object named MyObject on the chart using ObjectCreate.</p>
<p>&nbsp;</p>
<p>The parameters include the symbol, object name, object type (OBJ_ARROW), and the time and price where the object will be placed, which are TimeCurrent and the medium price, respectively. The arrow code for the object is set using ObjectSetInteger with the OBJPROP_ARROWCODE property and the random number generated earlier. We set the size of the arrow object using ObjectSetInteger with the OBJPROP_WIDTH property and a value of 20. The object is moved to the current candle high using ObjectMove, with parameters including the symbol, object name, time, and medium price. Finally, we display a comment on the chart showing the Ask price, Bid price, and medium price using the Comment function. After writing the code, we press F7 to compile it. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website or watch one of the basic videos first.</p>
<p>&nbsp;</p>
<p>If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that places an arrow object on the chart at the medium price between the current Ask and Bid prices with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-draw-arrow-symbols-on-the-chart-explained-in-3-min/">MQL5 TUTORIAL &#8211; How to draw arrow symbols on the Chart (explained in 3 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Spread Filter explained (in 4 min)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-spread-filter-explained-in-4-min/</link>
		
		
		<pubDate>Sun, 29 Sep 2024 09:29:39 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4354</guid>

					<description><![CDATA[<p>&#160; https://mql5tutorial.com/?s=spread &#160; In this video, we are going to create an Expert Advisor that trades based on the spread and the price movement of the last few candles. Let&#8217;s see how we can do that. First, we start Metaeditor by clicking the little icon or pressing F4. We include the Trade.mqh library, which provides trading functions. We create an instance of the CTrade class called trade. We also define a user input parameter MaxSpreadAllowed, which sets the maximum spread value allowed for trading. In the OnTick function, we begin by calculating the Ask price using the SymbolInfoDouble function and normalizing it to the number of digits for the current symbol. Similarly, we calculate the Bid price. We then create a string variable named signal to store our trading signal. Next, we create an array of MqlRates structures called PriceArray to store price data. We set the array to be sorted from the current candle downwards using ArraySetAsSeries. We fill the array with price data for the last three candles using the CopyRates function. We calculate the current spread using the SymbolInfoInteger function and store it in the variable CurrentSpread. &#160; We create an empty string called SpreadFilter to store the spread filter status. We then check if the current spread is above or below the allowed spread. If the current spread is greater than or equal to MaxSpreadAllowed, we set SpreadFilter to indicate that trading is not allowed. If the current spread is less than or equal to MaxSpreadAllowed, we set SpreadFilter to indicate that trading is allowed. We analyze the price movement by comparing the closing prices of the last two candles. If the closing price of the previous candle is higher than the one before it, we set the signal to &#8220;buy&#8221;. If the closing price of the previous candle is lower, we set the signal to &#8220;sell&#8221;. If trading is allowed based on the spread filter, we proceed with the trading logic. If the signal is &#8220;sell&#8221; and there are no open positions, we execute a sell order for 0.10 lots (10 micro lots) at the Bid price with a stop loss set 150 points below the Bid price. &#160; If the signal is &#8220;buy&#8221; and there are no open positions, we execute a buy order for 0.10 lots (10 micro lots) at the Ask price with a stop loss set 150 points above the Ask price. Finally, we create a chart output using the Comment function to display the current spread, the allowed spread, and the trading status based on the spread filter. We press F7 to compile the code. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that trades based on the spread and the price movement of the last few candles with just a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-spread-filter-explained-in-4-min/">MQL5 TUTORIAL &#8211; Spread Filter explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_29990"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/hlexgog5Rhw?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p><a href="https://mql5tutorial.com/?s=spread"> </a></p>
<p>&nbsp;</p>
<p>In this video, we are going to create an Expert Advisor that trades based on the spread and the price movement of the last few candles. Let&#8217;s see how we can do that. First, we start Metaeditor by clicking the little icon or pressing F4. We include the Trade.mqh library, which provides trading functions. We create an instance of the CTrade class called trade. We also define a user input parameter MaxSpreadAllowed, which sets the maximum spread value allowed for trading. In the OnTick function, we begin by calculating the Ask price using the SymbolInfoDouble function and normalizing it to the number of digits for the current symbol. Similarly, we calculate the Bid price. We then create a string variable named signal to store our trading signal. Next, we create an array of MqlRates structures called PriceArray to store price data. We set the array to be sorted from the current candle downwards using ArraySetAsSeries. We fill the array with price data for the last three candles using the CopyRates function. We calculate the current spread using the SymbolInfoInteger function and store it in the variable CurrentSpread.</p>
<p>&nbsp;</p>
<p>We create an empty string called SpreadFilter to store the spread filter status. We then check if the current spread is above or below the allowed spread. If the current spread is greater than or equal to MaxSpreadAllowed, we set SpreadFilter to indicate that trading is not allowed. If the current spread is less than or equal to MaxSpreadAllowed, we set SpreadFilter to indicate that trading is allowed. We analyze the price movement by comparing the closing prices of the last two candles. If the closing price of the previous candle is higher than the one before it, we set the signal to &#8220;buy&#8221;. If the closing price of the previous candle is lower, we set the signal to &#8220;sell&#8221;. If trading is allowed based on the spread filter, we proceed with the trading logic. If the signal is &#8220;sell&#8221; and there are no open positions, we execute a sell order for 0.10 lots (10 micro lots) at the Bid price with a stop loss set 150 points below the Bid price.</p>
<p>&nbsp;</p>
<p>If the signal is &#8220;buy&#8221; and there are no open positions, we execute a buy order for 0.10 lots (10 micro lots) at the Ask price with a stop loss set 150 points above the Ask price. Finally, we create a chart output using the Comment function to display the current spread, the allowed spread, and the trading status based on the spread filter. We press F7 to compile the code. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that trades based on the spread and the price movement of the last few candles with just a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-spread-filter-explained-in-4-min/">MQL5 TUTORIAL &#8211; Spread Filter explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Simple Scales Fancy Fails ( Simple Robot Trading Strategy Revealed)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-scales-fancy-fails-simple-robot-trading-strategy-revealed/</link>
		
		
		<pubDate>Fri, 27 Sep 2024 17:36:33 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4359</guid>

					<description><![CDATA[<p>&#160; https://www.fxblue.com/users/37132419 &#160; As a trader, wouldn&#8217;t you like to make a bigger relative return than Warren Buffett does with his investments? And would you also like to know why most people would find that very boring? In this video, you will learn everything about the strategy that I use. This is something I wanted to show you because we have correlations, which means we have entries and exits, and we have this oscillator here. This is the Commodity channel Index, and you can see we have entries in blue and we have exits in red. And the idea is whenever we get below the lower line, we want to buy. And when we get into the profit, we want to sell. In this case, we have a blue arrow here, which means we have taken a trade. And once the profit goal was reached, it was closed here. And this is the chart that people like to show you because it all makes sense every time I have a spike below the lower line, we can open a trade and it runs into a profit. And that&#8217;s what people want to see. But from time to time, it can also go the other way. Like in this case, we had this entry signal. And it opened a trade here. That wasn&#8217;t a profit right away because the market went down. And the happy end is here when it was able to close the two open positions in a profit. So if we move the chart a little bit into the past, we can see these fan-like trading results. Here was the entry signal. We opened a buy trade, but the market went against us. And that is when we need to wait until it comes back. So how do we know if it comes back? Let&#8217;s zoom out and see what our two moving averages are doing. And here we can see on the long term With 1,000 candles for the green moving average and 1,100 candles for the red moving average, we have a long term uptrend. And that makes it likely that the uptrend is going to continue. Therefore, we expected the price to come back into the long-term trend because this would be a correction. And in most of the times, this will work. So let&#8217;s zoom out even more. And you see all the time, starting from the beginning of August until today, which is September the 27th, we had a long-term uptrend and we made a lot of trades, and that led to a lot of small profits. In this case, we are about 6.8% profitable. Actually, let&#8217;s have a look at the FX Blue stats for the system. It says 6.6%. This is in German because my operating system is in German, but you could Check out all the stats in the language that you prefer. And when we click on the risk tab here, we see we have about 1.7% each month. The current probability of a total loss is zero. And we have also seen bad days and bad weeks. And you could analyze each and every trade here. By the way, you don&#8217;t have to log in. But let&#8217;s say it is 6.6% for 116 days, and more than half of it was just the adjustment time to get the system up and running and change a few parameters until we started off in August. So let&#8217;s say this is a third of a year. We have 6.6%, so three times this value would be roughly 20%, which is also my yearly goal. And guess what the the S&#38;P average return is? According to Investopedia, the average return currently is about 10.26% since 1957! And now that we know that, what do you think is the average return for Warren Buffett, the greatest investor in the world, as some people call him? Well, according to Google, it&#8217;s about 10 %. And as we all know, Google knows everything. But if you look at his company, which is Berkshire Hathaway, this is about three times the return value. And if we go a little bit down, we see that Berkshire Hathaway has consistently outperformed the S&#38;P 500 since 1965. So some people might find about 18 to 20% gain per year totally boring. But I&#8217;m risk averse and I consider trading to be one thing that I do. My goal is not to live from this little account. It&#8217;s more about a combination of things that I use, and trading is just one part of that combination. And I like simple and consistent, like in this case. But what I could do is I could increase the trading risk here to a much higher value. But there is a reason for my values here. And we can see the reason here. This is a backtest result. This is the COVID-19 time, and this is today. I started in 2015, traded up until the current day, which isn&#8217;t October the 15th because we are in late September. This is actually five minutes. That&#8217;s a time frame that a lot of people would consider to be pure noise. Actually, I prefer to trade the one hour time frame. But I like consistent and slow growth with as little risk as possible, because most of the time it looks like this. And this is easy to watch without the urge to manipulate the system. This COVID spike here was very hard in a lot of ways for all of us. And by the way, in this case, I used a $10,000 account and it did 3,411 trades. So that is what I consider to be a good result. And that&#8217;s how I like my systems to behave. So if 6.8% is not enough for you and you want to double or triple your money every month, I would suggest to stop trading, because once you see a big drawdown, most likely you will want</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-scales-fancy-fails-simple-robot-trading-strategy-revealed/">MQL5 TUTORIAL &#8211; Simple Scales Fancy Fails ( Simple Robot Trading Strategy Revealed)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_46323"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/_F1qpb-y4iQ?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>
<p>&nbsp;</p>
<p>As a trader, wouldn&#8217;t you like to make a bigger relative return than Warren Buffett does with his investments? And would you also like to know why most people would find that very boring? In this video, you will learn everything about the strategy that I use. This is something I wanted to show you because we have correlations, which means we have entries and exits, and we have this oscillator here. This is the Commodity channel Index, and you can see we have entries in blue and we have exits in red. And the idea is whenever we get below the lower line, we want to buy. And when we get into the profit, we want to sell. In this case, we have a blue arrow here, which means we have taken a trade. And once the profit goal was reached, it was closed here. And this is the chart that people like to show you because it all makes sense every time I have a spike below the lower line, we can open a trade and it runs into a profit. And that&#8217;s what people want to see. But from time to time, it can also go the other way.</p>
<p>Like in this case, we had this entry signal. And it opened a trade here. That wasn&#8217;t a profit right away because the market went down. And the happy end is here when it was able to close the two open positions in a profit. So if we move the chart a little bit into the past, we can see these fan-like trading results. Here was the entry signal. We opened a buy trade, but the market went against us. And that is when we need to wait until it comes back. So how do we know if it comes back? Let&#8217;s zoom out and see what our two moving averages are doing. And here we can see on the long term With 1,000 candles for the green moving average and 1,100 candles for the red moving average, we have a long term uptrend. And that makes it likely that the uptrend is going to continue. Therefore, we expected the price to come back into the long-term trend because this would be a correction. And in most of the times, this will work. So let&#8217;s zoom out even more. And you see all the time, starting from the beginning of August until today, which is September the 27th, we had a long-term uptrend and we made a lot of trades, and that led to a lot of small profits.</p>
<p>In this case, we are about 6.8% profitable. Actually, let&#8217;s have a look at the FX Blue stats for the system. It says 6.6%. This is in German because my operating system is in German, but you could Check out all the stats in the language that you prefer. And when we click on the risk tab here, we see we have about 1.7% each month. The current probability of a total loss is zero. And we have also seen bad days and bad weeks. And you could analyze each and every trade here. By the way, you don&#8217;t have to log in. But let&#8217;s say it is 6.6% for 116 days, and more than half of it was just the adjustment time to get the system up and running and change a few parameters until we started off in August. So let&#8217;s say this is a third of a year. We have 6.6%, so three times this value would be roughly 20%, which is also my yearly goal. And guess what the the S&amp;P average return is? According to Investopedia, the average return currently is about 10.26% since 1957! And now that we know that, what do you think is the average return for Warren Buffett, the greatest investor in the world, as some people call him?</p>
<p>Well, according to Google, it&#8217;s about 10 %. And as we all know, Google knows everything. But if you look at his company, which is Berkshire Hathaway, this is about three times the return value. And if we go a little bit down, we see that Berkshire Hathaway has consistently outperformed the S&amp;P 500 since 1965. So some people might find about 18 to 20% gain per year totally boring. But I&#8217;m risk averse and I consider trading to be one thing that I do. My goal is not to live from this little account. It&#8217;s more about a combination of things that I use, and trading is just one part of that combination. And I like simple and consistent, like in this case. But what I could do is I could increase the trading risk here to a much higher value. But there is a reason for my values here. And we can see the reason here. This is a backtest result. This is the COVID-19 time, and this is today. I started in 2015, traded up until the current day, which isn&#8217;t October the 15th because we are in late September. This is actually five minutes. That&#8217;s a time frame that a lot of people would consider to be pure noise.</p>
<p>Actually, I prefer to trade the one hour time frame. But I like consistent and slow growth with as little risk as possible, because most of the time it looks like this. And this is easy to watch without the urge to manipulate the system. This COVID spike here was very hard in a lot of ways for all of us. And by the way, in this case, I used a $10,000 account and it did 3,411 trades. So that is what I consider to be a good result. And that&#8217;s how I like my systems to behave. So if 6.8% is not enough for you and you want to double or triple your money every month, I would suggest to stop trading, because once you see a big drawdown, most likely you will want to close everything and get rid of the account. And that&#8217;s how most people lose all their trading capital within the first six months. Okay, I hope that was helpful for you and you understand how I do it. You can do it too if you want. You can also check out the stats. Just look for the FX Blue link that I will publish with the video.</p>
<p>For now, I say thank you for watching and I will see you in the next video.</p>
<p>&nbsp;</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-scales-fancy-fails-simple-robot-trading-strategy-revealed/">MQL5 TUTORIAL &#8211; Simple Scales Fancy Fails ( Simple Robot Trading Strategy Revealed)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Envelopes Indicator explained (in 4 min)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-envelopes-indicator-explained-in-4-min/</link>
		
		
		<pubDate>Thu, 26 Sep 2024 09:27:45 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4352</guid>

					<description><![CDATA[<p>&#160; https://mql5tutorial.com/?s=envelopes &#160; In this video, we are going to create an Expert Advisor that uses Envelopes to generate trading signals. Let&#8217;s see how we can do that. We start by opening MetaEditor, which can be done by clicking the little icon or pressing F4. First, we define the OnTick function, which is called every time a new tick is received for the symbol. Inside this function, we create an array named Price Information to store price data. We then sort this array from the current candle to the oldest candle using the Array Set As Series function. Next, we copy the price data into the Price Information array using the Copy Rates function. The parameters for this function are the symbol, the period, the starting position (0 for the current candle), the number of bars to copy, and the array to store the data. We then create two arrays, Upper Band Array and Lower Band Array, to store the values of the upper and lower bands of the Envelopes indicator. These arrays are also sorted from the current candle downwards using the Array Set As Series function. We define the Envelopes indicator using the iEnvelopes function. The parameters for this function are the symbol, the period, the number of periods for the moving average (14), the shift value (0), the type of moving average (MODE_SMA), the applied price (PRICE_CLOSE), and the deviation (0.100). &#160; We then copy the upper and lower band values into the respective arrays using the Copy Buffer function. The parameters for this function are the handle of the indicator, the buffer number (0 for the upper band and 1 for the lower band), the starting position (0 for the current candle), the number of values to copy (3), and the array to store the data. Next, we calculate the values of the upper and lower bands for the current candle using the Normalize Double function, which rounds the values to six decimal places. We then generate trading signals based on the closing price of the previous candle. If the closing price is above the upper band, we display an &#8220;UPPER SIGNAL&#8221; comment on the chart. If the closing price is below the lower band, we display a &#8220;LOWER SIGNAL&#8221; comment on the chart. If the closing price is between the upper and lower bands, we display the values of the upper and lower bands. &#160; Finally, we compile the code by pressing F7. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation is successful, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should then see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that uses Envelopes to generate trading signals with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-envelopes-indicator-explained-in-4-min/">MQL5 TUTORIAL &#8211; Envelopes Indicator explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_55776"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/scjB1x983vw?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p><a href="https://mql5tutorial.com/?s=envelopes"> </a></p>
<p>&nbsp;</p>
<p>In this video, we are going to create an Expert Advisor that uses Envelopes to generate trading signals. Let&#8217;s see how we can do that. We start by opening MetaEditor, which can be done by clicking the little icon or pressing F4. First, we define the OnTick function, which is called every time a new tick is received for the symbol. Inside this function, we create an array named Price Information to store price data. We then sort this array from the current candle to the oldest candle using the Array Set As Series function. Next, we copy the price data into the Price Information array using the Copy Rates function. The parameters for this function are the symbol, the period, the starting position (0 for the current candle), the number of bars to copy, and the array to store the data. We then create two arrays, Upper Band Array and Lower Band Array, to store the values of the upper and lower bands of the Envelopes indicator. These arrays are also sorted from the current candle downwards using the Array Set As Series function. We define the Envelopes indicator using the iEnvelopes function. The parameters for this function are the symbol, the period, the number of periods for the moving average (14), the shift value (0), the type of moving average (MODE_SMA), the applied price (PRICE_CLOSE), and the deviation (0.100).</p>
<p>&nbsp;</p>
<p>We then copy the upper and lower band values into the respective arrays using the Copy Buffer function. The parameters for this function are the handle of the indicator, the buffer number (0 for the upper band and 1 for the lower band), the starting position (0 for the current candle), the number of values to copy (3), and the array to store the data. Next, we calculate the values of the upper and lower bands for the current candle using the Normalize Double function, which rounds the values to six decimal places. We then generate trading signals based on the closing price of the previous candle. If the closing price is above the upper band, we display an &#8220;UPPER SIGNAL&#8221; comment on the chart. If the closing price is below the lower band, we display a &#8220;LOWER SIGNAL&#8221; comment on the chart. If the closing price is between the upper and lower bands, we display the values of the upper and lower bands.</p>
<p>&nbsp;</p>
<p>Finally, we compile the code by pressing F7. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation is successful, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should then see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. In this video, we have learned how to create an Expert Advisor that uses Envelopes to generate trading signals with a few lines of MQL code. Thanks for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-envelopes-indicator-explained-in-4-min/">MQL5 TUTORIAL &#8211; Envelopes Indicator explained (in 4 min)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – One simple thing to improve trading results (I don’t get why people don’t do this!)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-one-simple-thing-to-improve-trading-results-i-dont-get-why-people-dont-do-this/</link>
		
		
		<pubDate>Thu, 12 Sep 2024 18:37:03 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4349</guid>

					<description><![CDATA[<p>&#160; If I were to tell you that you can improve your trading results by just clicking a few hundred times on your mouse button, would you do it? You might say yes, but still, most people don&#8217;t do this, and I don&#8217;t get it. So in this video, we are going to talk about what I think is the most important thing that you need to do to improve your trading results. In this video, I would like to talk about something that people don&#8217;t because they think that they can save time or they think they would waste time if they would actually do it. You see this line here? This is a current backtest. It&#8217;s running for 32 minutes. It&#8217;s one of hundreds of back tests I do, and I&#8217;ve been doing this since 2014. So you can imagine this is a lot of time, and I have done a lot of back tests. And people usually think that trading doesn&#8217;t work because of their own results. And they might do five back tests or 21 back tests or 37 backtests. And at some point in time, they see that it doesn&#8217;t work because they have a big drawdown, like this one, but in much bigger. &#160; &#160; And that&#8217;s when they convince themselves that it doesn&#8217;t work. And that&#8217;s when they stop. Well, in this case, I&#8217;ve been doing this backtest since 2014 until 2024. It&#8217;s still running, and it was never dangerous because we have never seen a big drawdown. And now the same people will say, yes, but you only have 30% profit. This should be much better. And that&#8217;s exactly the problem. So this backtest has been done with $10,000, and we are around the $3,300 profit mark. So let&#8217;s see if I can reach my other client that is running locally. It doesn&#8217;t work right now, so I have to copy and paste the screenshot from my other computer. So let&#8217;s resize this and you will see this is September the 12th, 2024. It&#8217;s about 10 minutes past 7:00. And this spec test made $4,083 with a $1,000 account. And let&#8217;s show the date on the current one here. This is also the same time, and it is the same day, first day, September the 12th. And we have made, let me see, 3,120 dollars. I&#8217;m using these settings here. This is the Robot Trading System, the last iteration from September the ninth. &#160; &#160; And I have several of these just from this year. So I&#8217;m doing exactly this all the time to make it better. And I&#8217;m only doing Euro, US, Dollar. And if you look at the data here, the profit factor is over two. In this case, the total drawdown was $422, and the profit was about eight and a half times that value. And if you like to see results like this one or this one with a much smaller account, you just need to repeat the backtesting process and let your computer do this over and over and over again. And after a few hundred backtests, you have an idea to change something. And then you click on the Modify menu item here and just change one thing. And then you come back to your system and do a few hundred more back tests. The account number here is 37132419. So let&#8217;s Let&#8217;s try this URL here. Here are the trading results. This is how the current system looks like, in my case, in German, because I&#8217;m from Germany. But you could see everything and analyze everything in your language. You can pick one of the reports here, analyze each and every trade, just do a few hundred back tests. &#160; &#160; And guess what? The more often you do this, the your system gets. But nobody is willing to do that. And this is one of the most common problems. And most people who have this problem and don&#8217;t do hundreds of back tests also think that a send account or a demo account would be a waste of time. And they also think that their own stop loss is actually going to save them money. So if you believe in these things, just Just do a few hundred back tests for at least one year, or in my case, this is for 10 years. And once you have something in place that looks like this, there is always enough time to improve it. So that&#8217;s it for this video. Thank you for watching, and I will see you in the next one. Okay, I hope I have convinced you to do back tests, a lot of back tests. Over and over and over again until you don&#8217;t like to see anything like that anymore, because that is the most important lever that you have to improve your own trading results. That&#8217;s it for this video. If this was too fast for you or if you have no idea how to do all this, maybe the premium course on our website might be interesting for you. For now, I say thank you for watching, and I will see you in the next video. &#160;</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-one-simple-thing-to-improve-trading-results-i-dont-get-why-people-dont-do-this/">MQL5 TUTORIAL &#8211; One simple thing to improve trading results (I don&#8217;t get why people don&#8217;t do this!)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_86500"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/gOA8xOMWyuo?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>If I were to tell you that you can improve your trading results by just clicking a few hundred times on your mouse button, would you do it? You might say yes, but still, most people don&#8217;t do this, and I don&#8217;t get it. So in this video, we are going to talk about what I think is the most important thing that you need to do to improve your trading results. In this video, I would like to talk about something that people don&#8217;t because they think that they can save time or they think they would waste time if they would actually do it. You see this line here? This is a current backtest. It&#8217;s running for 32 minutes. It&#8217;s one of hundreds of back tests I do, and I&#8217;ve been doing this since 2014. So you can imagine this is a lot of time, and I have done a lot of back tests. And people usually think that trading doesn&#8217;t work because of their own results. And they might do five back tests or 21 back tests or 37 backtests. And at some point in time, they see that it doesn&#8217;t work because they have a big drawdown, like this one, but in much bigger.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>And that&#8217;s when they convince themselves that it doesn&#8217;t work. And that&#8217;s when they stop. Well, in this case, I&#8217;ve been doing this backtest since 2014 until 2024. It&#8217;s still running, and it was never dangerous because we have never seen a big drawdown. And now the same people will say, yes, but you only have 30% profit. This should be much better. And that&#8217;s exactly the problem. So this backtest has been done with $10,000, and we are around the $3,300 profit mark. So let&#8217;s see if I can reach my other client that is running locally. It doesn&#8217;t work right now, so I have to copy and paste the screenshot from my other computer. So let&#8217;s resize this and you will see this is September the 12th, 2024. It&#8217;s about 10 minutes past 7:00. And this spec test made $4,083 with a $1,000 account. And let&#8217;s show the date on the current one here. This is also the same time, and it is the same day, first day, September the 12th. And we have made, let me see, 3,120 dollars. I&#8217;m using these settings here. This is the Robot Trading System, the last iteration from September the ninth.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>And I have several of these just from this year. So I&#8217;m doing exactly this all the time to make it better. And I&#8217;m only doing Euro, US, Dollar. And if you look at the data here, the profit factor is over two. In this case, the total drawdown was $422, and the profit was about eight and a half times that value. And if you like to see results like this one or this one with a much smaller account, you just need to repeat the backtesting process and let your computer do this over and over and over again. And after a few hundred backtests, you have an idea to change something. And then you click on the Modify menu item here and just change one thing. And then you come back to your system and do a few hundred more back tests. The account number here is 37132419. So let&#8217;s Let&#8217;s try this URL here. Here are the trading results. This is how the current system looks like, in my case, in German, because I&#8217;m from Germany. But you could see everything and analyze everything in your language. You can pick one of the reports here, analyze each and every trade, just do a few hundred back tests.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>And guess what? The more often you do this, the your system gets. But nobody is willing to do that. And this is one of the most common problems. And most people who have this problem and don&#8217;t do hundreds of back tests also think that a send account or a demo account would be a waste of time. And they also think that their own stop loss is actually going to save them money. So if you believe in these things, just Just do a few hundred back tests for at least one year, or in my case, this is for 10 years. And once you have something in place that looks like this, there is always enough time to improve it. So that&#8217;s it for this video. Thank you for watching, and I will see you in the next one. Okay, I hope I have convinced you to do back tests, a lot of back tests. Over and over and over again until you don&#8217;t like to see anything like that anymore, because that is the most important lever that you have to improve your own trading results. That&#8217;s it for this video. If this was too fast for you or if you have no idea how to do all this, maybe the premium course on our website might be interesting for you.</p>
<p>For now, I say thank you for watching, and I will see you in the next video.</p>
<p>&nbsp;</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-one-simple-thing-to-improve-trading-results-i-dont-get-why-people-dont-do-this/">MQL5 TUTORIAL &#8211; One simple thing to improve trading results (I don&#8217;t get why people don&#8217;t do this!)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – One simple thing to improve trading results (I don’t get why people don’t do this!)MQL5 TUTORIAL </title>
		<link>https://mql5tutorial.com/mql5-tutorial-8900-percent-profit-dont-do-this-at-home/</link>
		
		
		<pubDate>Wed, 24 Jul 2024 17:26:01 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4339</guid>

					<description><![CDATA[<p>&#160; Today we wanted to record a video to show that some things are not just fantasies, but actually work. However, there are a few things to think about when you see the results here. First of all, it is safe to say that we would have failed right at the beginning if we had started with only 500 dollars in this system instead of 1000. This means that basic capitalization plays a major role. The second point is that we see an outcome that is only one of many possible outcomes that could have occurred. If you don&#8217;t optimize a system and just rely on the fact that it worked yesterday and last week, you can get nasty surprises. The only way to get better results in the long run is to run many hundreds of tests, which can sometimes take a long time. Even this test here is not done in a minute or two, even though the PC it is running on is extensively equipped with hardware and graphics card. Such tests are very resource-hungry and can take a long time. We now have a situation that we want to take a closer look at: What if we could put this result into practice? This would mean that we would not only have doubled or tripled our capital within ten years, but multiplied it by a maximum. That would be one way of being able to trade profitably in the long term, provided you get the system stable enough. This means that the many hours spent on these tests are well invested. At the same time, it means that you have to take the time to test for years. In my case, we have been testing this for ten years now and will probably continue to do so for the next ten years. It&#8217;s about long-term testing and achieving long-term results with as little risk as possible. But what looks like a small weakness in the system here and there can lead to people reacting strongly emotionally in practice. These dips may not look particularly impressive, but when you see a system suddenly drop from 30,000 to 20,000, it has a different effect than when you see it on the chart in a few seconds. Real money is always a problem, no matter how much you have. You want to keep as much of it as possible and lose as little as possible. The main problem with us humans is that every dollar we lose is twice as bad emotionally as every dollar we gain would be positive. Consequently, we will always try to avoid losses and react more strongly to losses than we do to profits. This is exactly what plays into the broker&#8217;s pocket, because he makes the most money from the negative emotions of traders. Not only does he make money on every position, whether we lose or win, but he also makes money by making us so scared at one or more points that we close our account. In this system, there is a drop from 34,000 to about 20,000 dollars. The biggest problem, however, is that we keep going until the system stops working or we have driven our account into the wall. To avoid this, it makes sense to use an equity stop that is as close as possible to the current gross balance. This is easy to program and in practice results in fewer losses. Many people want even better results when they are doing well and become careless and greedy as a result. As soon as this happens and you no longer adhere to your own rules, you no longer have a system because you manipulate it and the results get worse as a result. It&#8217;s a bit like making a fire: There are people who poke around in the coals until the barbecue goes out completely. To avoid such results and ensure positive experiences and profits for the future, you have to take the time to carry out many tests until you have a stable system. In fact, we are taking a risk here that is far higher than what we would take in normal operations. Such results can only be achieved with an unreasonably high level of risk. However, as this has now worked for over ten years and you don&#8217;t take a risk that could threaten the existence of an account with a few hundred euros, it makes sense to test such a high-risk system in real operation with these settings. We will therefore deviate from our usual approach and see whether we can achieve similar success with the settings used. Our system should now be slowly coming to an end. We have now arrived in 2023 and it is currently the month of June in 2024. You can often see in the last few meters that the biggest equity slump is still to come. In this case, you can see that we still have a lot of time left at the end of our test series, even though our equity curve is not moving at all. This indicates that we have to expect a massive slump. In the backtest, this can only last a few seconds, but in real trading it can take weeks or months for the profits made to disappear again. This is so emotionally stressful for many people that they tend to act irrationally and don&#8217;t wait until the end to see the result. This is also difficult for us, as we are used to listening to our own feelings. A computer doesn&#8217;t have this problem; it can follow whatever rules we give it.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-8900-percent-profit-dont-do-this-at-home/">MQL5 TUTORIAL &#8211; 8900 PERCENT PROFIT ? (Don&#8217;t do this at home!!!)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_71116"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/naNzaFrD9Ng?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>Today we wanted to record a video to show that some things are not just fantasies, but actually work. However, there are a few things to think about when you see the results here. First of all, it is safe to say that we would have failed right at the beginning if we had started with only 500 dollars in this system instead of 1000. This means that basic capitalization plays a major role. The second point is that we see an outcome that is only one of many possible outcomes that could have occurred. If you don&#8217;t optimize a system and just rely on the fact that it worked yesterday and last week, you can get nasty surprises. The only way to get better results in the long run is to run many hundreds of tests, which can sometimes take a long time. Even this test here is not done in a minute or two, even though the PC it is running on is extensively equipped with hardware and graphics card. Such tests are very resource-hungry and can take a long time. We now have a situation that we want to take a closer look at: What if we could put this result into practice? This would mean that we would not only have doubled or tripled our capital within ten years, but multiplied it by a maximum. That would be one way of being able to trade profitably in the long term, provided you get the system stable enough. This means that the many hours spent on these tests are well invested. At the same time, it means that you have to take the time to test for years. In my case, we have been testing this for ten years now and will probably continue to do so for the next ten years. It&#8217;s about long-term testing and achieving long-term results with as little risk as possible. But what looks like a small weakness in the system here and there can lead to people reacting strongly emotionally in practice. These dips may not look particularly impressive, but when you see a system suddenly drop from 30,000 to 20,000, it has a different effect than when you see it on the chart in a few seconds. Real money is always a problem, no matter how much you have. You want to keep as much of it as possible and lose as little as possible. The main problem with us humans is that every dollar we lose is twice as bad emotionally as every dollar we gain would be positive. Consequently, we will always try to avoid losses and react more strongly to losses than we do to profits. This is exactly what plays into the broker&#8217;s pocket, because he makes the most money from the negative emotions of traders. Not only does he make money on every position, whether we lose or win, but he also makes money by making us so scared at one or more points that we close our account. In this system, there is a drop from 34,000 to about 20,000 dollars. The biggest problem, however, is that we keep going until the system stops working or we have driven our account into the wall. To avoid this, it makes sense to use an equity stop that is as close as possible to the current gross balance. This is easy to program and in practice results in fewer losses. Many people want even better results when they are doing well and become careless and greedy as a result. As soon as this happens and you no longer adhere to your own rules, you no longer have a system because you manipulate it and the results get worse as a result. It&#8217;s a bit like making a fire: There are people who poke around in the coals until the barbecue goes out completely. To avoid such results and ensure positive experiences and profits for the future, you have to take the time to carry out many tests until you have a stable system. In fact, we are taking a risk here that is far higher than what we would take in normal operations. Such results can only be achieved with an unreasonably high level of risk. However, as this has now worked for over ten years and you don&#8217;t take a risk that could threaten the existence of an account with a few hundred euros, it makes sense to test such a high-risk system in real operation with these settings. We will therefore deviate from our usual approach and see whether we can achieve similar success with the settings used. Our system should now be slowly coming to an end. We have now arrived in 2023 and it is currently the month of June in 2024. You can often see in the last few meters that the biggest equity slump is still to come. In this case, you can see that we still have a lot of time left at the end of our test series, even though our equity curve is not moving at all. This indicates that we have to expect a massive slump. In the backtest, this can only last a few seconds, but in real trading it can take weeks or months for the profits made to disappear again. This is so emotionally stressful for many people that they tend to act irrationally and don&#8217;t wait until the end to see the result. This is also difficult for us, as we are used to listening to our own feelings. A computer doesn&#8217;t have this problem; it can follow whatever rules we give it.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-8900-percent-profit-dont-do-this-at-home/">MQL5 TUTORIAL &#8211; 8900 PERCENT PROFIT ? (Don&#8217;t do this at home!!!)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – COPILOT AI PROGRAMMING (WITH SOME ISSUES)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues-2/</link>
		
		
		<pubDate>Wed, 10 Jul 2024 15:39:35 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4335</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to use artificial intelligence in Metaeditor to build a simple Candle Counter Expert Advisor. &#160; So let&#8217;s see how we can do that with MQL5. To do that, please open MetaTrader and click on the little button here or press F4 on your keyboard. That should open the Meta Editor window. And if you don&#8217;t see the Toolbar, please click on View, Toolbar. Now we want to click on File, New File, ExpertAdvisor from Template, Continue. I will call this file, Simple CandleCounter. Click on continue, continue, and Finish. Here we are. Now we can delete everything above the OnTick function, and I also delete the two comment lines here. So this is how we have done it so far, manually. But this time I would like to use this little icon here. This will send some text to a solution that is called Copilot. Basically, Copilot is a coding AI that also can be used for other programming languages like Python. &#160; And to use it, we first need to activate it. So you need to get an OpenAI API key. &#160; You can click on this link and you will be brought to the OpenAI website where you can create as many keys as you like. I I have already created my key. They also show you the monthly usage, and so far, the most expensive day was about $1. I&#8217;m using this API for AI programming with Python because I do AI coding for companies to create AI servers that will help them in their daily business. So if you have a business, that might be interesting for you. And once you get your key, you can paste it here. For this simple example, we are going to use GPT 3.5 turbo. You could also use a GPT 4 model. Those are better, but also a lot more expensive. The maximum tokens amount here is basically a restriction on about how much you are going to allow to spend. A thousand tokens is about 750 words. And this variability slider here is set to 20% because I don&#8217;t want my solution to be very creative. If you would like to have something about fairy tales and unicorns, you could increase this value here. Now, basically, what this thing does is it sends whatever you say to the artificial intelligence. And this one is trying to make suggestions. So let&#8217;s see if it works in our case. Create a function that calculates and returns the number of candles on the chart. I can now mark this line of text, click on the button here, and it should be sended to Copilot, which actually worked this time. In the German video, we had several timeouts, and I had to restart MetaTrader all over again. In case you click on the button and nothing happens, you can click on View, Toolbox, and check out the journal here. Here is the error that we had, and this time we spend a few cents for 74 tokens. So now we have our function. Let&#8217;s try to create an output. I say: use the comment function to output the result for the get number of candles function. Let&#8217;s mark that and send it over to copilot. And here is the result. And you might notice that we said we want to use the comment function, but it returned the print function. So let&#8217;s try on the screen, remove the output, and mark this and try it again. And still, it uses the print function instead of the comment function. So for now, I&#8217;m going to change that manually. These are all comment lines, so let&#8217;s click on Edit, Advanced, and you can uncomment a few lines by clicking on this menu item or by pressing Control and the plus. Let&#8217;s change that to comment. And remove the empty lines. Once you&#8217;re done, you can click on the Compile button. So what&#8217;s happening now? Okay, this should be a comment line that is correct. And this time, the compilation was successful. Actually, in the German version, it forgot that we have to pass two parameters here because when you click on the ibas function and press F1, you will see that we have to pass the symbol and the time frame, which would be period in my case. So let&#8217;s recompile the code. And if you don&#8217;t get any errors, you can click on the little button here or press F4 to go back to MetaTrader. This It was a very simple example. And if you have no idea what all the code here does, maybe the premium course on our website might be interesting for you. For now, let&#8217;s go back to MetaTrader. Click on View, Strategy Tester, or press Control and R. Pick the simple candle counter that we have created. Mark the visual mode here and start your test. And yes, indeed, we get the number of candles. It is counting, and we see it on the life chart in the strategy tester. So our little expert advisor works. This was a very simple example, and you might notice that from time to time, you get code that is not working right away, like we have seen with the comment statement and the print function. So for now, I consider AI to be helpful but not perfect. But that might change in the near future when we get better models.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues-2/">MQL5 TUTORIAL &#8211; COPILOT AI PROGRAMMING (WITH SOME ISSUES)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_58778"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/m5a7vcCmMV8?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">In this video, we are going to use artificial intelligence in Metaeditor to build a simple Candle Counter Expert Advisor. </span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">So let&#8217;s see how we can do that with MQL5. To do that, please open MetaTrader and click on the little button here or press F4 on your keyboard. That should open the Meta Editor window. And if you don&#8217;t see the Toolbar, please click on View, Toolbar. Now we want to click on File, New File, ExpertAdvisor from Template, Continue. I will call this file, Simple CandleCounter. Click on continue, continue, and Finish. Here we are. Now we can delete everything above the OnTick function, and I also delete the two comment lines here. So this is how we have done it so far, manually. But this time I would like to use this little icon here. This will send some text to a solution that is called Copilot. Basically, Copilot is a coding AI that also can be used for other programming languages like Python. </span></span></p>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">And to use it, we first need to activate it. So you need to get an OpenAI API key. </span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" dir="auto"><span class="yt-core-attributed-string--link-inherit-color" dir="auto">You can click on this link and you will be brought to the OpenAI website where you can create as many keys as you like. I I have already created my key. They also show you the monthly usage, and so far, the most expensive day was about $1. I&#8217;m using this API for AI programming with Python because I do AI coding for companies to create AI servers that will help them in their daily business. So if you have a business, that might be interesting for you. And once you get your key, you can paste it here. For this simple example, we are going to use GPT 3.5 turbo. You could also use a GPT 4 model. Those are better, but also a lot more expensive. The maximum tokens amount here is basically a restriction on about how much you are going to allow to spend. A thousand tokens is about 750 words. And this variability slider here is set to 20% because I don&#8217;t want my solution to be very creative. If you would like to have something about fairy tales and unicorns, you could increase this value here. Now, basically, what this thing does is it sends whatever you say to the artificial intelligence. And this one is trying to make suggestions. So let&#8217;s see if it works in our case. Create a function that calculates and returns the number of candles on the chart. I can now mark this line of text, click on the button here, and it should be sended to Copilot, which actually worked this time. In the German video, we had several timeouts, and I had to restart MetaTrader all over again. In case you click on the button and nothing happens, you can click on View, Toolbox, and check out the journal here. Here is the error that we had, and this time we spend a few cents for 74 tokens. So now we have our function. Let&#8217;s try to create an output. I say: use the comment function to output the result for the get number of candles function. Let&#8217;s mark that and send it over to copilot. And here is the result. And you might notice that we said we want to use the comment function, but it returned the print function. So let&#8217;s try on the screen, remove the output, and mark this and try it again. And still, it uses the print function instead of the comment function. So for now, I&#8217;m going to change that manually. These are all comment lines, so let&#8217;s click on Edit, Advanced, and you can uncomment a few lines by clicking on this menu item or by pressing Control and the plus. Let&#8217;s change that to comment. And remove the empty lines. Once you&#8217;re done, you can click on the Compile button. So what&#8217;s happening now? Okay, this should be a comment line that is correct. And this time, the compilation was successful. Actually, in the German version, it forgot that we have to pass two parameters here because when you click on the ibas function and press F1, you will see that we have to pass the symbol and the time frame, which would be period in my case. So let&#8217;s recompile the code. And if you don&#8217;t get any errors, you can click on the little button here or press F4 to go back to MetaTrader. This It was a very simple example. And if you have no idea what all the code here does, maybe the premium course on our website might be interesting for you. For now, let&#8217;s go back to MetaTrader. Click on View, Strategy Tester, or press Control and R. Pick the simple candle counter that we have created. Mark the visual mode here and start your test. And yes, indeed, we get the number of candles. It is counting, and we see it on the life chart in the strategy tester. So our little expert advisor works. This was a very simple example, and you might notice that from time to time, you get code that is not working right away, like we have seen with the comment statement and the print function. So for now, I consider AI to be helpful but not perfect. But that might change in the near future when we get better models.</span></span></p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues-2/">MQL5 TUTORIAL &#8211; COPILOT AI PROGRAMMING (WITH SOME ISSUES)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE BUY LIMIT EXPLAINED (in 3 minutes)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-buy-limit-explained-in-3-minutes/</link>
		
		
		<pubDate>Sat, 22 Jun 2024 09:55:09 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4331</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to create an Expert Advisor that places a Buy Limit order when there are no open orders or positions. &#160; Let&#8217;s see how we can do that. We start Metaeditor by clicking the little icon or pressing F4. We include the Trade mqh library by using the directive #include Trade\Trade.mqh, which provides trading functions. We create an instance of the CTrade class named trade. The On Tick function is called every time a new tick is received for the symbol. We get the ask price using Symbol Info Double with the SYMBOL ASK parameter and normalize it to the number of digits for the symbol using Normalize Double. We check if there are no open orders and no open positions by using Orders Total and Positions Total functions. If there are no open orders and no open positions, we place a Buy Limit order using the trade Buy Limit function. &#160; The parameters for trade Buy Limit are: 0.10 for the lot size, Ask minus 200 points for the price of the Buy Limit order, Symbol to get the symbol, 0 for the Stop Loss, Ask plus 200 points for the Take Profit, ORDER TIME GTC for the expiration date, 0 for the expiration time, NULL for the comment. &#160; We press F7 to compile the code. &#160; If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. We have learned how to create an Expert Advisor that places a Buy Limit order with a few lines of MQL code. Thanks for watching and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-buy-limit-explained-in-3-minutes/">MQL5 TUTORIAL &#8211; SIMPLE BUY LIMIT EXPLAINED (in 3 minutes)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_42073"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/jcBG0MEO4Sg?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2>In this video, we are going to create an Expert Advisor that places a Buy Limit order when there are no open orders or positions.</h2>
<p>&nbsp;</p>
<p>Let&#8217;s see how we can do that. We start Metaeditor by clicking the little icon or pressing F4. We include the Trade mqh library by using the directive #include Trade\Trade.mqh, which provides trading functions. We create an instance of the CTrade class named trade. The On Tick function is called every time a new tick is received for the symbol. We get the ask price using Symbol Info Double with the SYMBOL ASK parameter and normalize it to the number of digits for the symbol using Normalize Double. We check if there are no open orders and no open positions by using Orders Total and Positions Total functions. If there are no open orders and no open positions, we place a Buy Limit order using the trade Buy Limit function.</p>
<p>&nbsp;</p>
<p>The parameters for trade Buy Limit are: 0.10 for the lot size, Ask minus 200 points for the price of the Buy Limit order, Symbol to get the symbol, 0 for the Stop Loss, Ask plus 200 points for the Take Profit, ORDER TIME GTC for the expiration date, 0 for the expiration time, NULL for the comment.</p>
<p>&nbsp;</p>
<h2>We press F7 to compile the code.</h2>
<p>&nbsp;</p>
<p>If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. If the compilation works, we go back to MetaTrader by pressing F4 or clicking on the icon. Back in MetaTrader, we press Control and R to start the strategy tester, pick the Expert Advisor that we have just created, enable the visual mode, and start a strategy test. We should see the Expert Advisor on the chart. If you are already a Premium course member and have an idea for a video like this one, you can send us an email. We have learned how to create an Expert Advisor that places a Buy Limit order with a few lines of MQL code. Thanks for watching and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-buy-limit-explained-in-3-minutes/">MQL5 TUTORIAL &#8211; SIMPLE BUY LIMIT EXPLAINED (in 3 minutes)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE SELL TRADE EXPLAINED (in 5 minutes)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-sell-trade-explained-in-5-minutes/</link>
		
		
		<pubDate>Mon, 10 Jun 2024 17:25:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4328</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to create a simple ExpertAdvisor that is going to open a sell trade whenever the last candle was bearish and when we have no open positions. &#160; Let&#8217;s see how we can do that with MetaTrader5. With MQL5 for MetaTrader 5, we can create an Expert Advisor that will execute trades based on certain market conditions. In this video, we want to create an Expert Advisor that will sell when the last complete Candle is bearish and there are no open positions. Let&#8217;s see how we can do that. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the meta editor window. Here, we need to include the necessary MQL5 header file for trading operations, trade.mqh, and create an instance of the Ctrade class, which will allow us to execute trades. Defining the market data. In the onTick function, which is called every time the market data is updated, we first get the current bid price for the symbol using the symbol info double function and normalize it to the correct number of decimal places using normalized double. &#160; Next, we create an array called price info to store the price data for the last three candles. &#160; We then use the the array set as series function to sort the array in reverse order so that the most recent candle is at index zero. We fill the price info array with the actual price data using the copy rates function. We start from the current candle zero and copy the data for the last three candles. Checking the market condition. Now we check if the last complete candle, candle one, is a bearish candle, meaning the closing price is lower than the opening price. Executing the trade. If we don&#8217;t have any open positions, as indicated by the positions total function returning zero, we will place a sell order using the trade.sell function. This function takes several parameters. 0.10. This is the volume or lot size for the trade, in this case, 0.10 lots. Null. This is the symbol which is set to the current symbol by default. Bid. This is the current bid price, which is the price we will use to enter the short position. Bid plus 300 to a point. This is the stop loss price, which is 300 points pips above the current bid price. Bid 150 a point. This is the take profit price, which is 150 points pips below the current bid price. Null. This is an optional comment for the trade. Compiling the code. Now we can press F7 to compile the code in Meta Editor, testing the Expert Advisor. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the premium course on our website or watch one of the basic videos first. &#160; Otherwise, let&#8217;s go back to Meta Trader by pressing F4 or clicking the icon. &#160; Then press CTRL+R to start the strategy tester. Select the ExpertAdvisor we just created, enable the visual mode, and start the test. You should now see the ExpertAdvisor on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple ExpertAdvisor that will sell when the last complete candle is bearish and there are no open positions, using a few lines of MQL code. Thanks for watching and I&#8217;ll see you in the next video. Okay, by now you should see the ExpertAdvisor doing its work on your chart. If everything went well, that is fine. If you have no idea what all the code does, maybe the premium course might be interesting for you. You can check it out on our website. For now, I say thank you for watching, and I will see you in the next video. &#160;</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-sell-trade-explained-in-5-minutes/">MQL5 TUTORIAL &#8211; SIMPLE SELL TRADE EXPLAINED (in 5 minutes)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_32159"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/EwzA_5bToNg?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2>In this video, we are going to create a simple ExpertAdvisor that is going to open a sell trade whenever the last candle was bearish and when we have no open positions.</h2>
<p>&nbsp;</p>
<p>Let&#8217;s see how we can do that with MetaTrader5. With MQL5 for MetaTrader 5, we can create an Expert Advisor that will execute trades based on certain market conditions. In this video, we want to create an Expert Advisor that will sell when the last complete Candle is bearish and there are no open positions. Let&#8217;s see how we can do that. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the meta editor window. Here, we need to include the necessary MQL5 header file for trading operations, trade.mqh, and create an instance of the Ctrade class, which will allow us to execute trades. Defining the market data. In the onTick function, which is called every time the market data is updated, we first get the current bid price for the symbol using the symbol info double function and normalize it to the correct number of decimal places using normalized double.</p>
<p>&nbsp;</p>
<h2>Next, we create an array called price info to store the price data for the last three candles.</h2>
<p>&nbsp;</p>
<p>We then use the the array set as series function to sort the array in reverse order so that the most recent candle is at index zero. We fill the price info array with the actual price data using the copy rates function. We start from the current candle zero and copy the data for the last three candles. Checking the market condition. Now we check if the last complete candle, candle one, is a bearish candle, meaning the closing price is lower than the opening price. Executing the trade. If we don&#8217;t have any open positions, as indicated by the positions total function returning zero, we will place a sell order using the trade.sell function. This function takes several parameters. 0.10. This is the volume or lot size for the trade, in this case, 0.10 lots. Null. This is the symbol which is set to the current symbol by default. Bid. This is the current bid price, which is the price we will use to enter the short position. Bid plus 300 to a point. This is the stop loss price, which is 300 points pips above the current bid price. Bid 150 a point. This is the take profit price, which is 150 points pips below the current bid price. Null. This is an optional comment for the trade. Compiling the code. Now we can press F7 to compile the code in Meta Editor, testing the Expert Advisor. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the premium course on our website or watch one of the basic videos first.</p>
<p>&nbsp;</p>
<h2>Otherwise, let&#8217;s go back to Meta Trader by pressing F4 or clicking the icon.</h2>
<p>&nbsp;</p>
<p>Then press CTRL+R to start the strategy tester. Select the ExpertAdvisor we just created, enable the visual mode, and start the test. You should now see the ExpertAdvisor on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple ExpertAdvisor that will sell when the last complete candle is bearish and there are no open positions, using a few lines of MQL code. Thanks for watching and I&#8217;ll see you in the next video. Okay, by now you should see the ExpertAdvisor doing its work on your chart. If everything went well, that is fine. If you have no idea what all the code does, maybe the premium course might be interesting for you. You can check it out on our website. For now, I say thank you for watching, and I will see you in the next video.</p>
<p>&nbsp;</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-sell-trade-explained-in-5-minutes/">MQL5 TUTORIAL &#8211; SIMPLE SELL TRADE EXPLAINED (in 5 minutes)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE BUY ORDER EXPLAINED</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-buy-order-explained/</link>
		
		
		<pubDate>Thu, 23 May 2024 09:54:14 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4325</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to create a simple ExpertAdvisor that is able to create a buy trade whenever the last candle was bullish! &#160; Let&#8217;s find out how we can do that with MQL5. With MQL5 for MetaTrader5, we can create an expert advisor that will execute trades based on certain market conditions. In this video, we want to create an expert advisor that will buy when the last complete candle is bullish and there are no open positions. Let&#8217;s see how we can do that. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the Meta Editor window. Here, we need to include the necessary MQL5 header file for trading operations, Trade\Trade. Mqh, and create an instance of the C Trade class which will allow us to execute trades. Defining the market data. In the onTick function, which is called every time the market data is updated, we first get the current ask price for the symbol using the symbol info double function and normalize it to the correct number of decimal places using normalized double. &#160; Next, we create an array called price info to store the price data for the last three candles. &#160; We then use the array set at as series function to sort the array in reverse order so that the most recent candle is at index zero. We fill the price info array with the actual price data using the copy rates function. We start from the current candle zero and copy the data for the last three candles, checking the market condition. Now we check if the last complete candle, candle one, is a bullish candle, meaning the closing price is higher than the opening price. Executing the trade. If we don&#8217;t have any open positions as indicated by the position&#8217;s total function returning zero, we will place a buy order using the Trade Buy function. This function takes several parameters, 0.10. This is the volume or lot size for the trade. In this case, 0.10 lots. Null, this is the symbol which is set to the current symbol by default. Ask, this is the current ask price, which is the price we will use to enter the long position. Ask &#8211; 300 _POINT. This is the stop loss price, which is 300 pips below the current ask price. Ask plus 150 _POINT, This is the take profit price, which is 150 point pips above the current ask price. Null. This is an optional comment for the trade. &#160; Compiling the code! &#160; Now we can press F7 to compile the code Meta Editor, testing the Expert Advisor. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the premium course on our website or watch one of the basic videos first. Otherwise, let&#8217;s go back to Meta Trader by pressing F4 or clicking the icon. Then press CTRL+R to start the strategy tester. Select the Expert Advisor we just created, enable the visual mode, and start the test. You should now see the Expert Advisor on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple Expert Advisor that will buy when the last complete candle is bullish and there are no open positions, using a few lines of MQL code. &#160; Thanks for watching, and I&#8217;ll see you in the next video. &#160; Okay, by now you should see the ExpertAdvisor running on your chart, if everything went well. I would like to say thank you for watching. And if you have an idea for a video like this one, and if you are already a premium customer, just drop me a line, otherwise maybe the premium course might be interesting for you. You can find that one on our website. Thank you for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-buy-order-explained/">MQL5 TUTORIAL &#8211; SIMPLE BUY ORDER EXPLAINED</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_77339"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/0-gt6Z2d8Fc?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">In this video, we are going to create a simple ExpertAdvisor that is able to create a buy trade whenever the last candle was bullish!</span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color"> Let&#8217;s find out how we can do that with MQL5. With MQL5 for MetaTrader5, we can create an expert advisor that will execute trades based on certain market conditions. In this video, we want to create an expert advisor that will buy when the last complete candle is bullish and there are no open positions. Let&#8217;s see how we can do that. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the Meta Editor window. Here, we need to include the necessary MQL5 header file for trading operations, Trade\Trade. Mqh, and create an instance of the C Trade class which will allow us to execute trades. Defining the market data. In the onTick function, which is called every time the market data is updated, we first get the current ask price for the symbol using the symbol info double function and normalize it to the correct number of decimal places using normalized double. </span></span></p>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">Next, we create an array called price info to store the price data for the last three candles. </span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">We then use the array set at as series function to sort the array in reverse order so that the most recent candle is at index zero. We fill the price info array with the actual price data using the copy rates function. We start from the current candle zero and copy the data for the last three candles, checking the market condition. Now we check if the last complete candle, candle one, is a bullish candle, meaning the closing price is higher than the opening price. Executing the trade. If we don&#8217;t have any open positions as indicated by the position&#8217;s total function returning zero, we will place a buy order using the Trade Buy function. This function takes several parameters, 0.10. This is the volume or lot size for the trade. In this case, 0.10 lots. Null, this is the symbol which is set to the current symbol by default. Ask, this is the current ask price, which is the price we will use to enter the long position. Ask &#8211; 300 _POINT. This is the stop loss price, which is 300 pips below the current ask price. Ask plus 150 _POINT, This is the take profit price, which is 150 point pips above the current ask price. Null. This is an optional comment for the trade. </span></span></p>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">Compiling the code! </span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">Now we can press F7 to compile the code Meta Editor, testing the Expert Advisor. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the premium course on our website or watch one of the basic videos first. Otherwise, let&#8217;s go back to Meta Trader by pressing F4 or clicking the icon. Then press CTRL+R to start the strategy tester. Select the Expert Advisor we just created, enable the visual mode, and start the test. You should now see the Expert Advisor on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple Expert Advisor that will buy when the last complete candle is bullish and there are no open positions, using a few lines of MQL code. </span></span></p>
<p>&nbsp;</p>
<h2><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">Thanks for watching, and I&#8217;ll see you in the next video. </span></span></h2>
<p>&nbsp;</p>
<p><span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap"><span class="yt-core-attributed-string--link-inherit-color">Okay, by now you should see the ExpertAdvisor running on your chart, if everything went well. I would like to say thank you for watching. And if you have an idea for a video like this one, and if you are already a premium customer, just drop me a line, otherwise maybe the premium course might be interesting for you. You can find that one on our website. Thank you for watching, and I will see you in the next video.</span></span></p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-buy-order-explained/">MQL5 TUTORIAL &#8211; SIMPLE BUY ORDER EXPLAINED</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 Tutorial – Simple Moving Average Calculation</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-moving-average-calculation/</link>
		
		
		<pubDate>Mon, 20 May 2024 07:55:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4323</guid>

					<description><![CDATA[<p>&#160; This red line here is a simple moving average! &#160; And in this video, we are going to create a simple expert advisor that is able to calculate the value for this moving average and show it on the chart. Let&#8217;s see how we can do that with MQL5. Introduction to calculating a simple moving average in MQL5. In this video, we want to calculate the value for a simple moving average and output the value on the chart. So let&#8217;s find out how to do that with MQL5. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the Meta Editor window, and here you want to click on File, New Expert Advisor, Template from Template, Continue. I will call this file, Simple Moving Average. Click on Continue, Continue and Finish. &#160; Setting up the code structure! &#160; Now you can delete everything above the onTick function and the two comment lines that remain. Defining the moving average with IMA function. Let&#8217;s continue with the definition of the moving average. We use the integrated MQL5 function Ima, if you highlight it and press F1, you will see that it needs a few parameters. The first parameter is used to automatically find out what symbol is used on the chart. In my case, it&#8217;s the currency pair, Australian dollar against Yen. The second parameter contains the value of the time frame that is used on the current chart. I&#8217;m using the M1 chart for one minute candles right now. The third parameter is the number of candles that we are going to use to calculate the moving average. In our case, we use 20 candles, configuring Parameters for Moving Average Calculation. When you put your mouse over the moving average, you will see behind the moving average that stands for 20 candles. This parameter here is the starting point. We will start the calculation based on the current candle zero. We use Mode Underscore SMA to calculate a simple moving average, and we use price close in the last parameter because we want to calculate the moving average values based on the closing as price. Filling the moving average array with data. Now we use copy buffer, fill our moving average array with data based on the moving average definition that we have created here. We start from Candle 0. We do it for Buffer 0. That&#8217;s the red line here, the only indicator line that we have for a moving average. The Bollinger Bands indicator, for example, would have three lines, so that would be Buffer 0, 1 or 2. We start with the current Candle 0, and we copy the price data for three candles and store it in our array. Calculating the moving average for a specific candle. To calculate the moving average for candle one, that&#8217;s the last complete candle that appears on the chart, we can use the value for candle one in our moving average array and store it in a variable called my Moving Average 20, outputting the moving average value on the chart. Finally, we want to use the comment function to create an output on the chart saying, My Moving Average 20, followed by the value that we have calculated. &#160; Compiling the code and testing in MetaTrader! &#160; Now we can press F7 to compile the code in Metaeditor, and then we can test the ExpertAdvisor in MetaTrader using the strategy tester. Observing the moving average and output on the chart. If you have any trouble understanding the code or need more basic information, you can check out our premium course on our website or watch some of our beginner videos first. Otherwise, Let&#8217;s go back to MetaTrader by pressing F4 or clicking the icon, then press CTRL+R to start the strategy tester. Select the ExpertAdvisor we just created, enable the visual mode, and start the test. You should now see the ExpertAdvisor and the calculated simple moving average on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple moving average expert advisor using a few lines of MQL code. Thanks for watching, and I&#8217;ll see you in the next video. Okay, if everything went well, you should see the expert advisor on your chart now. If you have any trouble understanding all that stuff, maybe the premium course on our website might be interesting for you. For now, I say thank you for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-moving-average-calculation/">MQL5 Tutorial &#8211; Simple Moving Average Calculation</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_53320"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/tzPqrKIvWq0?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2>This red line here is a simple moving average!</h2>
<p>&nbsp;</p>
<p>And in this video, we are going to create a simple expert advisor that is able to calculate the value for this moving average and show it on the chart. Let&#8217;s see how we can do that with MQL5. Introduction to calculating a simple moving average in MQL5. In this video, we want to calculate the value for a simple moving average and output the value on the chart. So let&#8217;s find out how to do that with MQL5. Opening Meta Editor and Creating a New File. Please click on the little button here or press F4 in Meta Trader. Now you should see the Meta Editor window, and here you want to click on File, New Expert Advisor, Template from Template, Continue. I will call this file, Simple Moving Average. Click on Continue, Continue and Finish.</p>
<p>&nbsp;</p>
<h2>Setting up the code structure!</h2>
<p>&nbsp;</p>
<p>Now you can delete everything above the onTick function and the two comment lines that remain. Defining the moving average with IMA function. Let&#8217;s continue with the definition of the moving average. We use the integrated MQL5 function Ima, if you highlight it and press F1, you will see that it needs a few parameters. The first parameter is used to automatically find out what symbol is used on the chart. In my case, it&#8217;s the currency pair, Australian dollar against Yen. The second parameter contains the value of the time frame that is used on the current chart. I&#8217;m using the M1 chart for one minute candles right now. The third parameter is the number of candles that we are going to use to calculate the moving average. In our case, we use 20 candles, configuring Parameters for Moving Average Calculation. When you put your mouse over the moving average, you will see behind the moving average that stands for 20 candles. This parameter here is the starting point. We will start the calculation based on the current candle zero. We use Mode Underscore SMA to calculate a simple moving average, and we use price close in the last parameter because we want to calculate the moving average values based on the closing as price. Filling the moving average array with data.</p>
<p>Now we use copy buffer, fill our moving average array with data based on the moving average definition that we have created here. We start from Candle 0. We do it for Buffer 0. That&#8217;s the red line here, the only indicator line that we have for a moving average. The Bollinger Bands indicator, for example, would have three lines, so that would be Buffer 0, 1 or 2. We start with the current Candle 0, and we copy the price data for three candles and store it in our array. Calculating the moving average for a specific candle. To calculate the moving average for candle one, that&#8217;s the last complete candle that appears on the chart, we can use the value for candle one in our moving average array and store it in a variable called my Moving Average 20, outputting the moving average value on the chart. Finally, we want to use the comment function to create an output on the chart saying, My Moving Average 20, followed by the value that we have calculated.</p>
<p>&nbsp;</p>
<h2>Compiling the code and testing in MetaTrader!</h2>
<p>&nbsp;</p>
<p>Now we can press F7 to compile the code in Metaeditor, and then we can test the ExpertAdvisor in MetaTrader using the strategy tester. Observing the moving average and output on the chart. If you have any trouble understanding the code or need more basic information, you can check out our premium course on our website or watch some of our beginner videos first. Otherwise, Let&#8217;s go back to MetaTrader by pressing F4 or clicking the icon, then press CTRL+R to start the strategy tester. Select the ExpertAdvisor we just created, enable the visual mode, and start the test. You should now see the ExpertAdvisor and the calculated simple moving average on the chart. If you&#8217;re already a premium member and have an idea for a video like this, feel free to send us an email. We&#8217;ve just created a simple moving average expert advisor using a few lines of MQL code. Thanks for watching, and I&#8217;ll see you in the next video. Okay, if everything went well, you should see the expert advisor on your chart now. If you have any trouble understanding all that stuff, maybe the premium course on our website might be interesting for you. For now, I say thank you for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-moving-average-calculation/">MQL5 Tutorial &#8211; Simple Moving Average Calculation</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – COPILOT AI PROGRAMMING (WITH SOME ISSUES)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues/</link>
		
		
		<pubDate>Tue, 07 May 2024 12:25:49 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4320</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to use artificial intelligence in Metaeditor to build a simple Candle Counter Expert Advisor! &#160; So let&#8217;s see how we can do that with MQL5. To do that, please open MetaTrader and click on the little button here or press F4 on your keyboard. That should open the Meta Editor window. And if you don&#8217;t see the Toolbar, please click on View, Toolbar. Now we want to click on File, New File, ExpertAdvisor from Template, Continue. I will call this file, Simple CandleCounter. Click on continue, continue, and Finish. Here we are. Now we can delete everything above the OnTick function, and I also delete the two comment lines here. So this is how we have done it so far, manually. But this time I would like to use this little icon here. This will send some text to a solution that is called Copilot. Basically, Copilot is a coding AI that also can be used for other programming languages like Python. And to use it, we first need to activate it. &#160; So you need to get an OpenAI API key! &#160; You can click on this link and you will be brought to the OpenAI website where you can create as many keys as you like. I I have already created my key. They also show you the monthly usage, and so far, the most expensive day was about $1. I&#8217;m using this API for AI programming with Python because I do AI coding for companies to create AI servers that will help them in their daily business. So if you have a business, that might be interesting for you. And once you get your key, you can paste it here. For this simple example, we are going to use GPT 3.5 turbo. You could also use a GPT 4 model. Those are better, but also a lot more expensive. The maximum tokens amount here is basically a restriction on about how much you are going to allow to spend. A thousand tokens is about 750 words. And this variability slider here is set to 20% because I don&#8217;t want my solution to be very creative. If you would like to have something about fairy tales and unicorns, you could increase this value here. Now, basically, what this thing does is it sends whatever you say to the artificial intelligence. And this one is trying to make suggestions. So let&#8217;s see if it works in our case. Create a function that calculates and returns the number of candles on the chart. I can now mark this line of text, click on the button here, and it should be sended to Copilot, which actually worked this time. In the German video, we had several timeouts, and I had to restart MetaTrader all over again. In case you click on the button and nothing happens, you can click on View, Toolbox, and check out the journal here. Here is the error that we had, and this time we spend a few cents for 74 tokens. &#160; So now we have our function. Let&#8217;s try to create an output! &#160; I say: use the comment function to output the result for the get number of candles function. Let&#8217;s mark that and send it over to copilot. And here is the result. And you might notice that we said we want to use the comment function, but it returned the print function. So let&#8217;s try on the screen, remove the output, and mark this and try it again. And still, it uses the print function instead of the comment function. So for now, I&#8217;m going to change that manually. These are all comment lines, so let&#8217;s click on Edit, Advanced, and you can uncomment a few lines by clicking on this menu item or by pressing Control and the plus. Let&#8217;s change that to comment. And remove the empty lines. Once you&#8217;re done, you can click on the Compile button. So what&#8217;s happening now? Okay, this should be a comment line that is correct. And this time, the compilation was successful. Actually, in the German version, it forgot that we have to pass two parameters here because when you click on the ibas function and press F1, you will see that we have to pass the symbol and the time frame, which would be period in my case. So let&#8217;s recompile the code. And if you don&#8217;t get any errors, you can click on the little button here or press F4 to go back to MetaTrader. This It was a very simple example. And if you have no idea what all the code here does, maybe the premium course on our website might be interesting for you. &#160; For now, let&#8217;s go back to MetaTrader! &#160; Click on View, Strategy Tester, or press Control and R. Pick the simple candle counter that we have created. Mark the visual mode here and start your test. And yes, indeed, we get the number of candles. It is counting, and we see it on the life chart in the strategy tester. So our little expert advisor works. This was a very simple example, and you might notice that from time to time, you get code that is not working right away, like we have seen with the comment statement and the print function. So for now, I consider AI to be helpful but not perfect. But that might change in the near future when we get better models.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues/">MQL5 TUTORIAL &#8211; COPILOT AI PROGRAMMING (WITH SOME ISSUES)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_93340"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/m5a7vcCmMV8?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2>In this video, we are going to use artificial intelligence in Metaeditor to build a simple Candle Counter Expert Advisor!</h2>
<p>&nbsp;</p>
<p>So let&#8217;s see how we can do that with MQL5. To do that, please open MetaTrader and click on the little button here or press F4 on your keyboard. That should open the Meta Editor window. And if you don&#8217;t see the Toolbar, please click on View, Toolbar. Now we want to click on File, New File, ExpertAdvisor from Template, Continue. I will call this file, Simple CandleCounter. Click on continue, continue, and Finish. Here we are. Now we can delete everything above the OnTick function, and I also delete the two comment lines here. So this is how we have done it so far, manually. But this time I would like to use this little icon here. This will send some text to a solution that is called Copilot. Basically, Copilot is a coding AI that also can be used for other programming languages like Python. And to use it, we first need to activate it.</p>
<p>&nbsp;</p>
<h2>So you need to get an OpenAI API key!</h2>
<p>&nbsp;</p>
<p>You can click on this link and you will be brought to the OpenAI website where you can create as many keys as you like. I I have already created my key. They also show you the monthly usage, and so far, the most expensive day was about $1. I&#8217;m using this API for AI programming with Python because I do AI coding for companies to create AI servers that will help them in their daily business. So if you have a business, that might be interesting for you. And once you get your key, you can paste it here. For this simple example, we are going to use GPT 3.5 turbo. You could also use a GPT 4 model. Those are better, but also a lot more expensive. The maximum tokens amount here is basically a restriction on about how much you are going to allow to spend. A thousand tokens is about 750 words. And this variability slider here is set to 20% because I don&#8217;t want my solution to be very creative. If you would like to have something about fairy tales and unicorns, you could increase this value here. Now, basically, what this thing does is it sends whatever you say to the artificial intelligence. And this one is trying to make suggestions. So let&#8217;s see if it works in our case. Create a function that calculates and returns the number of candles on the chart. I can now mark this line of text, click on the button here, and it should be sended to Copilot, which actually worked this time. In the German video, we had several timeouts, and I had to restart MetaTrader all over again. In case you click on the button and nothing happens, you can click on View, Toolbox, and check out the journal here. Here is the error that we had, and this time we spend a few cents for 74 tokens.</p>
<p>&nbsp;</p>
<h2>So now we have our function. Let&#8217;s try to create an output!</h2>
<p>&nbsp;</p>
<p>I say: use the comment function to output the result for the get number of candles function. Let&#8217;s mark that and send it over to copilot. And here is the result. And you might notice that we said we want to use the comment function, but it returned the print function. So let&#8217;s try on the screen, remove the output, and mark this and try it again. And still, it uses the print function instead of the comment function. So for now, I&#8217;m going to change that manually. These are all comment lines, so let&#8217;s click on Edit, Advanced, and you can uncomment a few lines by clicking on this menu item or by pressing Control and the plus. Let&#8217;s change that to comment. And remove the empty lines. Once you&#8217;re done, you can click on the Compile button. So what&#8217;s happening now? Okay, this should be a comment line that is correct. And this time, the compilation was successful. Actually, in the German version, it forgot that we have to pass two parameters here because when you click on the ibas function and press F1, you will see that we have to pass the symbol and the time frame, which would be period in my case. So let&#8217;s recompile the code. And if you don&#8217;t get any errors, you can click on the little button here or press F4 to go back to MetaTrader. This It was a very simple example. And if you have no idea what all the code here does, maybe the premium course on our website might be interesting for you.</p>
<p>&nbsp;</p>
<h2>For now, let&#8217;s go back to MetaTrader!</h2>
<p>&nbsp;</p>
<p>Click on View, Strategy Tester, or press Control and R. Pick the simple candle counter that we have created. Mark the visual mode here and start your test. And yes, indeed, we get the number of candles. It is counting, and we see it on the life chart in the strategy tester. So our little expert advisor works. This was a very simple example, and you might notice that from time to time, you get code that is not working right away, like we have seen with the comment statement and the print function. So for now, I consider AI to be helpful but not perfect. But that might change in the near future when we get better models.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-copilot-ai-programming-with-some-issues/">MQL5 TUTORIAL &#8211; COPILOT AI PROGRAMMING (WITH SOME ISSUES)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SimpleAverageTrueRange Walkthrough</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simpleaveragetruerange-walkthrough/</link>
		
		
		<pubDate>Sun, 05 May 2024 14:44:53 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4317</guid>

					<description><![CDATA[<p>&#160; In this video, we are going to create an Expert Advisor that uses the Average True Range Indicator. First, we&#8217;ll need to click on the little button here, which should bring up the MetaEditor. In the MetaEditor, we&#8217;ll want to select File, New, Expert Advisor from template, Continue, and we&#8217;ll call it Simple Average True Range. Now, click Continue, Continue, finish, and we can remove everything above the OnTick function here, and I&#8217;ll also delete the two comment lines. Let&#8217;s start by including the Trade.mqh file and creating an instance of the CTrade class. In the OnTick function, we first create a variable called signal to hold our buy or sell signal. Next, we calculate the current Ask and Bid prices using the SymbolInfoDouble function and the NormalizeDouble function to get the correct number of decimal places. We then create an array called PriceArray to hold our price data, and define the Average True Range indicator using the iATR function. We sort the PriceArray from the current candle downwards using the ArraySetAsSeries function, and then copy the buffer values from the indicator into the array using the CopyBuffer function. Now we can calculate the current value of the Average True Range and store it in the AverageTrueRangeValue variable, using the NormalizeDouble function again to get 5 decimal places. We also keep track of the previous value in the OldValue variable, and use that to determine our buy and sell signals. If the current value is greater than the old value, we set the signal to &#8220;buy&#8221;. If the current value is less than the old value, we set the signal to &#8220;sell&#8221;. Finally, we check the PositionsTotal function to see if we have any open positions. If the signal is &#8220;sell&#8221; and we have no open positions, we use the Sell function of the CTrade class to sell 10 microlots. If the signal is &#8220;buy&#8221; and we have no open positions, we use the Buy function to buy 10 microlots. We output the signal, old value, and current value to the chart using the Comment function. Lastly, we update the OldValue variable with the current AverageTrueRangeValue. Okay, that&#8217;s it. &#160; Now, please click the Compile button, and you should get no errors and no warnings here. &#160; Now, you can click the button or hit the F4 key to go back to MetaTrader. In MetaTrader, you want to click on View, Strategy Tester, and in the Strategy Test panel, you want to select the Simple_Average_True_Range.ex5 file. Select any currency pair you like, and please make sure to enable the check mark for the visualization option before you start your test. And here we go! If you move your mouse to the current value here, you&#8217;ll see the calculated Average True Range value. If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first. Okay, now you can create an Expert Advisor that uses the Average True Range Indicator to find out if you want to buy or if you want to sell, and you&#8217;ve created it in less than five minutes with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simpleaveragetruerange-walkthrough/">MQL5 TUTORIAL &#8211; SimpleAverageTrueRange Walkthrough</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_89602"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/H68kQUlZwHc?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<h2>In this video, we are going to create an Expert Advisor that uses the Average True Range Indicator.</h2>
<p>First, we&#8217;ll need to click on the little button here, which should bring up the MetaEditor. In the MetaEditor, we&#8217;ll want to select File, New, Expert Advisor from template, Continue, and we&#8217;ll call it Simple Average True Range.</p>
<p>Now, click Continue, Continue, finish, and we can remove everything above the OnTick function here, and I&#8217;ll also delete the two comment lines.</p>
<p>Let&#8217;s start by including the Trade.mqh file and creating an instance of the CTrade class.</p>
<p>In the OnTick function, we first create a variable called signal to hold our buy or sell signal.</p>
<p>Next, we calculate the current Ask and Bid prices using the SymbolInfoDouble function and the NormalizeDouble function to get the correct number of decimal places.</p>
<p>We then create an array called PriceArray to hold our price data, and define the Average True Range indicator using the iATR function.</p>
<p>We sort the PriceArray from the current candle downwards using the ArraySetAsSeries function, and then copy the buffer values from the indicator into the array using the CopyBuffer function.</p>
<p>Now we can calculate the current value of the Average True Range and store it in the AverageTrueRangeValue variable, using the NormalizeDouble function again to get 5 decimal places.</p>
<p>We also keep track of the previous value in the OldValue variable, and use that to determine our buy and sell signals. If the current value is greater than the old value, we set the signal to &#8220;buy&#8221;. If the current value is less than the old value, we set the signal to &#8220;sell&#8221;.</p>
<p>Finally, we check the PositionsTotal function to see if we have any open positions. If the signal is &#8220;sell&#8221; and we have no open positions, we use the Sell function of the CTrade class to sell 10 microlots. If the signal is &#8220;buy&#8221; and we have no open positions, we use the Buy function to buy 10 microlots.</p>
<p>We output the signal, old value, and current value to the chart using the Comment function.</p>
<p>Lastly, we update the OldValue variable with the current AverageTrueRangeValue.</p>
<p>Okay, that&#8217;s it.</p>
<p>&nbsp;</p>
<h2>Now, please click the Compile button, and you should get no errors and no warnings here.</h2>
<p>&nbsp;</p>
<p>Now, you can click the button or hit the F4 key to go back to MetaTrader.</p>
<p>In MetaTrader, you want to click on View, Strategy Tester, and in the Strategy Test panel, you want to select the Simple_Average_True_Range.ex5 file. Select any currency pair you like, and please make sure to enable the check mark for the visualization option before you start your test.</p>
<p>And here we go! If you move your mouse to the current value here, you&#8217;ll see the calculated Average True Range value.</p>
<p>If this was too fast for you or if you don&#8217;t understand what all the code is doing, you may want to check out the Premium course on our website, or watch one of the basic videos first.</p>
<p>Okay, now you can create an Expert Advisor that uses the Average True Range Indicator to find out if you want to buy or if you want to sell, and you&#8217;ve created it in less than five minutes with a few lines of MQL5 code.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simpleaveragetruerange-walkthrough/">MQL5 TUTORIAL &#8211; SimpleAverageTrueRange Walkthrough</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – Simple AMA STANDALONE WALKTRHOUGH</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-ama-standalone-walktrhough/</link>
		
		
		<pubDate>Tue, 30 Apr 2024 08:05:37 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4314</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-ama-standalone-walktrhough/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-AMA-STANDALONE-EXPERT-ADVISOR.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
<p>	Introduction to AMA Standalone Expert Advisor In this tutorial, we are going to create an Expert Advisor in MQL5 that utilizes the Adaptive Moving Average (AMA) for generating trading signals. The AMA is particularly useful for capturing trends in the market due to its sensitivity to price movements. We&#8217;ll explore how to implement this indicator to determine buy and sell signals based on its interaction with the price. Setting Up in MetaEditor To begin, launch MetaEditor by clicking the little icon or pressing F4 on your keyboard. Once opened, navigate to: &#8220;File/New/Expert Advisor (template)&#8221; and name your file &#8220;SimpleAMAStandaloneEA&#8221;. Click &#8220;Continue&#8221; until you can finish and create the file. Initially, clear any pre-existing code above the OnTick function and remove the comment lines to prepare our workspace. Including Essential Files and Initializing Variables Start by including the Trade.mqh file, which provides functionalities necessary for trade operations. Create an instance of the CTrade class named trade, which we will use later for executing trades. Copy Code #include &#60;Trade.mqh&#62; CTrade trade; Calculating Ask and Bid Prices Within the OnTick function, calculate the current Ask and Bid prices using SymbolInfoDouble. Normalize these prices using NormalizeDouble and _Digits to ensure they adhere to the precision required by the trading server. Copy Code double ask = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK), _Digits); double bid = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits); Setting Up Price Data Arrays Define a price array using MqlRates and sort it with ArraySetAsSeries. Populate this array with price data using CopyRates. Copy Code MqlRates PriceArray[]; ArraySetAsSeries(PriceArray, true); CopyRates(_Symbol, _Period, 0, 3, PriceArray); Implementing the AMA Indicator Utilize the iAMA function to define the AMA based on its parameters. Fill an array with the AMA data using CopyBuffer. Copy Code int amaDefinition = iAMA(_Symbol, _Period, 10, 2, 0, PRICE_CLOSE); double EAArray[]; ArraySetAsSeries(EAArray, true); CopyBuffer(amaDefinition, 0, 0, 3, EAArray); Calculating and Assigning Signals Determine the current AMA value and compare it with the close price of the last candle to assign buy or sell signals. Copy Code double currentAMA = EAArray[0]; string signal = ""; if(currentAMA &#62; PriceArray[1].close) { signal = "sell"; } else if(currentAMA &#60; PriceArray[1].close) { signal = "buy"; } Executing Trades Based on Signals Execute trades based on the calculated signals, ensuring no existing positions conflict with the new signal. Copy Code if(signal == "sell" &#38;&#38; PositionsTotal() == 0) { trade.Sell(0.1, _Symbol, bid, 0, 0, "AMA Sell"); } else if(signal == "buy" &#38;&#38; PositionsTotal() == 0) { trade.Buy(0.1, _Symbol, ask, 0, 0, "AMA Buy"); } Displaying Signal on Chart and Testing Use the Comment function to display the current trading signal on the chart. Compile the code by pressing F7 and test the Expert Advisor in MetaTrader by pressing CTRL+R and selecting the &#8220;SimpleAMAStandaloneEA&#8221;. Conclusion By following this tutorial, you have created an Expert Advisor that trades based on the Adaptive Moving Average. This EA can help you understand how to implement and test trading strategies in MQL5. If you found the pace fast or need more detailed explanations, consider exploring our Premium course or reviewing basic videos first. Thank you for following along, and I look forward to seeing you in the next tutorial where we continue exploring the capabilities of MQL5 for automated trading.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-ama-standalone-walktrhough/">MQL5 TUTORIAL &#8211; Simple AMA STANDALONE WALKTRHOUGH</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-ama-standalone-walktrhough/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-AMA-STANDALONE-EXPERT-ADVISOR.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p><strong>Introduction to AMA Standalone Expert Advisor</strong></p>
<p>In this tutorial, we are going to create an Expert Advisor in MQL5 that utilizes the Adaptive Moving Average (AMA) for generating trading signals. The AMA is particularly useful for capturing trends in the market due to its sensitivity to price movements. We&#8217;ll explore how to implement this indicator to determine buy and sell signals based on its interaction with the price.</p>
<p><strong>Setting Up in MetaEditor</strong></p>
<p>To begin, launch MetaEditor by clicking the little icon or pressing F4 on your keyboard. Once opened, navigate to: &#8220;File/New/Expert Advisor (template)&#8221; and name your file &#8220;SimpleAMAStandaloneEA&#8221;. Click &#8220;Continue&#8221; until you can finish and create the file. Initially, clear any pre-existing code above the <code>OnTick</code> function and remove the comment lines to prepare our workspace.</p>
<p><strong>Including Essential Files and Initializing Variables</strong></p>
<p>Start by including the <code>Trade.mqh</code> file, which provides functionalities necessary for trade operations. Create an instance of the <code>CTrade</code> class named <code>trade</code>, which we will use later for executing trades.</p>
<p>Copy Code</p>
<div id="radix-:r19r:-content-0" dir="ltr">
<pre><code>#include &lt;Trade.mqh&gt;</code> <code>CTrade trade;</code></pre>
</div>
<p><strong>Calculating Ask and Bid Prices</strong></p>
<p>Within the <code>OnTick</code> function, calculate the current Ask and Bid prices using <code>SymbolInfoDouble</code>. Normalize these prices using <code>NormalizeDouble</code> and <code>_Digits</code> to ensure they adhere to the precision required by the trading server.</p>
<p>Copy Code</p>
<div id="radix-:r19t:-content-0" dir="ltr">
<pre><code>double ask = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK), _Digits);</code> <code>double bid = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits);</code></pre>
</div>
<p><strong>Setting Up Price Data Arrays</strong></p>
<p>Define a price array using <code>MqlRates</code> and sort it with <code>ArraySetAsSeries</code>. Populate this array with price data using <code>CopyRates</code>.</p>
<p>Copy Code</p>
<div id="radix-:r19v:-content-0" dir="ltr">
<pre><code>MqlRates PriceArray[];</code> <code>ArraySetAsSeries(PriceArray, true);</code> <code>CopyRates(_Symbol, _Period, 0, 3, PriceArray);</code></pre>
</div>
<p><strong>Implementing the AMA Indicator</strong></p>
<p>Utilize the <code>iAMA</code> function to define the AMA based on its parameters. Fill an array with the AMA data using <code>CopyBuffer</code>.</p>
<p>Copy Code</p>
<div id="radix-:r1a1:-content-0" dir="ltr">
<pre><code>int amaDefinition = iAMA(_Symbol, _Period, 10, 2, 0, PRICE_CLOSE);</code> <code>double EAArray[];</code> <code>ArraySetAsSeries(EAArray, true);</code> <code>CopyBuffer(amaDefinition, 0, 0, 3, EAArray);</code></pre>
</div>
<p><strong>Calculating and Assigning Signals</strong></p>
<p>Determine the current AMA value and compare it with the close price of the last candle to assign buy or sell signals.</p>
<p>Copy Code</p>
<div id="radix-:r1a3:-content-0" dir="ltr">
<pre><code>double currentAMA = EAArray[0];</code> <code>string signal = "";</code> <code>if(currentAMA &gt; PriceArray[1].close) {</code> <code>    signal = "sell";</code> <code>} else if(currentAMA &lt; PriceArray[1].close) {</code> <code>    signal = "buy";</code> <code>}</code></pre>
</div>
<p><strong>Executing Trades Based on Signals</strong></p>
<p>Execute trades based on the calculated signals, ensuring no existing positions conflict with the new signal.</p>
<p>Copy Code</p>
<div id="radix-:r1a5:-content-0" dir="ltr">
<pre><code>if(signal == "sell" &amp;&amp; PositionsTotal() == 0) {</code> <code>    trade.Sell(0.1, _Symbol, bid, 0, 0, "AMA Sell");</code> <code>} else if(signal == "buy" &amp;&amp; PositionsTotal() == 0) {</code> <code>    trade.Buy(0.1, _Symbol, ask, 0, 0, "AMA Buy");</code> <code>}</code></pre>
</div>
<p><strong>Displaying Signal on Chart and Testing</strong></p>
<p>Use the <code>Comment</code> function to display the current trading signal on the chart. Compile the code by pressing F7 and test the Expert Advisor in MetaTrader by pressing CTRL+R and selecting the &#8220;SimpleAMAStandaloneEA&#8221;.</p>
<p><strong>Conclusion</strong></p>
<p>By following this tutorial, you have created an Expert Advisor that trades based on the Adaptive Moving Average. This EA can help you understand how to implement and test trading strategies in MQL5. If you found the pace fast or need more detailed explanations, consider exploring our Premium course or reviewing basic videos first.</p>
<p>Thank you for following along, and I look forward to seeing you in the next tutorial where we continue exploring the capabilities of MQL5 for automated trading.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-ama-standalone-walktrhough/">MQL5 TUTORIAL &#8211; Simple AMA STANDALONE WALKTRHOUGH</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE AWESOME STANDALONE EXPERT ADVISOR</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-awesome-standalone-expert-advisor/</link>
		
		
		<pubDate>Sun, 24 Mar 2024 12:44:01 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=2333</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-awesome-standalone-expert-advisor/"><img title="AlgorithmicTrading077" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-AWESOME-STANDALONE-EXPERT-ADVISOR.png" alt="MQL5 TUTORIAL &#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR" width="" /></a>
	</div>
<p>	This time we are going to create a standalone Expert Advisor to trade the Awesome Oscillator, it will output buy and sell signals directly on the chart and whenever the line is crossed here we either get a sell signal when it&#8217;s below the dotted line or we would get a buy signal as soon as it crosses the line like right now the bars are above and now we consider that to be a buy signal. Now how can we create an Expert Advisor in MQL5 that is able to not only output the signals on the chart but to automatically trade them? To do that please click on the 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/ Expert Advisor (template)” from template, “ Continue”, I will call this file: “SimpleAwesomeStandaloneEA”, click on “Continue”, “Continue” and “Finish”. Now you can delete everything above the “OnTick” function and the two comment lines here. We start by including the file “Trade.mqh”, this one comes with MQL5 and it makes it possible to create an instance from the class “CTrade” that will be called: “trade” and we are going to use it to open positions later on. Before we do that we calculate the Ask price and the Bid price that is done by using “SymbolInfoDouble” for the current symbol on the chart, “SYMBOL_ASK” will give us the Ask price and “SYMBOL_BID” will give us the Bid price. With “NormalizeDouble” and “_Digits” we automatically calculate the right number of digits because the current currency pair has 5 digits behind the dot but there are also other currency pairs with 3 digits behind the dot. Now we need a signal variable that will be a string variable so it can contain text later on right now we don&#8217;t assign any values because we need to calculate them later on. With “MqlRates” we create a price information array (PriceInformation), that function here stores the information about the prices, the volumes and the spread. Now we sort the array from the current candle downwards by using “ArraySetAsSeries” and with “CopyRates” we fill it for the current symbol and the currently selected period on the chart from candle 0 (zero) for 3 candles and we store the data in our price information array (PriceInformation). Let&#8217;s create another array called: “PriceArray” that one will hold the data for our Oscillator, so let&#8217;s use the integrated “iAO” function of MQL5 to define the Awesome Oscillator Indicator for the current symbol and the current period on the chart. This array (PriceArray) also needs to be sorted from the current candle downwards so we use “ArraySetAsSeries” for this one and now we use “CopyBuffer” to fill our price array (PriceArray) for the first buffer – that&#8217;s the line here – from the current candle 0 (zero) for 3 candles and store the information for the Expert Advisor in our price array (PriceArray). And to calculate the Expert Advisor for the current candle we simply look at the value of candle 0 (zero) in our price array (PriceArray), we also use “NormalizeDouble” and a 6 to get six digits behind the dot like here and the result will be stored in the Awesome Oscillator value (AwesomeOscillatorValue) and if that value is above 0 (zero) we consider that to be a buy signal and now we assign the word: “buy” to our signal. Otherwise if the value (AwesomeOscillatorValue) is below 0 (zero), so if the Awesome Oscillator value (AwesomeOscillatorValue) is less than 0 (zero) we assign the word: “sell” to our signal and if the signal equals sell and “PositionsTotal” is below 1 – in other words we don&#8217;t have any open position – we use “trade.Sell” to sell 10 micro lot. Otherwise if the signal equals buy and we have no open positions we use “trade.Buy” to buy 10 micro lot. The last thing is to create a chart output by using the “Comment” function to output the text: “The current signal is:” and the calculated “signal” directly on our chart. Okay, if you&#8217;re done you can click on the “Compile” button here or press F7, that should work without any errors and in that case you can click on the little button here or press F4 to go back to Metatrader and in Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the new file: “SimpleAwesomeStandaloneEA”, let&#8217;s also mark the visualization option here and start a test. …and here we are, our Expert Advisor is working, actually we have opened the first automated trade and now you know how to code the Awesome Oscillator Standalone Expert Advisor and you have coded it yourself with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-awesome-standalone-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-awesome-standalone-expert-advisor/"><img title="AlgorithmicTrading077" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-AWESOME-STANDALONE-EXPERT-ADVISOR.png" alt="MQL5 TUTORIAL &#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR" width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>This time we are going to create a standalone Expert Advisor to trade the Awesome Oscillator, it will output buy and sell signals directly on the chart and whenever the line is crossed here we either get a sell signal when it&#8217;s below the dotted line or we would get a buy signal as soon as it crosses the line like right now the bars are above and now we consider that to be a buy signal.<br />
Now how can we create an Expert Advisor in MQL5 that is able to not only output the signals on the chart but to automatically trade them?<br />
To do that please click on the 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/ Expert Advisor (template)”  from template, “ Continue”, I will call this file: “SimpleAwesomeStandaloneEA”, click on “Continue”, “Continue” and “Finish”.<br />
Now you can delete everything above the “OnTick” function and the two comment lines here.<br />
We start by including the file “Trade.mqh”, this one comes with MQL5 and it makes it possible to create an instance from the class “CTrade” that will be called: “trade” and we are going to use it to open positions later on. Before we do that we calculate the Ask price and the Bid price that is done by using “SymbolInfoDouble” for the current symbol on the chart, “SYMBOL_ASK” will give us the Ask price and “SYMBOL_BID” will give us the Bid price.<br />
With “NormalizeDouble” and “_Digits” we automatically calculate the right number of digits because the current currency pair has 5 digits behind the dot but there are also other currency pairs with 3 digits behind the dot.<br />
Now we need a signal variable that will be a string variable so it can contain text later on right now we don&#8217;t assign any values because we need to calculate them later on.<br />
With “MqlRates” we create a price information array (PriceInformation), that function here stores the information about the prices, the volumes and the spread.<br />
Now we sort the array from the current candle downwards by using “ArraySetAsSeries” and with “CopyRates” we fill it for the current symbol and the currently selected period on the chart from candle 0 (zero) for 3 candles and we store the data in our price information array (PriceInformation).<br />
Let&#8217;s create another array called: “PriceArray” that one will hold the data for our Oscillator, so let&#8217;s use the integrated “iAO” function of MQL5 to define the Awesome Oscillator Indicator for the current symbol and the current period on the chart. This array (PriceArray) also needs to be sorted from the current candle downwards so we use “ArraySetAsSeries” for this one and now we use “CopyBuffer” to fill our price array (PriceArray) for the first buffer – that&#8217;s the line here – from the current candle 0 (zero) for 3 candles and store the information for the Expert Advisor in our price array (PriceArray).<br />
And to calculate the Expert Advisor for the current candle we simply look at the value of candle 0 (zero) in our price array (PriceArray), we also use “NormalizeDouble” and a 6 to get six digits behind the dot like here and the result will be stored in the Awesome Oscillator value (AwesomeOscillatorValue) and if that value is above 0 (zero) we consider that to be a buy signal and now we assign the word: “buy” to our signal.<br />
Otherwise if the value (AwesomeOscillatorValue) is below 0 (zero), so if the Awesome Oscillator value (AwesomeOscillatorValue) is less than 0 (zero) we assign the word: “sell” to our signal and if the signal equals sell and “PositionsTotal” is below 1 – in other words we don&#8217;t have any open position – we use “trade.Sell” to sell 10 micro lot.<br />
Otherwise if the signal equals buy and we have no open positions we use “trade.Buy” to buy 10 micro lot.<br />
The last thing is to create a chart output by using the “Comment” function to output the text: “The current signal is:” and the calculated “signal” directly on our chart.<br />
Okay, if you&#8217;re done you can click on the “Compile” button here or press F7, that should work without any errors and in that case you can click on the little button here or press F4 to go back to Metatrader and in Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the new file: “SimpleAwesomeStandaloneEA”, let&#8217;s also mark the visualization option here and start a test.<br />
…and here we are, our Expert Advisor is working, actually we have opened the first automated trade and now you know how to code the Awesome Oscillator Standalone Expert Advisor and you have coded it yourself with a few lines of MQL5 code.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-awesome-standalone-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="19042606" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-AWESOME-STANDALONE-EXPERT-ADVISOR.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>6:28</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>This time we are going to create a standalone Expert Advisor to trade the Awesome Oscillator, it will output buy and sell signals directly on the chart and whenever the line is crossed here we either get a sell signal when it&amp;#8217;s below the dotted line or we would get a buy signal as soon as it crosses the line like right now the bars are above and now we consider that to be a buy signal. Now how can we create an Expert Advisor in MQL5 that is able to not only output the signals on the chart but to automatically trade them? To do that please click on the 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/ Expert Advisor (template)” from template, “ Continue”, I will call this file: “SimpleAwesomeStandaloneEA”, click on “Continue”, “Continue” and “Finish”. Now you can delete everything above the “OnTick” function and the two comment lines here. We start by including the file “Trade.mqh”, this one comes with MQL5 and it makes it possible to create an instance from the class “CTrade” that will be called: “trade” and we are going to use it to open positions later on. Before we do that we calculate the Ask price and the Bid price that is done by using “SymbolInfoDouble” for the current symbol on the chart, “SYMBOL_ASK” will give us the Ask price and “SYMBOL_BID” will give us the Bid price. With “NormalizeDouble” and “_Digits” we automatically calculate the right number of digits because the current currency pair has 5 digits behind the dot but there are also other currency pairs with 3 digits behind the dot. Now we need a signal variable that will be a string variable so it can contain text later on right now we don&amp;#8217;t assign any values because we need to calculate them later on. With “MqlRates” we create a price information array (PriceInformation), that function here stores the information about the prices, the volumes and the spread. Now we sort the array from the current candle downwards by using “ArraySetAsSeries” and with “CopyRates” we fill it for the current symbol and the currently selected period on the chart from candle 0 (zero) for 3 candles and we store the data in our price information array (PriceInformation). Let&amp;#8217;s create another array called: “PriceArray” that one will hold the data for our Oscillator, so let&amp;#8217;s use the integrated “iAO” function of MQL5 to define the Awesome Oscillator Indicator for the current symbol and the current period on the chart. This array (PriceArray) also needs to be sorted from the current candle downwards so we use “ArraySetAsSeries” for this one and now we use “CopyBuffer” to fill our price array (PriceArray) for the first buffer – that&amp;#8217;s the line here – from the current candle 0 (zero) for 3 candles and store the information for the Expert Advisor in our price array (PriceArray). And to calculate the Expert Advisor for the current candle we simply look at the value of candle 0 (zero) in our price array (PriceArray), we also use “NormalizeDouble” and a 6 to get six digits behind the dot like here and the result will be stored in the Awesome Oscillator value (AwesomeOscillatorValue) and if that value is above 0 (zero) we consider that to be a buy signal and now we assign the word: “buy” to our signal. Otherwise if the value (AwesomeOscillatorValue) is below 0 (zero), so if the Awesome Oscillator value (AwesomeOscillatorValue) is less than 0 (zero) we assign the word: “sell” to our signal and if the signal equals sell and “PositionsTotal” is below 1 – in other words we don&amp;#8217;t have any open position – we use “trade.Sell” to sell 10 micro lot. Otherwise if the signal equals buy and we have no open positions we use “trade.Buy” to buy 10 micro lot. The last thing is to create a chart output by using the “Comment” function to output the text: “The current signal is:” and the calculated “signal” directly on our chart. Okay, if you&amp;#8217;re done you can click on the “Compile” button here or press F7, that should work without any errors and in that case you can click on the little button here or press F4 to go back to Metatrader and in Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the new file: “SimpleAwesomeStandaloneEA”, let&amp;#8217;s also mark the visualization option here and start a test. …and here we are, our Expert Advisor is working, actually we have opened the first automated trade and now you know how to code the Awesome Oscillator Standalone Expert Advisor and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>This time we are going to create a standalone Expert Advisor to trade the Awesome Oscillator, it will output buy and sell signals directly on the chart and whenever the line is crossed here we either get a sell signal when it&amp;#8217;s below the dotted line or we would get a buy signal as soon as it crosses the line like right now the bars are above and now we consider that to be a buy signal. Now how can we create an Expert Advisor in MQL5 that is able to not only output the signals on the chart but to automatically trade them? To do that please click on the 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/ Expert Advisor (template)” from template, “ Continue”, I will call this file: “SimpleAwesomeStandaloneEA”, click on “Continue”, “Continue” and “Finish”. Now you can delete everything above the “OnTick” function and the two comment lines here. We start by including the file “Trade.mqh”, this one comes with MQL5 and it makes it possible to create an instance from the class “CTrade” that will be called: “trade” and we are going to use it to open positions later on. Before we do that we calculate the Ask price and the Bid price that is done by using “SymbolInfoDouble” for the current symbol on the chart, “SYMBOL_ASK” will give us the Ask price and “SYMBOL_BID” will give us the Bid price. With “NormalizeDouble” and “_Digits” we automatically calculate the right number of digits because the current currency pair has 5 digits behind the dot but there are also other currency pairs with 3 digits behind the dot. Now we need a signal variable that will be a string variable so it can contain text later on right now we don&amp;#8217;t assign any values because we need to calculate them later on. With “MqlRates” we create a price information array (PriceInformation), that function here stores the information about the prices, the volumes and the spread. Now we sort the array from the current candle downwards by using “ArraySetAsSeries” and with “CopyRates” we fill it for the current symbol and the currently selected period on the chart from candle 0 (zero) for 3 candles and we store the data in our price information array (PriceInformation). Let&amp;#8217;s create another array called: “PriceArray” that one will hold the data for our Oscillator, so let&amp;#8217;s use the integrated “iAO” function of MQL5 to define the Awesome Oscillator Indicator for the current symbol and the current period on the chart. This array (PriceArray) also needs to be sorted from the current candle downwards so we use “ArraySetAsSeries” for this one and now we use “CopyBuffer” to fill our price array (PriceArray) for the first buffer – that&amp;#8217;s the line here – from the current candle 0 (zero) for 3 candles and store the information for the Expert Advisor in our price array (PriceArray). And to calculate the Expert Advisor for the current candle we simply look at the value of candle 0 (zero) in our price array (PriceArray), we also use “NormalizeDouble” and a 6 to get six digits behind the dot like here and the result will be stored in the Awesome Oscillator value (AwesomeOscillatorValue) and if that value is above 0 (zero) we consider that to be a buy signal and now we assign the word: “buy” to our signal. Otherwise if the value (AwesomeOscillatorValue) is below 0 (zero), so if the Awesome Oscillator value (AwesomeOscillatorValue) is less than 0 (zero) we assign the word: “sell” to our signal and if the signal equals sell and “PositionsTotal” is below 1 – in other words we don&amp;#8217;t have any open position – we use “trade.Sell” to sell 10 micro lot. Otherwise if the signal equals buy and we have no open positions we use “trade.Buy” to buy 10 micro lot. The last thing is to create a chart output by using the “Comment” function to output the text: “The current signal is:” and the calculated “signal” directly on our chart. Okay, if you&amp;#8217;re done you can click on the “Compile” button here or press F7, that should work without any errors and in that case you can click on the little button here or press F4 to go back to Metatrader and in Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the new file: “SimpleAwesomeStandaloneEA”, let&amp;#8217;s also mark the visualization option here and start a test. …and here we are, our Expert Advisor is working, actually we have opened the first automated trade and now you know how to code the Awesome Oscillator Standalone Expert Advisor and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE AWESOME STANDALONE EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – How To Code A Simple Commodity Channel Index</title>
		<link>https://mql5tutorial.com/mql5-tutorial-how-to-code-a-simple-commodity-channel-index/</link>
		
		
		<pubDate>Sun, 03 Mar 2024 08:29:20 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4302</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-how-to-code-a-simple-commodity-channel-index/"><img title="A businessman in a suit in front of a computer screen." src="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Commodity-Channel-Index.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
<p>	Here is a step-by-step description for creating an Expert Advisor using the Commodity Channel Index (CCI) indicator in MQL5 for Metatrader5: Open the Metatrader5 platform and click on the &#8220;Expert Advisors&#8221; button in the toolbar or press the F4 key on your keyboard. Select &#8220;File&#8221; &#62; &#8220;New&#8221; &#62; &#8220;Expert Advisor&#8221; from the menu. Name the Expert Advisor &#8220;Simple Commodity Channel Index&#8221; and click &#8220;Finish&#8221;. Remove all the code above the &#8220;OnTick()&#8221; function and delete the two comment lines. Declare a double array for storing prices: double myPriceArray[] = {}; Define the CCI indicator using the built-in ICCI() function: Copy Code // define the properties of the CCI EA int CCIDefinition =iCCI(_Symbol,_Period,14,PRICE_CLOSE); Sort the price array from the current candle downwards using the ArraySetAsSeries() function: Copy Code // sort the price array from the current candle downwards ArraySetAsSeries(myPriceArray,true); Copy the CCI buffer for the current candle using the CopyBuffer() function: Copy Code // Defined MA1, one line,current candle,3 candles, store result CopyBuffer(CCIDefinition,0,0,3,myPriceArray); Get the CCI value of the current candle in the myPriceArray array: Copy Code // Get the value of the current candle float CCIValue=(myPriceArray[0]); Use the Comment() function to output &#8220;Overbought&#8221; if the CCI value is above the upper line (default value is 100), &#8220;Oversold&#8221; if it&#8217;s below the lower line (default value is -100), and an empty output if it&#8217;s between the lines: Copy Code // if it is above the upper line if (CCIValue&#62; 100) Comment ("OVERBOUGHT"); // if it is below the lower line if (CCIValue&#60; -100) Comment ("OVERSOLD"); // if it is between the lines if ((CCIValue &#62; -100) &#38;&#38;(CCIValue&#60;100)) Comment (""); Compile the Expert Advisor by clicking the &#8220;Compile&#8221; button or pressing the F7 key on your keyboard. Open the Metatrader5 platform and click on &#8220;View&#8221; &#62; &#8220;Strategy Tester&#8221; or press Ctrl + R. Select the &#8220;Simple Commodity Channel Index.ex5&#8221; file and make sure the &#8220;Visualization&#8221; option is marked. Click &#8220;Start&#8221; to see the Expert Advisor in action. Note: This is a basic implementation of a CCI-based Expert Advisor. You may need to adjust the code to fit your specific needs. In this article, we will show you how to create a simple Expert Advisor using the Commodity Channel Index (CCI) indicator in MQL5 for Metatrader5. The CCI is an oscillator that can help you identify overbought and oversold conditions in the market. To get started, open the Metatrader5 platform and click on the &#8220;Expert Advisors&#8221; button in the toolbar or press the F4 key on your keyboard. Then, select &#8220;File&#8221; &#62; &#8220;New&#8221; &#62; &#8220;Expert Advisor&#8221; from the menu. Name the Expert Advisor &#8220;Simple Commodity Channel Index&#8221; and remove all the code above the OnTick() function. Next, we will declare a double array for storing prices and define the CCI indicator using the built-in ICCI() function. The ICCI() function takes several parameters, including the symbol, period, and calculation method. For this example, we will use the default values for these parameters. After defining the CCI indicator, we will sort the price array from the current candle downwards using the ArraySetAsSeries() function. This will allow us to access the price data for the current and previous candles. Next, we will copy the CCI buffer for the current candle using the CopyBuffer() function. This will allow us to access the CCI value for the current candle. After copying the CCI buffer, we will get the CCI value of the current candle in the myPriceArray array. We will then use the Comment() function to output &#8220;Overbought&#8221; if the CCI value is above the upper line, &#8220;Oversold&#8221; if it&#8217;s below the lower line, and an empty output if it&#8217;s between the lines. Once we have finished coding the Expert Advisor, we will compile it by clicking the &#8220;Compile&#8221; button or pressing the F7 key on your keyboard. If there are no errors or warnings, we can move on to testing the Expert Advisor. To test the Expert Advisor, open the Metatrader5 platform and click on &#8220;View&#8221; &#62; &#8220;Strategy Tester&#8221; or press Ctrl + R. Select the &#8220;Simple Commodity Channel Index.ex5&#8221; file and make sure the &#8220;Visualization&#8221; option is marked. Click &#8220;Start&#8221; to see the Expert Advisor in action. It&#8217;s important to note that this is a basic implementation of a CCI-based Expert Advisor. You may need to adjust the code to fit your specific needs. Additionally, it&#8217;s important to thoroughly backtest and optimize your Expert Advisor before using it in live trading. Always use risk management techniques to protect your capital and avoid overbought or oversold conditions that can lead to large losses. With these steps, you should be able to create a simple Expert Advisor using the CCI indicator in MQL5 for Metatrader5. Video Time Stamps 0:00 &#8211; Introduction to Commodity Channel Index 0:30 &#8211; Overbought and Oversold Conditions 0:50 &#8211; Creating an Expert Advisor in MQL5 1:03 &#8211; Selecting File &#62; New &#62; Expert Advisor 1:13 &#8211; Naming the Expert Advisor 1:20 &#8211; Removing Unnecessary Code 1:30 &#8211; Creating a Double Array for Prices 1:41 &#8211; Defining the Commodity Channel Index 1:56 &#8211; Selecting the Current Symbol and Period 2:01 &#8211; Calculating for 14 Candles 2:12 &#8211; Inserting the Commodity Channel Index Indicator 2:23 &#8211; Calculating Based on Close Prices 2:35 &#8211; Sorting the Price Array 2:42 &#8211; Copying the CCI Buffer 2:46 &#8211; Getting the CCI Value for the Current Candle 3:13 &#8211; Outputting Overbought or Oversold on the Chart 3:36 &#8211; Outputting an Empty Signal for No Signal 3:48 &#8211; Compiling the Expert Advisor 4:01 &#8211; Bringing Up MetaTrader 4:11 &#8211; Selecting View &#62; Strategy Tester 4:23 &#8211; Selecting the Simple Commodity Channel Index Expert Advisor 4:30 &#8211; Marking the Visualization Option 4:34 &#8211; Starting the Expert Advisor 4:41 &#8211; Observing the Expert Advisor in Action 4:52 &#8211; Using the Commodity Channel Index Indicator for Entry Signals 5:02 &#8211; Conclusion</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-code-a-simple-commodity-channel-index/">MQL5 Tutorial &#8211; How To Code A Simple Commodity Channel Index</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-how-to-code-a-simple-commodity-channel-index/"><img title="A businessman in a suit in front of a computer screen." src="http://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Commodity-Channel-Index.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<div class="MuiBox-root mui-style-1v3vzuo">
<div class="MuiBox-root mui-style-mwkzk2">
<div class="MuiBox-root mui-style-ksd56a"></div>
</div>
</div>
<div class="MuiBox-root mui-style-mbssy4" data-cy="robot-message" data-testid="robot-message">
<div class="MuiBox-root mui-style-gg4vpm">
<div class="MuiBox-root mui-style-1hosksd">
<div class="MuiBox-root mui-style-6n7j50">
<div class="MuiBox-root mui-style-6n7j50">
<div>
<p class="paragraph-robot-message">Here is a step-by-step description for creating an Expert Advisor using the Commodity Channel Index (CCI) indicator in MQL5 for Metatrader5:</p>
</div>
<ol class="ordered-list-robot-message">
<li class="ordered-list-item-robot-message" data-testid="li-component">Open the Metatrader5 platform and click on the &#8220;Expert Advisors&#8221; button in the toolbar or press the F4 key on your keyboard.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Select &#8220;File&#8221; &gt; &#8220;New&#8221; &gt; &#8220;Expert Advisor&#8221; from the menu.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Name the Expert Advisor &#8220;Simple Commodity Channel Index&#8221; and click &#8220;Finish&#8221;.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Remove all the code above the &#8220;OnTick()&#8221; function and delete the two comment lines.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Declare a double array for storing prices: <code>double myPriceArray[] = {};</code></li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Define the CCI indicator using the built-in <code>ICCI()</code> function:</li>
</ol>
<div class="MuiBox-root mui-style-lkya45">
<div class="MuiBox-root mui-style-1lekzkb">
<div></div>
<p><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall mui-style-wsyc6w" tabindex="0" type="button">Copy Code</button></p>
</div>
<div class="MuiBox-root mui-style-9ew8a4">
<pre class="a-b-r-La">      // define the properties of the CCI EA  
      int CCIDefinition =iCCI(_Symbol,_Period,14,PRICE_CLOSE);</pre>
</div>
</div>
<ol class="ordered-list-robot-message" start="7">
<li class="ordered-list-item-robot-message" data-testid="li-component">Sort the price array from the current candle downwards using the <code>ArraySetAsSeries()</code> function:</li>
</ol>
<div class="MuiBox-root mui-style-lkya45">
<div class="MuiBox-root mui-style-1lekzkb">
<div></div>
<p><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall mui-style-wsyc6w" tabindex="0" type="button">Copy Code</button></p>
</div>
<div class="MuiBox-root mui-style-9ew8a4">
<pre class="a-b-r-La">      // sort the price array from the current candle downwards
      ArraySetAsSeries(myPriceArray,true);</pre>
</div>
</div>
<ol class="ordered-list-robot-message" start="8">
<li class="ordered-list-item-robot-message" data-testid="li-component">Copy the CCI buffer for the current candle using the <code>CopyBuffer()</code> function:</li>
</ol>
<div class="MuiBox-root mui-style-lkya45">
<div class="MuiBox-root mui-style-1lekzkb">
<div></div>
<p><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall mui-style-wsyc6w" tabindex="0" type="button">Copy Code</button></p>
</div>
<div class="MuiBox-root mui-style-9ew8a4">
<pre class="a-b-r-La">      // Defined MA1, one line,current candle,3 candles, store result 
      CopyBuffer(CCIDefinition,0,0,3,myPriceArray);</pre>
</div>
</div>
<ol class="ordered-list-robot-message" start="9">
<li class="ordered-list-item-robot-message" data-testid="li-component">Get the CCI value of the current candle in the <code>myPriceArray</code> array:</li>
</ol>
<div class="MuiBox-root mui-style-lkya45">
<div class="MuiBox-root mui-style-1lekzkb">
<div></div>
<p><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall mui-style-wsyc6w" tabindex="0" type="button">Copy Code</button></p>
</div>
<div class="MuiBox-root mui-style-9ew8a4">
<pre class="a-b-r-La">      // Get the value of the current candle
      float CCIValue=(myPriceArray[0]);</pre>
</div>
</div>
<ol class="ordered-list-robot-message" start="10">
<li class="ordered-list-item-robot-message" data-testid="li-component">Use the <code>Comment()</code> function to output &#8220;Overbought&#8221; if the CCI value is above the upper line (default value is 100), &#8220;Oversold&#8221; if it&#8217;s below the lower line (default value is -100), and an empty output if it&#8217;s between the lines:</li>
</ol>
<div class="MuiBox-root mui-style-lkya45">
<div class="MuiBox-root mui-style-1lekzkb">
<div></div>
<p><button class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall mui-style-wsyc6w" tabindex="0" type="button">Copy Code</button></p>
</div>
<div class="MuiBox-root mui-style-9ew8a4">
<pre class="a-b-r-La">      // if it is above the upper line
      if (CCIValue&gt; 100) 
      Comment ("OVERBOUGHT");

      // if it is below the lower line      
      if (CCIValue&lt; -100) 
      Comment ("OVERSOLD");         

      // if it is between the lines
      if ((CCIValue &gt; -100) &amp;&amp;(CCIValue&lt;100))
	   Comment ("");</pre>
</div>
</div>
<ol class="ordered-list-robot-message" start="11">
<li class="ordered-list-item-robot-message" data-testid="li-component">Compile the Expert Advisor by clicking the &#8220;Compile&#8221; button or pressing the F7 key on your keyboard.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Open the Metatrader5 platform and click on &#8220;View&#8221; &gt; &#8220;Strategy Tester&#8221; or press Ctrl + R.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Select the &#8220;Simple Commodity Channel Index.ex5&#8221; file and make sure the &#8220;Visualization&#8221; option is marked.</li>
<li class="ordered-list-item-robot-message" data-testid="li-component">Click &#8220;Start&#8221; to see the Expert Advisor in action.</li>
</ol>
<div>
<h2 class="paragraph-robot-message">Note: This is a basic implementation of a CCI-based Expert Advisor. You may need to adjust the code to fit your specific needs.</h2>
<div>
<p class="paragraph-robot-message">In this article, we will show you how to create a simple Expert Advisor using the Commodity Channel Index (CCI) indicator in MQL5 for Metatrader5. The CCI is an oscillator that can help you identify overbought and oversold conditions in the market.</p>
</div>
<div>
<p class="paragraph-robot-message">To get started, open the Metatrader5 platform and click on the &#8220;Expert Advisors&#8221; button in the toolbar or press the F4 key on your keyboard. Then, select &#8220;File&#8221; &gt; &#8220;New&#8221; &gt; &#8220;Expert Advisor&#8221; from the menu. Name the Expert Advisor &#8220;Simple Commodity Channel Index&#8221; and remove all the code above the <code>OnTick()</code> function.</p>
</div>
<div>
<p class="paragraph-robot-message">Next, we will declare a double array for storing prices and define the CCI indicator using the built-in <code>ICCI()</code> function. The <code>ICCI()</code> function takes several parameters, including the symbol, period, and calculation method. For this example, we will use the default values for these parameters.</p>
</div>
<div>
<p class="paragraph-robot-message">After defining the CCI indicator, we will sort the price array from the current candle downwards using the <code>ArraySetAsSeries()</code> function. This will allow us to access the price data for the current and previous candles.</p>
</div>
<div>
<p class="paragraph-robot-message">Next, we will copy the CCI buffer for the current candle using the <code>CopyBuffer()</code> function. This will allow us to access the CCI value for the current candle.</p>
</div>
<div>
<p class="paragraph-robot-message">After copying the CCI buffer, we will get the CCI value of the current candle in the <code>myPriceArray</code> array. We will then use the <code>Comment()</code> function to output &#8220;Overbought&#8221; if the CCI value is above the upper line, &#8220;Oversold&#8221; if it&#8217;s below the lower line, and an empty output if it&#8217;s between the lines.</p>
</div>
<div>
<p class="paragraph-robot-message">Once we have finished coding the Expert Advisor, we will compile it by clicking the &#8220;Compile&#8221; button or pressing the F7 key on your keyboard. If there are no errors or warnings, we can move on to testing the Expert Advisor.</p>
</div>
<div>
<p class="paragraph-robot-message">To test the Expert Advisor, open the Metatrader5 platform and click on &#8220;View&#8221; &gt; &#8220;Strategy Tester&#8221; or press Ctrl + R. Select the &#8220;Simple Commodity Channel Index.ex5&#8221; file and make sure the &#8220;Visualization&#8221; option is marked. Click &#8220;Start&#8221; to see the Expert Advisor in action.</p>
</div>
<div>
<p class="paragraph-robot-message">It&#8217;s important to note that this is a basic implementation of a CCI-based Expert Advisor. You may need to adjust the code to fit your specific needs. Additionally, it&#8217;s important to thoroughly backtest and optimize your Expert Advisor before using it in live trading. Always use risk management techniques to protect your capital and avoid overbought or oversold conditions that can lead to large losses.</p>
</div>
<div>
<p class="paragraph-robot-message">With these steps, you should be able to create a simple Expert Advisor using the CCI indicator in MQL5 for Metatrader5.</p>
</div>
<h2>Video Time Stamps</h2>
<p>0:00 &#8211; Introduction to Commodity Channel Index<br />
0:30 &#8211; Overbought and Oversold Conditions<br />
0:50 &#8211; Creating an Expert Advisor in MQL5<br />
1:03 &#8211; Selecting File &gt; New &gt; Expert Advisor<br />
1:13 &#8211; Naming the Expert Advisor<br />
1:20 &#8211; Removing Unnecessary Code<br />
1:30 &#8211; Creating a Double Array for Prices<br />
1:41 &#8211; Defining the Commodity Channel Index<br />
1:56 &#8211; Selecting the Current Symbol and Period<br />
2:01 &#8211; Calculating for 14 Candles<br />
2:12 &#8211; Inserting the Commodity Channel Index Indicator<br />
2:23 &#8211; Calculating Based on Close Prices<br />
2:35 &#8211; Sorting the Price Array<br />
2:42 &#8211; Copying the CCI Buffer<br />
2:46 &#8211; Getting the CCI Value for the Current Candle<br />
3:13 &#8211; Outputting Overbought or Oversold on the Chart<br />
3:36 &#8211; Outputting an Empty Signal for No Signal<br />
3:48 &#8211; Compiling the Expert Advisor<br />
4:01 &#8211; Bringing Up MetaTrader<br />
4:11 &#8211; Selecting View &gt; Strategy Tester<br />
4:23 &#8211; Selecting the Simple Commodity Channel Index Expert Advisor<br />
4:30 &#8211; Marking the Visualization Option<br />
4:34 &#8211; Starting the Expert Advisor<br />
4:41 &#8211; Observing the Expert Advisor in Action<br />
4:52 &#8211; Using the Commodity Channel Index Indicator for Entry Signals<br />
5:02 &#8211; Conclusion</p>
</div>
</div>
</div>
</div>
</div>
</div><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-how-to-code-a-simple-commodity-channel-index/">MQL5 Tutorial &#8211; How To Code A Simple Commodity Channel Index</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE SAR STANDALONE EXPERT ADVISOR</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-sar-standalone-expert-advisor/</link>
		
		
		<pubDate>Sun, 25 Feb 2024 06:52:24 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=1351</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-sar-standalone-expert-advisor/"><img title="A man in a suit is sitting in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-SAR-STANDALONE-EXPERT-ADVISOR.png" alt="A man in a suit is sitting in front of a computer screen." width="" /></a>
	</div>
<p>	In this video we are going to create a standalone Expert Advisor that is actually able to trade the Parabolic SAR Indicator. This is a very nice Indicator, you can see the dots above and below the price and whenever the direction changes here you will see that we have a buy or a sell signal. The signal output will be in the left upper corner here; this Expert Advisor will be able to automatically trade the signal. We have already an open position here and now we want to find out how we can code such a standalone Expert Advisor in MQL5. To do that please click on the little button here or press F4 on your keyboard 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 version: “SimpleSARStandaloneEA” (Expert Advisor), click on: “Continue”, “Continue” and “Finish”. Now we delete everything that is above the “OnTick” function and let&#8217;s also remove the two comment lines here. We start by importing the file: “Trade.mqh” that will enable us to create an instance of “CTrade” that will be called: “trade” and we use it later on to open the positions. Inside the “OnTick” function we create a price array (PriceArray) that is done by using the “MqlRates” function that is included in MQL5, now we use “ArraySetAsSeries” to sort our price array (PriceArray) from the current candle downwards and with “CopyRates” we fill it for the current symbol on the chart and a currently selected period, we start with the current candle 0 (zero) and we copy price data for 3 candles and store it in our price array (PriceArray). We also need to create a string for the signal, that variable will be also called: “signal” and we don&#8217;t assign a value here because we are going to calculate that later on. First we need to get the Ask and the Bid price, that can be done by using “SymbolInfoDouble” for the current symbol, we use “SYMBOL_ASK” to get the Ask price and “SYMBOL_BID” to get the Bid price, and with “NormalizeDouble” and “_Digits“ we calculate the number of digits behind the dot – you see that this currency pair has 3 digits while other currency pairs may have 5 digits – and if you mark “_Digits“ and press F1 you will see that the “_Digits“ variable stores the number of digits after the decimal point. Let’s create another array for our SAR Indicator that will be called my SAR array (mySARArray), it&#8217;s a double array so it can hold floating type values and by using a “iSAR” we create an SAR definition (SARDefinition) for the symbol on the chart and the currently selected period. Now you might ask yourself; what these two parameters are? Well, if you click on “Insert/ Indicators/ Trend/ Parabolic SAR” you will see that we have a step value of: 0.02 and a max value of: 0.2, that&#8217;s exactly what we are using here. Now it&#8217;s time to sort the SAR array (mySARArray) with “ArraySetAsSeries” and we use “CopyBuffer” one more time to fill our SAR array (mySARArray) for the first buffer – that&#8217;s the one that is used for the dots here – from the current candle 0 (zero) for 3 candles and store the values in our SAR array (mySARArray). Now we are able to calculate the value for the last candle, I will call it: “LastSARValue”, I use ”NormalizeDouble” here and a 5 because when you pause the Strategy Tester and hold your mouse above one of these dots you will see that we have 5 digits behind the dot of the value – that&#8217;s what “NormalizeDouble” does; if I would use “NormalizeDouble” and a 4 we would have 4 digits behind the dot – and we get the value for the last candle by looking at candle 1 in our SAR array (mySARArray). We actually do the same here, this time for candle 2 – that&#8217;s the candle before the last candle – so I call it: “NextToLastSARValue” and whenever the “LastSARValue” is below the lowest price of candle 1 – or in other words; whenever the dots are below the candles – and if the “NextToLastSARValue” was greater than the highest price for the candle before that would be a buy signal so we assign the word: “buy” to our signal. Otherwise if the “LastSARValue” was above candle 1 and the value was below the candles before that would be a sell signal and now we would assign the word: “sell” to our signal. And if our signal equals sell and “PositionsTotal” is below 1 – in other words we have no open positions – we use “trade.Sell” to sell 10 micro lot, otherwise if the signal equals buy and we have no open positions we would use “trade.Buy” to buy 10 micro lot. Finally we create a chart output here, we use the “Comment” function to output the words: “The current signal is:” followed by our calculated “signal”. Okay. That’s it. Please click on the “Compile” button or press F7, you should get no errors and no warnings here and in that case we can click here or press F4 to go back to Metatrader. In Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the file: “SimpleSARStandaloneEA.ex5”, mark the visualization option here and start a test. …and here we are! Our Expert Advisor is actually trading, this is our first position and in this little video you have learned how to create a standalone Expert Advisor that is actually trading the SAR Indicator and you have coded it yourself with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-sar-standalone-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE SAR STANDALONE EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-sar-standalone-expert-advisor/"><img title="A man in a suit is sitting in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-SAR-STANDALONE-EXPERT-ADVISOR.png" alt="A man in a suit is sitting in front of a computer screen." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>In this video we are going to create a standalone Expert Advisor that is actually able to trade the Parabolic SAR Indicator.<br />
This is a very nice Indicator, you can see the dots above and below the price and whenever the direction changes here you will see that we have a buy or a sell signal. The signal output will be in the left upper corner here; this Expert Advisor will be able to automatically trade the signal. We have already an open position here and now we want to find out how we can code such a standalone Expert Advisor in MQL5.<br />
To do that please click on the little button here or press F4 on your keyboard 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 version: “SimpleSARStandaloneEA” (Expert Advisor), click on: “Continue”, “Continue” and “Finish”.<br />
Now we delete everything that is above the “OnTick” function and let&#8217;s also remove the two comment lines here.<br />
We start by importing the file: “Trade.mqh” that will enable us to create an instance of “CTrade” that will be called: “trade” and we use it later on to open the positions.<br />
Inside the “OnTick” function we create a price array (PriceArray) that is done by using the “MqlRates” function that is included in MQL5, now we use “ArraySetAsSeries” to sort our price array (PriceArray) from the current candle downwards and with “CopyRates” we fill it for the current symbol on the chart and a currently selected period, we start with the current candle 0 (zero) and we copy price data for 3 candles and store it in our price array (PriceArray).<br />
We also need to create a string for the signal, that variable will be also called: “signal” and we don&#8217;t assign a value here because we are going to calculate that later on.<br />
First we need to get the Ask and the Bid price, that can be done by using “SymbolInfoDouble” for the current symbol, we use “SYMBOL_ASK” to get the Ask price and “SYMBOL_BID” to get the Bid price, and with “NormalizeDouble” and “_Digits“ we calculate the number of digits behind the dot – you see that this currency pair has 3 digits while other currency pairs may have 5 digits – and if you mark “_Digits“ and press F1 you will see that the “_Digits“ variable stores the number of digits after the decimal point.<br />
Let’s create another array for our SAR Indicator that will be called my SAR array (mySARArray), it&#8217;s a double array so it can hold floating type values and by using a “iSAR” we create an SAR definition (SARDefinition) for the symbol on the chart and the currently selected period. Now you might ask yourself; what these two parameters are?<br />
Well, if you click on “Insert/ Indicators/ Trend/ Parabolic SAR” you will see that we have a step value of: 0.02 and a max value of: 0.2, that&#8217;s exactly what we are using here.<br />
Now it&#8217;s time to sort the SAR array (mySARArray) with “ArraySetAsSeries” and we use “CopyBuffer” one more time to fill our SAR array (mySARArray) for the first buffer – that&#8217;s the one that is used for the dots here – from the current candle 0 (zero) for 3 candles and store the values in our SAR array (mySARArray). Now we are able to calculate the value for the last candle, I will call it: “LastSARValue”, I use ”NormalizeDouble” here and a 5 because when you pause the Strategy Tester and hold your mouse above one of these dots you will see that we have 5 digits behind the dot of the value – that&#8217;s what “NormalizeDouble” does; if I would use “NormalizeDouble” and a 4 we would have 4 digits behind the dot – and we get the value for the last candle by looking at candle 1 in our SAR array (mySARArray).<br />
We actually do the same here, this time for candle 2 – that&#8217;s the candle before the last candle – so I call it: “NextToLastSARValue” and whenever the “LastSARValue” is below the lowest price of candle 1 – or in other words; whenever the dots are below the candles – and if the “NextToLastSARValue” was greater than the highest price for the candle before that would be a buy signal so we assign the word: “buy” to our signal.<br />
Otherwise if the “LastSARValue” was above candle 1 and the value was below the candles before that would be a sell signal and now we would assign the word: “sell” to our signal. And if our signal equals sell and “PositionsTotal” is below 1 – in other words we have no open positions – we use “trade.Sell” to sell 10 micro lot, otherwise if the signal equals buy and we have no open positions we would use “trade.Buy” to buy 10 micro lot.<br />
Finally we create a chart output here, we use the “Comment” function to output the words: “The current signal is:” followed by our calculated “signal”.<br />
Okay. That’s it. Please click on the “Compile” button or press F7, you should get no errors and no warnings here and in that case we can click here or press F4 to go back to Metatrader.<br />
In Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the file: “SimpleSARStandaloneEA.ex5”, mark the visualization option here and start a test.<br />
…and here we are! Our Expert Advisor is actually trading, this is our first position and in this little video you have learned how to create a standalone Expert Advisor that is actually trading the SAR Indicator and you have coded it yourself with a few lines of MQL5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-tutorial-simple-sar-standalone-expert-advisor/?tmstv=1777110366" rel="nofollow" id="download-link-1352" data-redirect="false" >
	Download &ldquo;MQL5 TUTORIAL - SIMPLE SAR STANDALONE EXPERT ADVISOR&rdquo;	<small>SimpleSARStandaloneEA.txt		&ndash; Downloaded 387 times		&ndash; 2.34 KB</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-sar-standalone-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE SAR STANDALONE EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="24852666" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-SAR-STANDALONE-EXPERT-ADVISOR.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>7:33</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>In this video we are going to create a standalone Expert Advisor that is actually able to trade the Parabolic SAR Indicator. This is a very nice Indicator, you can see the dots above and below the price and whenever the direction changes here you will see that we have a buy or a sell signal. The signal output will be in the left upper corner here; this Expert Advisor will be able to automatically trade the signal. We have already an open position here and now we want to find out how we can code such a standalone Expert Advisor in MQL5. To do that please click on the little button here or press F4 on your keyboard 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 version: “SimpleSARStandaloneEA” (Expert Advisor), click on: “Continue”, “Continue” and “Finish”. Now we delete everything that is above the “OnTick” function and let&amp;#8217;s also remove the two comment lines here. We start by importing the file: “Trade.mqh” that will enable us to create an instance of “CTrade” that will be called: “trade” and we use it later on to open the positions. Inside the “OnTick” function we create a price array (PriceArray) that is done by using the “MqlRates” function that is included in MQL5, now we use “ArraySetAsSeries” to sort our price array (PriceArray) from the current candle downwards and with “CopyRates” we fill it for the current symbol on the chart and a currently selected period, we start with the current candle 0 (zero) and we copy price data for 3 candles and store it in our price array (PriceArray). We also need to create a string for the signal, that variable will be also called: “signal” and we don&amp;#8217;t assign a value here because we are going to calculate that later on. First we need to get the Ask and the Bid price, that can be done by using “SymbolInfoDouble” for the current symbol, we use “SYMBOL_ASK” to get the Ask price and “SYMBOL_BID” to get the Bid price, and with “NormalizeDouble” and “_Digits“ we calculate the number of digits behind the dot – you see that this currency pair has 3 digits while other currency pairs may have 5 digits – and if you mark “_Digits“ and press F1 you will see that the “_Digits“ variable stores the number of digits after the decimal point. Let’s create another array for our SAR Indicator that will be called my SAR array (mySARArray), it&amp;#8217;s a double array so it can hold floating type values and by using a “iSAR” we create an SAR definition (SARDefinition) for the symbol on the chart and the currently selected period. Now you might ask yourself; what these two parameters are? Well, if you click on “Insert/ Indicators/ Trend/ Parabolic SAR” you will see that we have a step value of: 0.02 and a max value of: 0.2, that&amp;#8217;s exactly what we are using here. Now it&amp;#8217;s time to sort the SAR array (mySARArray) with “ArraySetAsSeries” and we use “CopyBuffer” one more time to fill our SAR array (mySARArray) for the first buffer – that&amp;#8217;s the one that is used for the dots here – from the current candle 0 (zero) for 3 candles and store the values in our SAR array (mySARArray). Now we are able to calculate the value for the last candle, I will call it: “LastSARValue”, I use ”NormalizeDouble” here and a 5 because when you pause the Strategy Tester and hold your mouse above one of these dots you will see that we have 5 digits behind the dot of the value – that&amp;#8217;s what “NormalizeDouble” does; if I would use “NormalizeDouble” and a 4 we would have 4 digits behind the dot – and we get the value for the last candle by looking at candle 1 in our SAR array (mySARArray). We actually do the same here, this time for candle 2 – that&amp;#8217;s the candle before the last candle – so I call it: “NextToLastSARValue” and whenever the “LastSARValue” is below the lowest price of candle 1 – or in other words; whenever the dots are below the candles – and if the “NextToLastSARValue” was greater than the highest price for the candle before that would be a buy signal so we assign the word: “buy” to our signal. Otherwise if the “LastSARValue” was above candle 1 and the value was below the candles before that would be a sell signal and now we would assign the word: “sell” to our signal. And if our signal equals sell and “PositionsTotal” is below 1 – in other words we have no open positions – we use “trade.Sell” to sell 10 micro lot, otherwise if the signal equals buy and we have no open positions we would use “trade.Buy” to buy 10 micro lot. Finally we create a chart output here, we use the “Comment” function to output the words: “The current signal is:” followed by our calculated “signal”. Okay. That’s it. Please click on the “Compile” button or press F7, you should get no errors and no warnings here and in that case we can click here or press F4 to go back to Metatrader. In Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the file: “SimpleSARStandaloneEA.ex5”, mark the visualization option here and start a test. …and here we are! Our Expert Advisor is actually trading, this is our first position and in this little video you have learned how to create a standalone Expert Advisor that is actually trading the SAR Indicator and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE SAR STANDALONE EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>In this video we are going to create a standalone Expert Advisor that is actually able to trade the Parabolic SAR Indicator. This is a very nice Indicator, you can see the dots above and below the price and whenever the direction changes here you will see that we have a buy or a sell signal. The signal output will be in the left upper corner here; this Expert Advisor will be able to automatically trade the signal. We have already an open position here and now we want to find out how we can code such a standalone Expert Advisor in MQL5. To do that please click on the little button here or press F4 on your keyboard 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 version: “SimpleSARStandaloneEA” (Expert Advisor), click on: “Continue”, “Continue” and “Finish”. Now we delete everything that is above the “OnTick” function and let&amp;#8217;s also remove the two comment lines here. We start by importing the file: “Trade.mqh” that will enable us to create an instance of “CTrade” that will be called: “trade” and we use it later on to open the positions. Inside the “OnTick” function we create a price array (PriceArray) that is done by using the “MqlRates” function that is included in MQL5, now we use “ArraySetAsSeries” to sort our price array (PriceArray) from the current candle downwards and with “CopyRates” we fill it for the current symbol on the chart and a currently selected period, we start with the current candle 0 (zero) and we copy price data for 3 candles and store it in our price array (PriceArray). We also need to create a string for the signal, that variable will be also called: “signal” and we don&amp;#8217;t assign a value here because we are going to calculate that later on. First we need to get the Ask and the Bid price, that can be done by using “SymbolInfoDouble” for the current symbol, we use “SYMBOL_ASK” to get the Ask price and “SYMBOL_BID” to get the Bid price, and with “NormalizeDouble” and “_Digits“ we calculate the number of digits behind the dot – you see that this currency pair has 3 digits while other currency pairs may have 5 digits – and if you mark “_Digits“ and press F1 you will see that the “_Digits“ variable stores the number of digits after the decimal point. Let’s create another array for our SAR Indicator that will be called my SAR array (mySARArray), it&amp;#8217;s a double array so it can hold floating type values and by using a “iSAR” we create an SAR definition (SARDefinition) for the symbol on the chart and the currently selected period. Now you might ask yourself; what these two parameters are? Well, if you click on “Insert/ Indicators/ Trend/ Parabolic SAR” you will see that we have a step value of: 0.02 and a max value of: 0.2, that&amp;#8217;s exactly what we are using here. Now it&amp;#8217;s time to sort the SAR array (mySARArray) with “ArraySetAsSeries” and we use “CopyBuffer” one more time to fill our SAR array (mySARArray) for the first buffer – that&amp;#8217;s the one that is used for the dots here – from the current candle 0 (zero) for 3 candles and store the values in our SAR array (mySARArray). Now we are able to calculate the value for the last candle, I will call it: “LastSARValue”, I use ”NormalizeDouble” here and a 5 because when you pause the Strategy Tester and hold your mouse above one of these dots you will see that we have 5 digits behind the dot of the value – that&amp;#8217;s what “NormalizeDouble” does; if I would use “NormalizeDouble” and a 4 we would have 4 digits behind the dot – and we get the value for the last candle by looking at candle 1 in our SAR array (mySARArray). We actually do the same here, this time for candle 2 – that&amp;#8217;s the candle before the last candle – so I call it: “NextToLastSARValue” and whenever the “LastSARValue” is below the lowest price of candle 1 – or in other words; whenever the dots are below the candles – and if the “NextToLastSARValue” was greater than the highest price for the candle before that would be a buy signal so we assign the word: “buy” to our signal. Otherwise if the “LastSARValue” was above candle 1 and the value was below the candles before that would be a sell signal and now we would assign the word: “sell” to our signal. And if our signal equals sell and “PositionsTotal” is below 1 – in other words we have no open positions – we use “trade.Sell” to sell 10 micro lot, otherwise if the signal equals buy and we have no open positions we would use “trade.Buy” to buy 10 micro lot. Finally we create a chart output here, we use the “Comment” function to output the words: “The current signal is:” followed by our calculated “signal”. Okay. That’s it. Please click on the “Compile” button or press F7, you should get no errors and no warnings here and in that case we can click here or press F4 to go back to Metatrader. In Metatrader we click on: “View/ Strategy Tester” or press CTRL and R, please select the file: “SimpleSARStandaloneEA.ex5”, mark the visualization option here and start a test. …and here we are! Our Expert Advisor is actually trading, this is our first position and in this little video you have learned how to create a standalone Expert Advisor that is actually trading the SAR Indicator and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE SAR STANDALONE EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE ICCI EXPERT ADVISOR</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-icci-expert-advisor/</link>
		
		
		<pubDate>Sun, 18 Feb 2024 08:47:39 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=1229</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-icci-expert-advisor/"><img title="A businessman in a suit sitting at a desk with a laptop." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-COMMODITY-CHANNEL-INDEX-EA.png" alt="A businessman in a suit sitting at a desk with a laptop." width="" /></a>
	</div>
<p>	In this video we are taking a look at the ICCI Indicator, that&#8217;s the Commodity Channel Index Indicator. You can see that this signal here is creating buy and sell signals and whenever the blue line here is above the upper dotted line that would be a sell signal, in the other case if the blue line here is below the lower dotted line that would be a buy signal. Now, how can we create an Expert Advisor that is able to calculate the Commodity Channel Index Indicator? To do that please click on the little button here or press F4 on your keyboard 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 one: “SimpleCommodityChannelIndex”, click on “Continue”, “Continue” and “Finish” and now you can delete everything that is above the “OnTick” function and let’s also delete the two comment lines here. Here we need to create a string for the signal that will be also called: “signal” but we don&#8217;t assign any value here. We also need to create an array for the price data that will be called: “myPriceArray”, it&#8217;s a double array so it can hold floating type values and now we define the ICCI Expert Advisor by using the “iCCI” function that is built in into MQL5, it uses a few parameters; the first one is for the current chart – we use “_Symbol” to get the current currency pair on the chart and “_Period” to get the currently selected period. Right now we are trading the 1-minute chart but another period could be 30 or 60 minutes, the third parameter is the number of the candles. We use 14 candles and if you click on: “Insert/ Indicators/ Custom/ CCI/ Inputs” you would see a period of 14 candles is the default value. When I click on “OK” that&#8217;s what we see within the round brackets here, let&#8217;s right-click and select “Properties”, go to the “Parameters” tab until you see that we use a typical price and in MQL5 that’s “PRICE_TYPICAL” for the last parameter and now that we have defined the ICCI we want to use “ArraySetAsSeries” to store the price data from the current candle downwards for our price array (myPriceArray) we have created here and with “CopyBuffer” we fill our price array (myPriceArray) according to our “ICCIDefinition” for buffer 0 from the current candle 0 and for 3 candles and to get the ICCI value (ICCIValue) we just need to have a look at candle 0 in our price array (myPriceArray) and we assign the result to the variable ICCI value (ICCIValue) and whenever the ICCI value (ICCIValue) is greater than 100 that would be considered to be a sell signal so we assign the word: “sell” to our signal. In the other case if the ICCI value (ICCIValue) is below -100 that would be a buy signal so we assign the word: “buy” to our signal. Now let&#8217;s make that a capital and in the last step we want to create an output on the chart that will output the word “Signal:” followed by the calculated signal. Please don&#8217;t forget the closing bracket. I will enable the toolbar so now I can click on the “Compile” button here or press F7 on the keyboard to compile the code. We have one warning here because we used the float value here, usually that would be a double value so let&#8217;s correct that, press F7 and now the warning is gone, it doesn&#8217;t really make a difference because we use the ICCI value (ICCIValue) to find out if something is above 100 or below -100, you can store a lot of digits behind the dot in double value but that&#8217;s not very helpful if you just want to find out if something is above plus or below minus 100. Okay, if you could compile your code without any errors you could now click on the little button here or press F4 on your keyboard to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R on your keyboard and here in a Strategy Tester please select the “SimpleCommodityChannelIndex.ex5” file, mark the visualization option here and start your test and here&#8217;s our little Expert Advisor at work it creates outputs for buy and sell signals on your chart and now you know how you can code it and you have coded it yourself with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-icci-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE ICCI EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-icci-expert-advisor/"><img title="A businessman in a suit sitting at a desk with a laptop." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-COMMODITY-CHANNEL-INDEX-EA.png" alt="A businessman in a suit sitting at a desk with a laptop." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>In this video we are taking a look at the ICCI Indicator, that&#8217;s the Commodity Channel Index Indicator.<br />
You can see that this signal here is creating buy and sell signals and whenever the blue line here is above the upper dotted line that would be a sell signal, in the other case if the blue line here is below the lower dotted line that would be a buy signal.<br />
Now, how can we create an Expert Advisor that is able to calculate the Commodity Channel Index Indicator?<br />
To do that please click on the little button here or press F4 on your keyboard 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 one: “SimpleCommodityChannelIndex”, click on “Continue”, “Continue” and “Finish” and now you can delete everything that is above the “OnTick” function and let’s also delete the two comment lines here.<br />
Here we need to create a string for the signal that will be also called: “signal” but we don&#8217;t assign any value here.<br />
We also need to create an array for the price data that will be called: “myPriceArray”, it&#8217;s a double array so it can hold floating type values and now we define the ICCI Expert Advisor by using the “iCCI” function that is built in into MQL5, it uses a few parameters; the first one is for the current chart – we use “_Symbol” to get the current currency pair on the chart and “_Period” to get the currently selected period. Right now we are trading the 1-minute chart but another period could be 30 or 60 minutes, the third parameter is the number of the candles. We use 14 candles and if you click on: “Insert/ Indicators/ Custom/ CCI/ Inputs” you would see a period of 14 candles is the default value. When I click on “OK” that&#8217;s what we see within the round brackets here, let&#8217;s right-click and select “Properties”, go to the “Parameters” tab until you see that we use a typical price and in MQL5 that’s “PRICE_TYPICAL” for the last parameter and now that we have defined the ICCI we want to use “ArraySetAsSeries” to store the price data from the current candle downwards for our price array (myPriceArray) we have created here and with “CopyBuffer” we fill our price array (myPriceArray) according to our “ICCIDefinition” for buffer 0 from the current candle 0 and for 3 candles and to get the ICCI value (ICCIValue) we just need to have a look at candle 0 in our price array (myPriceArray) and we assign the result to the variable ICCI value (ICCIValue) and whenever the ICCI value (ICCIValue) is greater than 100 that would be considered to be a sell signal so we assign the word: “sell” to our signal.<br />
In the other case if the ICCI value (ICCIValue) is below -100 that would be a buy signal so we assign the word: “buy” to our signal.<br />
Now let&#8217;s make that a capital and in the last step we want to create an output on the chart that will output the word “Signal:” followed by the calculated signal.<br />
Please don&#8217;t forget the closing bracket. I will enable the toolbar so now I can click on the “Compile” button here or press F7 on the keyboard to compile the code. We have one warning here because we used the float value here, usually that would be a double value so let&#8217;s correct that, press F7 and now the warning is gone, it doesn&#8217;t really make a difference because we use the ICCI value (ICCIValue) to find out if something is above 100 or below -100, you can store a lot of digits behind the dot in double value but that&#8217;s not very helpful if you just want to find out if something is above plus or below minus 100.<br />
Okay, if you could compile your code without any errors you could now click on the little button here or press F4 on your keyboard to go back to Metatrader.<br />
In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R on your keyboard and here in a Strategy Tester please select the “SimpleCommodityChannelIndex.ex5” file, mark the visualization option here and start your test and here&#8217;s our little Expert Advisor at work it creates outputs for buy and sell signals on your chart and now you know how you can code it and you have coded it yourself with a few lines of MQL5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-tutorial-simple-commodity-channel-index/?tmstv=1777110366" rel="nofollow" id="download-link-1231" data-redirect="false" >
	Download &ldquo;MQL5 TUTORIAL - SIMPLE COMMODITY CHANNEL INDEX&rdquo;	<small>SimpleICCI.txt		&ndash; Downloaded 365 times		&ndash; 911.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-icci-expert-advisor/">MQL5 TUTORIAL &#8211; SIMPLE ICCI EXPERT ADVISOR</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="25125814" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-COMMODITY-CHANNEL-INDEX-EA.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>5:48</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>In this video we are taking a look at the ICCI Indicator, that&amp;#8217;s the Commodity Channel Index Indicator. You can see that this signal here is creating buy and sell signals and whenever the blue line here is above the upper dotted line that would be a sell signal, in the other case if the blue line here is below the lower dotted line that would be a buy signal. Now, how can we create an Expert Advisor that is able to calculate the Commodity Channel Index Indicator? To do that please click on the little button here or press F4 on your keyboard 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 one: “SimpleCommodityChannelIndex”, click on “Continue”, “Continue” and “Finish” and now you can delete everything that is above the “OnTick” function and let’s also delete the two comment lines here. Here we need to create a string for the signal that will be also called: “signal” but we don&amp;#8217;t assign any value here. We also need to create an array for the price data that will be called: “myPriceArray”, it&amp;#8217;s a double array so it can hold floating type values and now we define the ICCI Expert Advisor by using the “iCCI” function that is built in into MQL5, it uses a few parameters; the first one is for the current chart – we use “_Symbol” to get the current currency pair on the chart and “_Period” to get the currently selected period. Right now we are trading the 1-minute chart but another period could be 30 or 60 minutes, the third parameter is the number of the candles. We use 14 candles and if you click on: “Insert/ Indicators/ Custom/ CCI/ Inputs” you would see a period of 14 candles is the default value. When I click on “OK” that&amp;#8217;s what we see within the round brackets here, let&amp;#8217;s right-click and select “Properties”, go to the “Parameters” tab until you see that we use a typical price and in MQL5 that’s “PRICE_TYPICAL” for the last parameter and now that we have defined the ICCI we want to use “ArraySetAsSeries” to store the price data from the current candle downwards for our price array (myPriceArray) we have created here and with “CopyBuffer” we fill our price array (myPriceArray) according to our “ICCIDefinition” for buffer 0 from the current candle 0 and for 3 candles and to get the ICCI value (ICCIValue) we just need to have a look at candle 0 in our price array (myPriceArray) and we assign the result to the variable ICCI value (ICCIValue) and whenever the ICCI value (ICCIValue) is greater than 100 that would be considered to be a sell signal so we assign the word: “sell” to our signal. In the other case if the ICCI value (ICCIValue) is below -100 that would be a buy signal so we assign the word: “buy” to our signal. Now let&amp;#8217;s make that a capital and in the last step we want to create an output on the chart that will output the word “Signal:” followed by the calculated signal. Please don&amp;#8217;t forget the closing bracket. I will enable the toolbar so now I can click on the “Compile” button here or press F7 on the keyboard to compile the code. We have one warning here because we used the float value here, usually that would be a double value so let&amp;#8217;s correct that, press F7 and now the warning is gone, it doesn&amp;#8217;t really make a difference because we use the ICCI value (ICCIValue) to find out if something is above 100 or below -100, you can store a lot of digits behind the dot in double value but that&amp;#8217;s not very helpful if you just want to find out if something is above plus or below minus 100. Okay, if you could compile your code without any errors you could now click on the little button here or press F4 on your keyboard to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R on your keyboard and here in a Strategy Tester please select the “SimpleCommodityChannelIndex.ex5” file, mark the visualization option here and start your test and here&amp;#8217;s our little Expert Advisor at work it creates outputs for buy and sell signals on your chart and now you know how you can code it and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE ICCI EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>In this video we are taking a look at the ICCI Indicator, that&amp;#8217;s the Commodity Channel Index Indicator. You can see that this signal here is creating buy and sell signals and whenever the blue line here is above the upper dotted line that would be a sell signal, in the other case if the blue line here is below the lower dotted line that would be a buy signal. Now, how can we create an Expert Advisor that is able to calculate the Commodity Channel Index Indicator? To do that please click on the little button here or press F4 on your keyboard 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 one: “SimpleCommodityChannelIndex”, click on “Continue”, “Continue” and “Finish” and now you can delete everything that is above the “OnTick” function and let’s also delete the two comment lines here. Here we need to create a string for the signal that will be also called: “signal” but we don&amp;#8217;t assign any value here. We also need to create an array for the price data that will be called: “myPriceArray”, it&amp;#8217;s a double array so it can hold floating type values and now we define the ICCI Expert Advisor by using the “iCCI” function that is built in into MQL5, it uses a few parameters; the first one is for the current chart – we use “_Symbol” to get the current currency pair on the chart and “_Period” to get the currently selected period. Right now we are trading the 1-minute chart but another period could be 30 or 60 minutes, the third parameter is the number of the candles. We use 14 candles and if you click on: “Insert/ Indicators/ Custom/ CCI/ Inputs” you would see a period of 14 candles is the default value. When I click on “OK” that&amp;#8217;s what we see within the round brackets here, let&amp;#8217;s right-click and select “Properties”, go to the “Parameters” tab until you see that we use a typical price and in MQL5 that’s “PRICE_TYPICAL” for the last parameter and now that we have defined the ICCI we want to use “ArraySetAsSeries” to store the price data from the current candle downwards for our price array (myPriceArray) we have created here and with “CopyBuffer” we fill our price array (myPriceArray) according to our “ICCIDefinition” for buffer 0 from the current candle 0 and for 3 candles and to get the ICCI value (ICCIValue) we just need to have a look at candle 0 in our price array (myPriceArray) and we assign the result to the variable ICCI value (ICCIValue) and whenever the ICCI value (ICCIValue) is greater than 100 that would be considered to be a sell signal so we assign the word: “sell” to our signal. In the other case if the ICCI value (ICCIValue) is below -100 that would be a buy signal so we assign the word: “buy” to our signal. Now let&amp;#8217;s make that a capital and in the last step we want to create an output on the chart that will output the word “Signal:” followed by the calculated signal. Please don&amp;#8217;t forget the closing bracket. I will enable the toolbar so now I can click on the “Compile” button here or press F7 on the keyboard to compile the code. We have one warning here because we used the float value here, usually that would be a double value so let&amp;#8217;s correct that, press F7 and now the warning is gone, it doesn&amp;#8217;t really make a difference because we use the ICCI value (ICCIValue) to find out if something is above 100 or below -100, you can store a lot of digits behind the dot in double value but that&amp;#8217;s not very helpful if you just want to find out if something is above plus or below minus 100. Okay, if you could compile your code without any errors you could now click on the little button here or press F4 on your keyboard to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R on your keyboard and here in a Strategy Tester please select the “SimpleCommodityChannelIndex.ex5” file, mark the visualization option here and start your test and here&amp;#8217;s our little Expert Advisor at work it creates outputs for buy and sell signals on your chart and now you know how you can code it and you have coded it yourself with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE ICCI EXPERT ADVISOR appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – Simple Adaptive Moving Average Robot</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-adaptive-moving-average-robot/</link>
		
		
		<pubDate>Sun, 11 Feb 2024 09:44:23 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MQL5 Entry Signals]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=671</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-adaptive-moving-average-robot/"><img title="A laptop screen showing a man in a suit." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Adaptive-Moving-Average-Robot.png" alt="A laptop screen showing a man in a suit." width="" /></a>
	</div>
<p>	Okay, this time we are talking about an Adaptive Moving Average Indicator. It was created (I think) by Perry Kaufman and you can use it to find entries or exits like you could with a simple moving average. Now if that is almost the same, why should we prefer to use an Adaptive Moving Average? Well Perry J. Kaufmann created this fascinating formula here for a reason. The Adaptive Moving Average has less lagging and generates less false signals. Let&#8217;s see if that is true. Now how can we create an Adaptive Moving Average Expert Advisor for Meta Trader 5? First please click on the little button here, that should bring up the MetaEditor. And here you want to select File, New, Expert Advisor from template, Continue and we will call that Simple Adaptive Moving Average. Now click on Continue, Continue, finish, and you can remove everything above the Ontick function here and I will also delete the two comment lines. So let&#8217;s create an array that will hold our prices, I will call it my price array and it is a double array because double and float variables can hold floating point types. And the adaptive moving average has six digits behind the dot and now we want to use the integrated MQL5 function iAMA for the current symbol on the chart and the current period, we want to calculate our prices based on the last nine candles. The Fast Moving Average has a value of two because if you Insert, Indicators, Trend, Adaptive Moving Average, you will see the values here, these are the nine candles. The fast EMA, that&#8217;s an Exponential Moving Average, is calculated for two candles and the slow EMA is calculated for thirty candles. And we do not need any shift, so we will use the exact same values here: nine candles, two candles for the fast EMA, thirty candles for the slow EMA. Zero for no shift and I would like to have the values calculated based on the close prices because the close price is also the default setting here. Okay let&#8217;s move on and sort the price array from the current candle downwards by using the array set as Series function for the price array we have created here. And now we want to fill it with data, that is done by using Copy Buffer for the Defined Moving Average, that&#8217;s the Adaptive Moving Average Definition we have created in this line. We just need one line, that&#8217;s the zero here, and we want to copy values from the current candle that&#8217;s candle zero for three candles that&#8217;s the three here, and we want to store the results in our price array. And now what we have done that, we want to get the value of the current candle, that&#8217;s candles zero of our price array and we use the normalized double function to get six digits behind the dot and the calculated value should be stored in a variable that is called Adaptive Moving Average Value. And the last step is to create a chart output by using the comment function. It will output the text AMA value and the calculated value for the Adaptive Moving Average Value we have extracted here. Okay that&#8217;s it, now please click the Compile bottom and you should get no errors and no warnings here so now you can click the button or hit the F4 key to go back to MetaTrader. And in MetaTrader you want to click on View, Strategy Tester, and in the Strategy Test panel you want to select the Simple Adaptive Moving Average.ex5 file. Select any currency pair you like and please make sure to enable the check mark for the visualisation option before you start your test. And here we go! if you move your mouse to the current value here, you’ll see that we have a value of 1.544031, that&#8217;s exactly what we have calculated here. And in your Expert Advisor you would now compare the value of the adaptive moving average to the current price. And if the price is above the moving average you would buy, and if the price is below the moving average you would sell. Okay now you can create an Expert Advisor that uses the Adaptive Moving Average Indicator to find out if you want to buy or if you want to sell and you have created it in less than five minutes with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-adaptive-moving-average-robot/">MQL5 Tutorial &#8211; Simple Adaptive Moving Average Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-adaptive-moving-average-robot/"><img title="A laptop screen showing a man in a suit." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Adaptive-Moving-Average-Robot.png" alt="A laptop screen showing a man in a suit." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>Okay, this time we are talking about an Adaptive Moving Average Indicator.<br />
It was created (I think) by Perry Kaufman and you can use it to find entries or exits like you could with a simple moving average.<br />
Now if that is almost the same, why should we prefer to use an Adaptive Moving Average?<br />
Well Perry J. Kaufmann created this fascinating formula here for a reason. The Adaptive Moving Average has less lagging and generates less false signals. Let&#8217;s see if that is true.<br />
Now how can we create an Adaptive Moving Average Expert Advisor for Meta Trader 5?<br />
First please click on the little button here, that should bring up the MetaEditor.<br />
And here you want to select File, New, Expert Advisor from template, Continue and we will call that Simple Adaptive Moving Average.<br />
Now click on Continue, Continue, finish, and you can remove everything above the Ontick function here and I will also delete the two comment lines.<br />
So let&#8217;s create an array that will hold our prices, I will call it my price array and it is a double array because double and float variables can hold floating point types.<br />
And the adaptive moving average has six digits behind the dot and now we want to use the integrated MQL5 function iAMA for the current symbol on the chart and the current period, we want to calculate our prices based on the last nine candles.<br />
The Fast Moving Average has a value of two because if you Insert, Indicators, Trend, Adaptive Moving Average, you will see the values here, these are the nine candles.<br />
The fast EMA, that&#8217;s an Exponential Moving Average, is calculated for two candles and the slow EMA is calculated for thirty candles.<br />
And we do not need any shift, so we will use the exact same values here: nine candles, two candles for the fast EMA, thirty candles for the slow EMA.<br />
Zero for no shift and I would like to have the values calculated based on the close prices because the close price is also the default setting here.<br />
Okay let&#8217;s move on and sort the price array from the current candle downwards by using the array set as Series function for the price array we have created here.<br />
And now we want to fill it with data, that is done by using Copy Buffer for the Defined Moving Average, that&#8217;s the Adaptive Moving Average Definition we have created in this line.<br />
We just need one line, that&#8217;s the zero here, and we want to copy values from the current candle that&#8217;s candle zero for three candles that&#8217;s the three here, and we want to store the results in our price array.<br />
And now what we have done that, we want to get the value of the current candle, that&#8217;s candles zero of our price array and we use the normalized double function to get six digits behind the dot and the calculated value should be stored in a variable that is called Adaptive Moving Average Value.<br />
And the last step is to create a chart output by using the comment function.<br />
It will output the text AMA value and the calculated value for the Adaptive Moving Average Value we have extracted here.<br />
Okay that&#8217;s it, now please click the Compile bottom and you should get no errors and no warnings here so now you can click the button or hit the F4 key to go back to MetaTrader.<br />
And in MetaTrader you want to click on View, Strategy Tester, and in the Strategy Test panel you want to select the Simple Adaptive Moving Average.ex5 file.<br />
Select any currency pair you like and please make sure to enable the check mark for the visualisation option before you start your test.<br />
And here we go! if you move your mouse to the current value here, you’ll see that we have a value of 1.544031, that&#8217;s exactly what we have calculated here.<br />
And in your Expert Advisor you would now compare the value of the adaptive moving average to the current price.<br />
And if the price is above the moving average you would buy, and if the price is below the moving average you would sell.<br />
Okay now you can create an Expert Advisor that uses the Adaptive Moving Average Indicator to find out if you want to buy or if you want to sell and you have created it in less than five minutes with a few lines of MQL5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-simple-adaptive-moving-average-robot/?tmstv=1777110366" rel="nofollow" id="download-link-673" data-redirect="false" >
	Download &ldquo;MQL5 - Simple Adaptive Moving Average Robot&rdquo;	<small>SimpleAdaptiveMovingAverage.txt		&ndash; Downloaded 473 times		&ndash; 762.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-adaptive-moving-average-robot/">MQL5 Tutorial &#8211; Simple Adaptive Moving Average Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="17422168" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Adaptive-Moving-Average-Robot.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>6:13</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>Okay, this time we are talking about an Adaptive Moving Average Indicator. It was created (I think) by Perry Kaufman and you can use it to find entries or exits like you could with a simple moving average. Now if that is almost the same, why should we prefer to use an Adaptive Moving Average? Well Perry J. Kaufmann created this fascinating formula here for a reason. The Adaptive Moving Average has less lagging and generates less false signals. Let&amp;#8217;s see if that is true. Now how can we create an Adaptive Moving Average Expert Advisor for Meta Trader 5? First please click on the little button here, that should bring up the MetaEditor. And here you want to select File, New, Expert Advisor from template, Continue and we will call that Simple Adaptive Moving Average. Now click on Continue, Continue, finish, and you can remove everything above the Ontick function here and I will also delete the two comment lines. So let&amp;#8217;s create an array that will hold our prices, I will call it my price array and it is a double array because double and float variables can hold floating point types. And the adaptive moving average has six digits behind the dot and now we want to use the integrated MQL5 function iAMA for the current symbol on the chart and the current period, we want to calculate our prices based on the last nine candles. The Fast Moving Average has a value of two because if you Insert, Indicators, Trend, Adaptive Moving Average, you will see the values here, these are the nine candles. The fast EMA, that&amp;#8217;s an Exponential Moving Average, is calculated for two candles and the slow EMA is calculated for thirty candles. And we do not need any shift, so we will use the exact same values here: nine candles, two candles for the fast EMA, thirty candles for the slow EMA. Zero for no shift and I would like to have the values calculated based on the close prices because the close price is also the default setting here. Okay let&amp;#8217;s move on and sort the price array from the current candle downwards by using the array set as Series function for the price array we have created here. And now we want to fill it with data, that is done by using Copy Buffer for the Defined Moving Average, that&amp;#8217;s the Adaptive Moving Average Definition we have created in this line. We just need one line, that&amp;#8217;s the zero here, and we want to copy values from the current candle that&amp;#8217;s candle zero for three candles that&amp;#8217;s the three here, and we want to store the results in our price array. And now what we have done that, we want to get the value of the current candle, that&amp;#8217;s candles zero of our price array and we use the normalized double function to get six digits behind the dot and the calculated value should be stored in a variable that is called Adaptive Moving Average Value. And the last step is to create a chart output by using the comment function. It will output the text AMA value and the calculated value for the Adaptive Moving Average Value we have extracted here. Okay that&amp;#8217;s it, now please click the Compile bottom and you should get no errors and no warnings here so now you can click the button or hit the F4 key to go back to MetaTrader. And in MetaTrader you want to click on View, Strategy Tester, and in the Strategy Test panel you want to select the Simple Adaptive Moving Average.ex5 file. Select any currency pair you like and please make sure to enable the check mark for the visualisation option before you start your test. And here we go! if you move your mouse to the current value here, you’ll see that we have a value of 1.544031, that&amp;#8217;s exactly what we have calculated here. And in your Expert Advisor you would now compare the value of the adaptive moving average to the current price. And if the price is above the moving average you would buy, and if the price is below the moving average you would sell. Okay now you can create an Expert Advisor that uses the Adaptive Moving Average Indicator to find out if you want to buy or if you want to sell and you have created it in less than five minutes with a few lines of MQL5 code. The post MQL5 Tutorial &amp;#8211; Simple Adaptive Moving Average Robot appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>Okay, this time we are talking about an Adaptive Moving Average Indicator. It was created (I think) by Perry Kaufman and you can use it to find entries or exits like you could with a simple moving average. Now if that is almost the same, why should we prefer to use an Adaptive Moving Average? Well Perry J. Kaufmann created this fascinating formula here for a reason. The Adaptive Moving Average has less lagging and generates less false signals. Let&amp;#8217;s see if that is true. Now how can we create an Adaptive Moving Average Expert Advisor for Meta Trader 5? First please click on the little button here, that should bring up the MetaEditor. And here you want to select File, New, Expert Advisor from template, Continue and we will call that Simple Adaptive Moving Average. Now click on Continue, Continue, finish, and you can remove everything above the Ontick function here and I will also delete the two comment lines. So let&amp;#8217;s create an array that will hold our prices, I will call it my price array and it is a double array because double and float variables can hold floating point types. And the adaptive moving average has six digits behind the dot and now we want to use the integrated MQL5 function iAMA for the current symbol on the chart and the current period, we want to calculate our prices based on the last nine candles. The Fast Moving Average has a value of two because if you Insert, Indicators, Trend, Adaptive Moving Average, you will see the values here, these are the nine candles. The fast EMA, that&amp;#8217;s an Exponential Moving Average, is calculated for two candles and the slow EMA is calculated for thirty candles. And we do not need any shift, so we will use the exact same values here: nine candles, two candles for the fast EMA, thirty candles for the slow EMA. Zero for no shift and I would like to have the values calculated based on the close prices because the close price is also the default setting here. Okay let&amp;#8217;s move on and sort the price array from the current candle downwards by using the array set as Series function for the price array we have created here. And now we want to fill it with data, that is done by using Copy Buffer for the Defined Moving Average, that&amp;#8217;s the Adaptive Moving Average Definition we have created in this line. We just need one line, that&amp;#8217;s the zero here, and we want to copy values from the current candle that&amp;#8217;s candle zero for three candles that&amp;#8217;s the three here, and we want to store the results in our price array. And now what we have done that, we want to get the value of the current candle, that&amp;#8217;s candles zero of our price array and we use the normalized double function to get six digits behind the dot and the calculated value should be stored in a variable that is called Adaptive Moving Average Value. And the last step is to create a chart output by using the comment function. It will output the text AMA value and the calculated value for the Adaptive Moving Average Value we have extracted here. Okay that&amp;#8217;s it, now please click the Compile bottom and you should get no errors and no warnings here so now you can click the button or hit the F4 key to go back to MetaTrader. And in MetaTrader you want to click on View, Strategy Tester, and in the Strategy Test panel you want to select the Simple Adaptive Moving Average.ex5 file. Select any currency pair you like and please make sure to enable the check mark for the visualisation option before you start your test. And here we go! if you move your mouse to the current value here, you’ll see that we have a value of 1.544031, that&amp;#8217;s exactly what we have calculated here. And in your Expert Advisor you would now compare the value of the adaptive moving average to the current price. And if the price is above the moving average you would buy, and if the price is below the moving average you would sell. Okay now you can create an Expert Advisor that uses the Adaptive Moving Average Indicator to find out if you want to buy or if you want to sell and you have created it in less than five minutes with a few lines of MQL5 code. The post MQL5 Tutorial &amp;#8211; Simple Adaptive Moving Average Robot appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – Simple Force Index Trading Robot</title>
		<link>https://mql5tutorial.com/mql5-tutorial-a-simple-force-index-trading-robot/</link>
		
		
		<pubDate>Sat, 03 Feb 2024 09:36:21 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MQL5 Entry Signals]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=664</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-a-simple-force-index-trading-robot/"><img title="AlgorithmicTrading091" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Force-Index-Robot.png" alt="MQL5 Tutorial &#8211; Simple Force Index Trading Robot" width="" /></a>
	</div>
<p>	Okay this time we are talking about the Force Index Indicator. It is a very simple indicator. It’s easy to read and also easy to code. If the indicator crosses the line in the middle from below and stays above the line, that could mean that we are bullish. And when it crosses the line from above and stays below the line like in this case, we have a bearish trend and we would like to sell. According to the website www.traderhq.com, this is also an indicator that was developed by Dr Alexander Elder, the author of the book: Trading for a Living. Okay now that we know how it works how can we create an Expert Advisor to use the indicator? The first step is to click the little button over here or hit the F4 key on your keyboard. That will start the Meter Editor and we want to click on File, New, Expert Advisor from template, Continue. We will call it Simple Force Index Robot. Now click on Continue, Continue, Finish, and delete everything above the Ontick function. These two comment lines are also no longer needed, because here we want to create an array, it shall holds several prices so it&#8217;s a double array and I will call it my price array. And now it&#8217;s time to define the Force Index definition by using the iForce function that is built-in into MQL 5. It takes some parameters, the first one is the current symbol on the chart, the second one is the period you have selected on your chart. The Force Index is calculated based on the last thirteen candles. You will also see it here in this little brackets. It is using the MODE_SMA that stands for Simple Moving Average and we want to use Tick volume. If you insert the indicator by clicking on Insert indicators, Oscillators, Force Index, you will see the exact same values here: thirteen candles, simple moving average based on the tick volume. Okay, let&#8217;s use the array set as series function that will sort the price array from the current candle downwards and now we use Copy Buffer for the Force Index definition we have created here. We need one line for the indicator that&#8217;s a zero here and we want to fill our array from the current candle that&#8217;s candle zero, for three candles that&#8217;s the three and store the result in our price array. And from our price array we are now going to extract the Force Index value for the current candle zero and we will use normalize double for six digits to get the six digits behind the point. And now we want to create a chart outputs depending on the value and if our Force Index value is above zero, we want to output the comment “trending upwards” directly on our chart and in the other case if the Force Index value is below zero, we want to have the text “trending downwards” on our chart. Okay, now please click on the little Compile button here or press the F7 key on your keyboard. That should compile your Expert Advisor without any errors or warnings here. And if that was going well please click on the button here or press F4 to go back to MetaTrader. Now in MetaTrader you want to click on View, Strategy Tester or press control and R. And in the Strategy Tester you want to select the Simple Force Index Robot.ex5 file. Let’s pick a currency pair here, enable the visualisation mode and click on Start and here we go. Now the indicator is below the line so it says trending downwards and as soon as the little indicator crosses the line from below, that changes to trending upwards. Okay, now you know how to create an Expert Advisor for Meta Trader5 that is using the Force Index Indicator and you have created it yourself in five minutes with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-a-simple-force-index-trading-robot/">MQL5 Tutorial &#8211; Simple Force Index Trading Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-a-simple-force-index-trading-robot/"><img title="AlgorithmicTrading091" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Force-Index-Robot.png" alt="MQL5 Tutorial &#8211; Simple Force Index Trading Robot" width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>Okay this time we are talking about the Force Index Indicator.<br />
It is a very simple indicator. It’s easy to read and also easy to code.<br />
If the indicator crosses the line in the middle from below and stays above the line, that could mean that we are bullish.<br />
And when it crosses the line from above and stays below the line like in this case, we have a bearish trend and we would like to sell.<br />
According to the website www.traderhq.com, this is also an indicator that was developed by Dr Alexander Elder, the author of the book: Trading for a Living.<br />
Okay now that we know how it works how can we create an Expert Advisor to use the indicator?<br />
The first step is to click the little button over here or hit the F4 key on your keyboard.<br />
That will start the Meter Editor and we want to click on File, New, Expert Advisor from template, Continue.<br />
We will call it Simple Force Index Robot. Now click on Continue, Continue, Finish, and delete everything above the Ontick function.<br />
These two comment lines are also no longer needed, because here we want to create an array, it shall holds several prices so it&#8217;s a double array and I will call it my price array.<br />
And now it&#8217;s time to define the Force Index definition by using the iForce function that is built-in into MQL 5.<br />
It takes some parameters, the first one is the current symbol on the chart, the second one is the period you have selected on your chart.<br />
The Force Index is calculated based on the last thirteen candles. You will also see it here in this little brackets.<br />
It is using the MODE_SMA that stands for Simple Moving Average and we want to use Tick volume.<br />
If you insert the indicator by clicking on Insert indicators, Oscillators, Force Index, you will see the exact same values here: thirteen candles, simple moving average based on the tick volume.<br />
Okay, let&#8217;s use the array set as series function that will sort the price array from the current candle downwards and now we use Copy Buffer for the Force Index definition we have created here.<br />
We need one line for the indicator that&#8217;s a zero here and we want to fill our array from the current candle that&#8217;s candle zero, for three candles that&#8217;s the three and store the result in our price array.<br />
And from our price array we are now going to extract the Force Index value for the current candle zero and we will use normalize double for six digits to get the six digits behind the point.<br />
And now we want to create a chart outputs depending on the value and if our Force Index value is above zero, we want to output the comment “trending upwards” directly on our chart and in the other case if the Force Index value is below zero, we want to have the text “trending downwards” on our chart.<br />
Okay, now please click on the little Compile button here or press the F7 key on your keyboard.<br />
That should compile your Expert Advisor without any errors or warnings here.<br />
And if that was going well please click on the button here or press F4 to go back to MetaTrader. Now in MetaTrader you want to click on View, Strategy Tester or press control and R.<br />
And in the Strategy Tester you want to select the Simple Force Index Robot.ex5 file.<br />
Let’s pick a currency pair here, enable the visualisation mode and click on Start and here we go.<br />
Now the indicator is below the line so it says trending downwards and as soon as the little indicator crosses the line from below, that changes to trending upwards.<br />
Okay, now you know how to create an Expert Advisor for Meta Trader5 that is using the Force Index Indicator and you have created it yourself in five minutes with a few lines of MQL5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-simple-force-index-trading-robot-from-mql5-tutorial/?tmstv=1777110366" rel="nofollow" id="download-link-666" data-redirect="false" >
	Download &ldquo;MQL5 - Simple Force Index Trading Robot from MQL5 Tutorial&rdquo;	<small>SimpleForceIndexRobot.txt		&ndash; Downloaded 385 times		&ndash; 807.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-a-simple-force-index-trading-robot/">MQL5 Tutorial &#8211; Simple Force Index Trading Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="15829726" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-Tutorial-Simple-Force-Index-Robot.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>5:27</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>Okay this time we are talking about the Force Index Indicator. It is a very simple indicator. It’s easy to read and also easy to code. If the indicator crosses the line in the middle from below and stays above the line, that could mean that we are bullish. And when it crosses the line from above and stays below the line like in this case, we have a bearish trend and we would like to sell. According to the website www.traderhq.com, this is also an indicator that was developed by Dr Alexander Elder, the author of the book: Trading for a Living. Okay now that we know how it works how can we create an Expert Advisor to use the indicator? The first step is to click the little button over here or hit the F4 key on your keyboard. That will start the Meter Editor and we want to click on File, New, Expert Advisor from template, Continue. We will call it Simple Force Index Robot. Now click on Continue, Continue, Finish, and delete everything above the Ontick function. These two comment lines are also no longer needed, because here we want to create an array, it shall holds several prices so it&amp;#8217;s a double array and I will call it my price array. And now it&amp;#8217;s time to define the Force Index definition by using the iForce function that is built-in into MQL 5. It takes some parameters, the first one is the current symbol on the chart, the second one is the period you have selected on your chart. The Force Index is calculated based on the last thirteen candles. You will also see it here in this little brackets. It is using the MODE_SMA that stands for Simple Moving Average and we want to use Tick volume. If you insert the indicator by clicking on Insert indicators, Oscillators, Force Index, you will see the exact same values here: thirteen candles, simple moving average based on the tick volume. Okay, let&amp;#8217;s use the array set as series function that will sort the price array from the current candle downwards and now we use Copy Buffer for the Force Index definition we have created here. We need one line for the indicator that&amp;#8217;s a zero here and we want to fill our array from the current candle that&amp;#8217;s candle zero, for three candles that&amp;#8217;s the three and store the result in our price array. And from our price array we are now going to extract the Force Index value for the current candle zero and we will use normalize double for six digits to get the six digits behind the point. And now we want to create a chart outputs depending on the value and if our Force Index value is above zero, we want to output the comment “trending upwards” directly on our chart and in the other case if the Force Index value is below zero, we want to have the text “trending downwards” on our chart. Okay, now please click on the little Compile button here or press the F7 key on your keyboard. That should compile your Expert Advisor without any errors or warnings here. And if that was going well please click on the button here or press F4 to go back to MetaTrader. Now in MetaTrader you want to click on View, Strategy Tester or press control and R. And in the Strategy Tester you want to select the Simple Force Index Robot.ex5 file. Let’s pick a currency pair here, enable the visualisation mode and click on Start and here we go. Now the indicator is below the line so it says trending downwards and as soon as the little indicator crosses the line from below, that changes to trending upwards. Okay, now you know how to create an Expert Advisor for Meta Trader5 that is using the Force Index Indicator and you have created it yourself in five minutes with a few lines of MQL5 code. The post MQL5 Tutorial &amp;#8211; Simple Force Index Trading Robot appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>Okay this time we are talking about the Force Index Indicator. It is a very simple indicator. It’s easy to read and also easy to code. If the indicator crosses the line in the middle from below and stays above the line, that could mean that we are bullish. And when it crosses the line from above and stays below the line like in this case, we have a bearish trend and we would like to sell. According to the website www.traderhq.com, this is also an indicator that was developed by Dr Alexander Elder, the author of the book: Trading for a Living. Okay now that we know how it works how can we create an Expert Advisor to use the indicator? The first step is to click the little button over here or hit the F4 key on your keyboard. That will start the Meter Editor and we want to click on File, New, Expert Advisor from template, Continue. We will call it Simple Force Index Robot. Now click on Continue, Continue, Finish, and delete everything above the Ontick function. These two comment lines are also no longer needed, because here we want to create an array, it shall holds several prices so it&amp;#8217;s a double array and I will call it my price array. And now it&amp;#8217;s time to define the Force Index definition by using the iForce function that is built-in into MQL 5. It takes some parameters, the first one is the current symbol on the chart, the second one is the period you have selected on your chart. The Force Index is calculated based on the last thirteen candles. You will also see it here in this little brackets. It is using the MODE_SMA that stands for Simple Moving Average and we want to use Tick volume. If you insert the indicator by clicking on Insert indicators, Oscillators, Force Index, you will see the exact same values here: thirteen candles, simple moving average based on the tick volume. Okay, let&amp;#8217;s use the array set as series function that will sort the price array from the current candle downwards and now we use Copy Buffer for the Force Index definition we have created here. We need one line for the indicator that&amp;#8217;s a zero here and we want to fill our array from the current candle that&amp;#8217;s candle zero, for three candles that&amp;#8217;s the three and store the result in our price array. And from our price array we are now going to extract the Force Index value for the current candle zero and we will use normalize double for six digits to get the six digits behind the point. And now we want to create a chart outputs depending on the value and if our Force Index value is above zero, we want to output the comment “trending upwards” directly on our chart and in the other case if the Force Index value is below zero, we want to have the text “trending downwards” on our chart. Okay, now please click on the little Compile button here or press the F7 key on your keyboard. That should compile your Expert Advisor without any errors or warnings here. And if that was going well please click on the button here or press F4 to go back to MetaTrader. Now in MetaTrader you want to click on View, Strategy Tester or press control and R. And in the Strategy Tester you want to select the Simple Force Index Robot.ex5 file. Let’s pick a currency pair here, enable the visualisation mode and click on Start and here we go. Now the indicator is below the line so it says trending downwards and as soon as the little indicator crosses the line from below, that changes to trending upwards. Okay, now you know how to create an Expert Advisor for Meta Trader5 that is using the Force Index Indicator and you have created it yourself in five minutes with a few lines of MQL5 code. The post MQL5 Tutorial &amp;#8211; Simple Force Index Trading Robot appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – HOW TO PREDICT PRICE ACTION</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-how-to-predict-price-action/</link>
		
		
		<pubDate>Fri, 02 Feb 2024 17:43:49 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4281</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY &#160; In this video, we are going to talk about what to do when the price changes and how to know what the price is going to do. So let&#8217;s see what the price did in the last 24 hours. If you have seen my last video, you know that I said that it&#8217;s possible that we are running into a new trend change. And indeed, the price has crossed the two moving averages, so we have no new trades. And if we zoom into the chart, you can see that so far the uptrend is still existing as the green moving average is above the red moving average. So it might be possible that the price will go up again, or maybe it will go down. And then we need to wait until we see a crossover. That would confirm that the trend is broken. But before that happens, we will not see any new positions here, and that&#8217;s indeed hard for most traders to watch a system not doing anything. But actually, we all know what the price is going to do. It&#8217;s not very hard to understand. It can go up, it can go down, or it can go sideways. So basically, what we need to do is to make rules about how the system should behave for each of these possibilities. In my case, I have a strict rule, and that rule says that the price needs to be on the correct side of the trend. And if it is not, it will not open any new positions. The exception is in cases like this one, when we are right inside of a trading series, it would continue with this series until we have a profit and then stop to trade. If your system is not able to do that, automatically, you could also click on the button here and disallow automated trading. And if you ask yourself how these two moving averages are defined, well, the green one is for 1,000 candles and the red one is for 1,100 candles. So this is a very long-term trend. If you prefer short-time trends, you could either change the number of candles that are calculated by just changing the period setting here. Or you could pick a different time frame, like one minute. But I believe that the hourly chart is watched by most traders, and I know what my system is going to do in each of the possible cases. If the price goes down, it will wait for a crossover and then check if the minimal distance between the price and the moving averages is okay. If it goes sideways, it will do nothing until it&#8217;s either below or above the minimal range. And if the price goes up again, it will start to trade if the green moving average stays above the red moving average, and of course, if the minimal distance is reached. So these are very simple rules, easy to understand. And of course, in trading, you can make up your own rules. But now you know mine. If you are interested to hire such a system here, you can either contact me or go to my website. For now, that&#8217;s it for this video. I say thank you, and I will see you in the next one.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-how-to-predict-price-action/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; HOW TO PREDICT PRICE ACTION</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_19505"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/CflC9moPOPA?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>&nbsp;</p>
<p>In this video, we are going to talk about what to do when the price changes and how to know what the price is going to do. So let&#8217;s see what the price did in the last 24 hours. If you have seen my last video, you know that I said that it&#8217;s possible that we are running into a new trend change. And indeed, the price has crossed the two moving averages, so we have no new trades. And if we zoom into the chart, you can see that so far the uptrend is still existing as the green moving average is above the red moving average. So it might be possible that the price will go up again, or maybe it will go down. And then we need to wait until we see a crossover. That would confirm that the trend is broken. But before that happens, we will not see any new positions here, and that&#8217;s indeed hard for most traders to watch a system not doing anything. But actually, we all know what the price is going to do. It&#8217;s not very hard to understand. It can go up, it can go down, or it can go sideways. So basically, what we need to do is to make rules about how the system should behave for each of these possibilities. In my case, I have a strict rule, and that rule says that the price needs to be on the correct side of the trend. And if it is not, it will not open any new positions. The exception is in cases like this one, when we are right inside of a trading series, it would continue with this series until we have a profit and then stop to trade. If your system is not able to do that, automatically, you could also click on the button here and disallow automated trading. And if you ask yourself how these two moving averages are defined, well, the green one is for 1,000 candles and the red one is for 1,100 candles. So this is a very long-term trend. If you prefer short-time trends, you could either change the number of candles that are calculated by just changing the period setting here. Or you could pick a different time frame, like one minute. But I believe that the hourly chart is watched by most traders, and I know what my system is going to do in each of the possible cases. If the price goes down, it will wait for a crossover and then check if the minimal distance between the price and the moving averages is okay. If it goes sideways, it will do nothing until it&#8217;s either below or above the minimal range. And if the price goes up again, it will start to trade if the green moving average stays above the red moving average, and of course, if the minimal distance is reached. So these are very simple rules, easy to understand. And of course, in trading, you can make up your own rules. But now you know mine. If you are interested to hire such a system here, you can either contact me or go to my website. For now, that&#8217;s it for this video. I say thank you, and I will see you in the next one.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-how-to-predict-price-action/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; HOW TO PREDICT PRICE ACTION</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – TRADING EXPERIMENT 2024 WHAT IF THE TREND CHANGES TODAY?</title>
		<link>https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-what-if-the-trend-changes-today/</link>
		
		
		<pubDate>Tue, 30 Jan 2024 07:55:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4279</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY In this video we are talking about potential changes in a trend. You can see on this chart that the price is going down, while the main trend is shown by these two moving averages here still is going up, but when the price goes below the two moving averages, that might indicate that we see a change in the long term trend. So let&#8217;s zoom into the chart here. Today is January the 15th. I had to restart the robot trading system with a different trading account because last week I wasn&#8217;t able to change my Metaquotes demo investor password and that is what actually is required to update statistics on myfxbook.com. And I learned that FXBlue isn&#8217;t supporting Metaquotes demo accounts so I couldn&#8217;t publish my stats. The last trade today was about 2 hours ago. Currently we are $520 into the profit and now the question is how should we configure the system to deal with a potential change in the trend here? We have done a lot of trades in the last few days, but right now it looks like the price might go below the two moving averages here. And if it does, we need to have a rule for what we want to do and when we want to do it. Most discretionary traders would make an emotional decision, but we are able to measure things. For example, if you click onto the chart and press the mouse button in the middle, you can measure the distance from the current price to the upper moving average, which is 318 points right now. And it&#8217;s possible to set a rule that the system will only trade when a minimum distance between the moving average and the current price is at least 200 points. On the other hand, if we stop trading here, it might take two or three weeks until the main trend actually has changed enough so that the price would be below the two moving averages. And we see a crossover because as long as the green moving average is above the red one, this is still a valid uptrend. If we zoom into the chart as much as we can and disable the auto scroll for now, we can see that this uptrend has been valid since November 2023 and we have not seen any crossovers here. The price touched the upper moving average two times, but this time it&#8217;s very close. Currently we have no open trades, so there are two possible options. Either the price stays in a range where the system decides that the distance to the SMAs is high enough. In that case it will open further buy trades. Or if the price goes below the minimum distance or crosses the moving averages, the system will wait until the price is back in the buy area where trading is allowed or it will wait until the main trend changes to a downwards trend. And so far I am satisfied with the results. Of course we could increase the position size or the risk level, but I&#8217;m more about stability. So we will see what goes on this week. And that&#8217;s it for this video. I say thank you for watching. Oh by the way, this is the statistics site. You can click on the link below the video description and you can analyze all the details here. In my case it&#8217;s German because I&#8217;m from Germany, but it will recognize the native language on your operating system. So that&#8217;s it for now. If you would like to code your own robot trading system or if you are interested to hire this one, you can either contact me or go to my website. For now. I say thank you for watching and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-what-if-the-trend-changes-today/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 WHAT IF THE TREND CHANGES TODAY?</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_94435"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/jj_Ouapwz1M?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>In this video we are talking about potential changes in a trend. You can see on this chart that the price is going down, while the main trend is shown by these two moving averages here still is going up, but when the price goes below the two moving averages, that might indicate that we see a change in the long term trend. So let&#8217;s zoom into the chart here. Today is January the 15th. I had to restart the robot trading system with a different trading account because last week I wasn&#8217;t able to change my Metaquotes demo investor password and that is what actually is required to update statistics on myfxbook.com.</p>
<p>And I learned that FXBlue isn&#8217;t supporting Metaquotes demo accounts so I couldn&#8217;t publish my stats. The last trade today was about 2 hours ago. Currently we are $520 into the profit and now the question is how should we configure the system to deal with a potential change in the trend here? We have done a lot of trades in the last few days, but right now it looks like the price might go below the two moving averages here. And if it does, we need to have a rule for what we want to do and when we want to do it.</p>
<p>Most discretionary traders would make an emotional decision, but we are able to measure things. For example, if you click onto the chart and press the mouse button in the middle, you can measure the distance from the current price to the upper moving average, which is 318 points right now. And it&#8217;s possible to set a rule that the system will only trade when a minimum distance between the moving average and the current price is at least 200 points. On the other hand, if we stop trading here, it might take two or three weeks until the main trend actually has changed enough so that the price would be below the two moving averages. And we see a crossover because as long as the green moving average is above the red one, this is still a valid uptrend.</p>
<p>If we zoom into the chart as much as we can and disable the auto scroll for now, we can see that this uptrend has been valid since November 2023 and we have not seen any crossovers here. The price touched the upper moving average two times, but this time it&#8217;s very close. Currently we have no open trades, so there are two possible options. Either the price stays in a range where the system decides that the distance to the SMAs is high enough. In that case it will open further buy trades.</p>
<p>Or if the price goes below the minimum distance or crosses the moving averages, the system will wait until the price is back in the buy area where trading is allowed or it will wait until the main trend changes to a downwards trend. And so far I am satisfied with the results. Of course we could increase the position size or the risk level, but I&#8217;m more about stability. So we will see what goes on this week. And that&#8217;s it for this video.</p>
<p>I say thank you for watching. Oh by the way, this is the statistics site. You can click on the link below the video description and you can analyze all the details here. In my case it&#8217;s German because I&#8217;m from Germany, but it will recognize the native language on your operating system. So that&#8217;s it for now.</p>
<p>If you would like to code your own robot trading system or if you are interested to hire this one, you can either contact me or go to my website. For now. I say thank you for watching and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-what-if-the-trend-changes-today/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 WHAT IF THE TREND CHANGES TODAY?</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – TRADING EXPERIMENT 2024 – WATCH A FOREX QUAKE LIVE</title>
		<link>https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-watch-a-forex-quake-live/</link>
		
		
		<pubDate>Sun, 28 Jan 2024 07:53:55 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4277</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY From time to time, you will see that there are huge candles on the chart, and you might see days where nothing happens, and sometimes everything happens within a very short period. In this case, this is just one candle with several trades that have been executed. And this is the ICCI oscillator. And as soon as it goes below the lower line here, we might see the next trade. And this next trade can last for minutes, hours, days, or even weeks. It all depends on the price movement, which is very rapid right now. So maybe we will see a new trade within the next few minutes, or sometimes you won&#8217;t see anything happen for 50 candles in a row. And that&#8217;s where people become impatient and start to manipulate their system because when it&#8217;s boring. You want to see more trades, or otherwise, if you see a lot of trades within an hour or so, you might become fearful. Here is the next trade. It has been opened just now, and you see that the price is going up and down. Currently, we have a balance of $ 100,253. And when you click on the history tab here, you will see that within the last few minutes, we have had all these trades here. So basically from here is one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve entries. Now we have $100,253. A second trade has been opened within a few seconds. This is what I call a forex quake. And lots of people get nervous when something like this happens because we don&#8217;t see that very often. But when it happens, they try to do anything. Either they are closing trades because of fear, or they open new trades because of greed. And that&#8217;s when you can see price movements of a few hundred dollars within a few minutes. So if we If we zoom into this chart, we can see these two lines here. These are moving averages, so currently we are in a slight uptrend, and I guess that we will see a continuous uptrend for the next few days. But in situations like this, you never know. So it&#8217;s always a good idea to start with a small risk setting. In my case, I have an account of $100,000, so $240 Open loss is nothing that is frightening for me. But if this was an account with $1,000 equity, things would be much different. And you can see the equity is below $100,000 now. The free margin is even below that level. So I&#8217;m curious to see what is the outcome of this movement here. I think it&#8217;s a good idea to trade a demo account like like we do here because most people will see things like this happen on their real account, and that can cause panic. Most traders lose all their money within the first six months, so it would probably be a good idea to invest at least three months to trade on a demo account. I have used demo accounts and real accounts for over a decade now, and all this real data is really valuable because the the more real data you have, the more real experience you can gain, and it doesn&#8217;t matter if you get it from a demo account or from a real account. Okay, that&#8217;s it for this video. I say thank you for watching, and I will see you in the next one.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-watch-a-forex-quake-live/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 &#8211; WATCH A FOREX QUAKE LIVE</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_73874"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/G-yuRxb8DqU?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p><strong>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>From time to time, you will see that there are huge candles on the chart, and you might see days where nothing happens, and sometimes everything happens within a very short period. In this case, this is just one candle with several trades that have been executed. And this is the ICCI oscillator. And as soon as it goes below the lower line here, we might see the next trade. And this next trade can last for minutes, hours, days, or even weeks. It all depends on the price movement, which is very rapid right now. So maybe we will see a new trade within the next few minutes, or sometimes you won&#8217;t see anything happen for 50 candles in a row. And that&#8217;s where people become impatient and start to manipulate their system because when it&#8217;s boring. You want to see more trades, or otherwise, if you see a lot of trades within an hour or so, you might become fearful. Here is the next trade. It has been opened just now, and you see that the price is going up and down. Currently, we have a balance of $ 100,253. And when you click on the history tab here, you will see that within the last few minutes, we have had all these trades here.</p>
<p>So basically from here is one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve entries. Now we have $100,253. A second trade has been opened within a few seconds. This is what I call a forex quake. And lots of people get nervous when something like this happens because we don&#8217;t see that very often. But when it happens, they try to do anything. Either they are closing trades because of fear, or they open new trades because of greed. And that&#8217;s when you can see price movements of a few hundred dollars within a few minutes. So if we If we zoom into this chart, we can see these two lines here. These are moving averages, so currently we are in a slight uptrend, and I guess that we will see a continuous uptrend for the next few days. But in situations like this, you never know. So it&#8217;s always a good idea to start with a small risk setting. In my case, I have an account of $100,000, so $240 Open loss is nothing that is frightening for me. But if this was an account with $1,000 equity, things would be much different. And you can see the equity is below $100,000 now.</p>
<p>The free margin is even below that level. So I&#8217;m curious to see what is the outcome of this movement here. I think it&#8217;s a good idea to trade a demo account like like we do here because most people will see things like this happen on their real account, and that can cause panic. Most traders lose all their money within the first six months, so it would probably be a good idea to invest at least three months to trade on a demo account. I have used demo accounts and real accounts for over a decade now, and all this real data is really valuable because the the more real data you have, the more real experience you can gain, and it doesn&#8217;t matter if you get it from a demo account or from a real account. Okay, that&#8217;s it for this video. I say thank you for watching, and I will see you in the next one.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-watch-a-forex-quake-live/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 &#8211; WATCH A FOREX QUAKE LIVE</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – TRADING EXPERIMENT 2024 – HOW TO ANALYZE YOUR RESULTS</title>
		<link>https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-how-to-analyze-your-results/</link>
		
		
		<pubDate>Fri, 26 Jan 2024 07:52:02 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4275</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY &#160; In the last video, we have talked about how to enable advanced statistics on FXblue. This is a free web service where you can connect your account and also see the details for other accounts. In my case, this is the account that is used for the trading experiment that we are doing in 2024. We have some statistics here. Currently, we have a closed profit of $157. The last update is from five minutes ago. Here are some more details like the total return, the monthly return, and some calculated stuff. But basically, the more interesting part is: you have some averages and some details about the currency pairs that you are using. Right now, we are only using the Euro-US dollar chart, but you could add different charts for different currency pairs and see all the results here. I have other accounts where I trade up to 22 charts at the same time, and that has some advantages and some disadvantages. A good thing is that when we see the Euro-US dollar drop and when we run into a drawdown, we could hedge that with a different currency pair, and that might lead to more stability. The bad thing is that the more currency pairs you have, the less number of positions you can have for each currency pair because your broker has a limit to the max number of positions that you are allowed to open. So it might be a better idea to trade one currency pair for each trading server in your server farm, but that is more advanced stuff. When you click on orders here, you can see that we currently have no open orders. On the main page, you can pick one of the reports that they offer. Here we have Floating Profit and Loss or the Equity Report. You can see the equity is also up to $157, so no open losses. Stuff like daily profit, weekly or monthly profit will be calculated here. If you scroll down, you will see the risk. Currently, the risk of ruin is zero because we have no open losses. The system has been online for nine days, but actually, I started to use it this week because the MetaQuotes demo account was not supported for the advanced statistics. And FXblue has a list of brokers here, but MetaQuotes is not included for any reason, so I switched to a Robo Forex account. Anyhow, these statistics here will become very important for you in a few weeks. And if you prefer, here is an option to also download this as a comma-separated file that you can analyze with Excel or any other spreadsheet application. So that&#8217;s it for now. I say thank you for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-how-to-analyze-your-results/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 &#8211; HOW TO ANALYZE YOUR RESULTS</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_47447"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/-UF4nYCsc_Q?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>&nbsp;</p>
<p>In the last video, we have talked about how to enable advanced statistics on FXblue. This is a free web service where you can connect your account and also see the details for other accounts. In my case, this is the account that is used for the trading experiment that we are doing in 2024. We have some statistics here. Currently, we have a closed profit of $157. The last update is from five minutes ago. Here are some more details like the total return, the monthly return, and some calculated stuff. But basically, the more interesting part is: you have some averages and some details about the currency pairs that you are using. Right now, we are only using the Euro-US dollar chart, but you could add different charts for different currency pairs and see all the results here. I have other accounts where I trade up to 22 charts at the same time, and that has some advantages and some disadvantages. A good thing is that when we see the Euro-US dollar drop and when we run into a drawdown, we could hedge that with a different currency pair, and that might lead to more stability. The bad thing is that the more currency pairs you have, the less number of positions you can have for each currency pair because your broker has a limit to the max number of positions that you are allowed to open.</p>
<p>So it might be a better idea to trade one currency pair for each trading server in your server farm, but that is more advanced stuff. When you click on orders here, you can see that we currently have no open orders. On the main page, you can pick one of the reports that they offer. Here we have Floating Profit and Loss or the Equity Report. You can see the equity is also up to $157, so no open losses. Stuff like daily profit, weekly or monthly profit will be calculated here. If you scroll down, you will see the risk. Currently, the risk of ruin is zero because we have no open losses. The system has been online for nine days, but actually, I started to use it this week because the MetaQuotes demo account was not supported for the advanced statistics. And FXblue has a list of brokers here, but MetaQuotes is not included for any reason, so I switched to a Robo Forex account. Anyhow, these statistics here will become very important for you in a few weeks. And if you prefer, here is an option to also download this as a comma-separated file that you can analyze with Excel or any other spreadsheet application.</p>
<p>So that&#8217;s it for now. I say thank you for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-trading-experiment-2024-how-to-analyze-your-results/">MQL5 TUTORIAL &#8211; TRADING EXPERIMENT 2024 &#8211; HOW TO ANALYZE YOUR RESULTS</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – LIVE UPDATES AND A LIVE PROFIT DOCUMENTED</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-live-updates-and-a-live-profit-documented-2/</link>
		
		
		<pubDate>Wed, 24 Jan 2024 07:49:33 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4273</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY In this video, I want to talk about how I got my advanced statistics to run. Actually, I had to change the account to Robo Forex and use a demo account there because what I didn&#8217;t know was that FXblue is not able to provide statistics for MetaQuotes demo accounts because they simply do not have the MetaQuotes company in their list. So when you pick a broker, you need to pick one that&#8217;s in their list, and MetaQuotes is not part of that. Yes, I could write to the support to add MetaQuotes, but I guess for this experiment, it&#8217;s more useful to use an account that actually is included. And for Robo Forex, they support demo accounts. I have to admit that advanced statistics for Robo Forex have been a pretty standard for me and my clients in the last few years. If you don&#8217;t know, I&#8217;m offering a premium course about MQL5 programming, and that is also where a lot of people use the same Robo Forex account settings that I use. So I actually didn&#8217;t know that MetaQuotes wasn&#8217;t in the brokers list. And I switched to this account, and that means that we had to start over with $100,000. So right now, we have made a profit of $71, and I guess in the next hour or so, we will make a few more trades. But the crazy thing is, I actually tried to use this account sync option. They say that it works for MetaTrader 4 and MetaTrader 5, but it wasn&#8217;t running on Linux and it wasn&#8217;t performing. So I thought, okay, I need to download this publisher app here, and I did. So the version I picked was this one for MetaTrader 5. You can download it for free and you will get a zip file. And when you open that zip file with Linux, you will find there is a publisher ex5 file inside. I had to extract that. Now, let&#8217;s go back to the trading terminal and click on File, Open Data folder, MQL5 experts. And here is that FX Blue publisher ex5 file. I then opened a new chart, and here is the ExpertAdvisor that you can drag onto the chart. I&#8217;m not going to replace it right now because it&#8217;s already working. You can see that the last synchronization was today at about 20 minutes past 5. Let&#8217;s open the FX Blue statement. This is the correct account number. It says that we have a history of eight days, which is true because the account is eight days old, but I started to use it yesterday. I can now refresh the state, and it says we have an open loss of $23 and a profit of $71. So let&#8217;s go back to MetaTrader and check. Yes, that&#8217;s about what is happening right now. And you can see that we have a profit here. So I expect my system to close both trades in the next few minutes because it&#8217;s configured in a way that when a new candle appears on the chart and the profit is higher than what I have defined, it should close both trades and lock in the account-based profit. This is the current candle. Currently, I&#8217;m using the hourly candles, so let&#8217;s switch to one minute. And I think that it will only take a few seconds until we see that this trade is closed, at least until the profit value drops. But with the lot size of 0.86 lots, it&#8217;s just a question of a few seconds before the profit value is reached again. Here is the new candle, but the profit is below $10, so let&#8217;s wait for the next one. And here we are. We have closed closed the trade. Now, let&#8217;s go back to the hourly chart. It already opened a new one. Now, the balance is $100,101. The history has changed. And when we go back to the stats here, we still see $71 of profit. But when we refresh the page, here is the new state, and this matches the account data. And as soon as this trade is going to be in the profit range, we will see another update. Currently, I&#8217;m experimenting with the take profit value here. I can change that in the source code as I do for my clients. Now you know how to activate the FX Blue publisher file, do automated status updates for FX Blue. So that&#8217;s it for today&#8217;s video. I say thank you for watching, and I will see you in the next one..</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-live-updates-and-a-live-profit-documented-2/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; LIVE UPDATES AND A LIVE PROFIT DOCUMENTED</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_48808"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/BCnttK7d4HI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>In this video, I want to talk about how I got my advanced statistics to run. Actually, I had to change the account to Robo Forex and use a demo account there because what I didn&#8217;t know was that FXblue is not able to provide statistics for MetaQuotes demo accounts because they simply do not have the MetaQuotes company in their list. So when you pick a broker, you need to pick one that&#8217;s in their list, and MetaQuotes is not part of that. Yes, I could write to the support to add MetaQuotes, but I guess for this experiment, it&#8217;s more useful to use an account that actually is included. And for Robo Forex, they support demo accounts. I have to admit that advanced statistics for Robo Forex have been a pretty standard for me and my clients in the last few years. If you don&#8217;t know, I&#8217;m offering a premium course about MQL5 programming, and that is also where a lot of people use the same Robo Forex account settings that I use. So I actually didn&#8217;t know that MetaQuotes wasn&#8217;t in the brokers list. And I switched to this account, and that means that we had to start over with $100,000.</p>
<p>So right now, we have made a profit of $71, and I guess in the next hour or so, we will make a few more trades. But the crazy thing is, I actually tried to use this account sync option. They say that it works for MetaTrader 4 and MetaTrader 5, but it wasn&#8217;t running on Linux and it wasn&#8217;t performing. So I thought, okay, I need to download this publisher app here, and I did. So the version I picked was this one for MetaTrader 5. You can download it for free and you will get a zip file. And when you open that zip file with Linux, you will find there is a publisher ex5 file inside. I had to extract that. Now, let&#8217;s go back to the trading terminal and click on File, Open Data folder, MQL5 experts. And here is that FX Blue publisher ex5 file. I then opened a new chart, and here is the ExpertAdvisor that you can drag onto the chart. I&#8217;m not going to replace it right now because it&#8217;s already working. You can see that the last synchronization was today at about 20 minutes past 5. Let&#8217;s open the FX Blue statement.</p>
<p>This is the correct account number. It says that we have a history of eight days, which is true because the account is eight days old, but I started to use it yesterday. I can now refresh the state, and it says we have an open loss of $23 and a profit of $71. So let&#8217;s go back to MetaTrader and check. Yes, that&#8217;s about what is happening right now. And you can see that we have a profit here. So I expect my system to close both trades in the next few minutes because it&#8217;s configured in a way that when a new candle appears on the chart and the profit is higher than what I have defined, it should close both trades and lock in the account-based profit. This is the current candle. Currently, I&#8217;m using the hourly candles, so let&#8217;s switch to one minute. And I think that it will only take a few seconds until we see that this trade is closed, at least until the profit value drops. But with the lot size of 0.86 lots, it&#8217;s just a question of a few seconds before the profit value is reached again.</p>
<p>Here is the new candle, but the profit is below $10, so let&#8217;s wait for the next one. And here we are. We have closed closed the trade. Now, let&#8217;s go back to the hourly chart. It already opened a new one. Now, the balance is $100,101. The history has changed. And when we go back to the stats here, we still see $71 of profit. But when we refresh the page, here is the new state, and this matches the account data. And as soon as this trade is going to be in the profit range, we will see another update. Currently, I&#8217;m experimenting with the take profit value here. I can change that in the source code as I do for my clients. Now you know how to activate the FX Blue publisher file, do automated status updates for FX Blue. So that&#8217;s it for today&#8217;s video. I say thank you for watching, and I will see you in the next one..</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-live-updates-and-a-live-profit-documented-2/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; LIVE UPDATES AND A LIVE PROFIT DOCUMENTED</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – METATRADER5 ON LINUX IN 3 MINUTES</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-metatrader5-on-linux-in-3-minutes/</link>
		
		
		<pubDate>Mon, 22 Jan 2024 07:47:04 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4271</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY In the last video, we have done a fresh install of MX Linux, and now we want to use it for MetaTrader, so we have to install a few things. First, we want to do an update. You can do that in the terminal or otherwise, there is also some graphical interface to do that, and that one will come up automatically. But for now, I will do it in the terminal. Yes, I want to continue, and that It might take a while. I need to install winbind. I need to install wine. Now, let&#8217;s try winecfg, and we see the little pop up here. Basically, it works. Now, let&#8217;s install wine tricks. And with wine tricks winhttp, we can download the Windows 2K Service Pack 4, which also is required. Now, let&#8217;s go to the MetaTrader 5 website. We want to download for Linux, which basically will show you a graphical installation description, but no download. But when we click on Download for Windows, we will get the exe file here. This one is located in the downloads folder. I like to use Play on Linux. You can find that in the MX package installer and install it here, with the recommended packages, like I do now. Which is a graphical front-end for what we did in the terminal. Or you could do it in the terminal with this command. And now it says it&#8217;s already installed. So let&#8217;s open the Play on Linux installation here. I pick install, something that is not listed here. Continue, continue. Manual installation. I want to create a new virtual drive. Let&#8217;s continue. Call the drive MT5. Continue. I want to configure wine. Click on continue. This is a 64 bit installation. Now it&#8217;s creating a virtual drive on my virtual server. In the past, I had to replace the version for winhttp. Now let&#8217;s say, okay. Pick the installation file for MetaTrader, which is MT5 setup. Continue. And here is the installation wizard. Let&#8217;s see if it works. This looks good. We see a progress bar. And once this is finished, there will probably be a fresh MetaTrader 5 installation that comes up on our new virtual private server with MX Linux. Yes, here we are. Actually, it now comes with a fresh account that has been enabled without doing anything. And in this little video, you have learned how to actually install MetaTrader on a Linux PC. I say thank you for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-metatrader5-on-linux-in-3-minutes/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; METATRADER5 ON LINUX IN 3 MINUTES</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_73834"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/DTkOQKW3HT4?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>In the last video, we have done a fresh install of MX Linux, and now we want to use it for MetaTrader, so we have to install a few things. First, we want to do an update. You can do that in the terminal or otherwise, there is also some graphical interface to do that, and that one will come up automatically. But for now, I will do it in the terminal. Yes, I want to continue, and that It might take a while.</p>
<p>I need to install winbind. I need to install wine. Now, let&#8217;s try winecfg, and we see the little pop up here. Basically, it works. Now, let&#8217;s install wine tricks. And with wine tricks winhttp, we can download the Windows 2K Service Pack 4, which also is required. Now, let&#8217;s go to the MetaTrader 5 website. We want to download for Linux, which basically will show you a graphical installation description, but no download. But when we click on Download for Windows, we will get the exe file here. This one is located in the downloads folder. I like to use Play on Linux. You can find that in the MX package installer and install it here, with the recommended packages, like I do now. Which is a graphical front-end for what we did in the terminal.</p>
<p>Or you could do it in the terminal with this command. And now it says it&#8217;s already installed. So let&#8217;s open the Play on Linux installation here. I pick install, something that is not listed here. Continue, continue. Manual installation. I want to create a new virtual drive. Let&#8217;s continue. Call the drive MT5. Continue. I want to configure wine. Click on continue. This is a 64 bit installation. Now it&#8217;s creating a virtual drive on my virtual server.</p>
<p>In the past, I had to replace the version for winhttp. Now let&#8217;s say, okay. Pick the installation file for MetaTrader, which is MT5 setup. Continue. And here is the installation wizard. Let&#8217;s see if it works. This looks good. We see a progress bar. And once this is finished, there will probably be a fresh MetaTrader 5 installation that comes up on our new virtual private server with MX Linux. Yes, here we are. Actually, it now comes with a fresh account that has been enabled without doing anything. And in this little video, you have learned how to actually install MetaTrader on a Linux PC.</p>
<p>I say thank you for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-metatrader5-on-linux-in-3-minutes/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; METATRADER5 ON LINUX IN 3 MINUTES</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – SETUP ADVANCED STATISTICS</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-advanced-statistics/</link>
		
		
		<pubDate>Sat, 20 Jan 2024 07:44:19 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4269</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY Okay, after I found out that it&#8217;s actually not possible to get advanced statistics for a MetaQuote demo account because MyFXBook only releases that for private use and FXblue doesn&#8217;t support MetaQuotes accounts, I have now decided to restart the whole thing and go with my Robo Forex Pro demo account that I have created. So now I can show you how to set up your statistics on FXBlue. At least I hope so. So let&#8217;s go to that website. And when you are on the main site, you need to click on Analyze your Trading Account. Then you can scroll down and add something. There is an account sync option which will require an investor password. And there is a publisher EA option which is good for Windows but doesn&#8217;t work well on Linux PCs. So let&#8217;s try, register an MT5 account. I will pick Robo Forex. There are several options. I hope this one is the right one as it matches the server name. The account number is 68147770. So one 7 is missing here. Let&#8217;s input the investor password. By the way, you can find that one in the read me file. I will add it today and you can use the account number and the server credentials to log in to my account and see what is going on. And of course, I need to provide an email address. I think this is all. So let&#8217;s click on Register. I will save that. And here is my report URL. And now it says that the account sync option is only available for MetaTrader 4. I usually could download a publishing app , but it says we have a server problem here. Today is Saturday, so we don&#8217;t see any incoming ticks, and therefore, I&#8217;m not sure if the account sync option will also work with MetaTrader 5. We will see on Monday. On this site, it says that account sync should work for MT4 and MT5. As I had to change the account, basically, this is a fresh start on Monday. So that&#8217;s it for now. We have set up a new account. We have set up FX Blue statistics, and I guess on Monday morning, we will be smarter. So that&#8217;s it for this video. I say thank you for watching, and I will see you in the next one.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-advanced-statistics/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SETUP ADVANCED STATISTICS</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_57530"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/EAB2pS510Vo?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>Okay, after I found out that it&#8217;s actually not possible to get advanced statistics for a MetaQuote demo account because MyFXBook only releases that for private use and FXblue doesn&#8217;t support MetaQuotes accounts, I have now decided to restart the whole thing and go with my Robo Forex Pro demo account that I have created. So now I can show you how to set up your statistics on FXBlue. At least I hope so.</p>
<p>So let&#8217;s go to that website. And when you are on the main site, you need to click on Analyze your Trading Account. Then you can scroll down and add something. There is an account sync option which will require an investor password. And there is a publisher EA option which is good for Windows but doesn&#8217;t work well on Linux PCs. So let&#8217;s try, register an MT5 account. I will pick Robo Forex. There are several options.</p>
<p>I hope this one is the right one as it matches the server name. The account number is 68147770. So one 7 is missing here. Let&#8217;s input the investor password. By the way, you can find that one in the read me file. I will add it today and you can use the account number and the server credentials to log in to my account and see what is going on. And of course, I need to provide an email address. I think this is all. So let&#8217;s click on Register.</p>
<p>I will save that. And here is my report URL. And now it says that the account sync option is only available for MetaTrader 4. I usually could download a publishing app , but it says we have a server problem here. Today is Saturday, so we don&#8217;t see any incoming ticks, and therefore, I&#8217;m not sure if the account sync option will also work with MetaTrader 5. We will see on Monday. On this site, it says that account sync should work for MT4 and MT5. As I had to change the account, basically, this is a fresh start on Monday. So that&#8217;s it for now. We have set up a new account. We have set up FX Blue statistics, and I guess on Monday morning, we will be smarter. So that&#8217;s it for this video. I say thank you for watching, and I will see you in the next one.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-advanced-statistics/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SETUP ADVANCED STATISTICS</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – SETUP A LINUX SERVER IN 5 MINUTES</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-a-linux-server-in-5-minutes/</link>
		
		
		<pubDate>Thu, 18 Jan 2024 07:41:31 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4267</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY &#160; Okay, I&#8217;m going to reinstall one of my virtual private servers. This one will be the one where we will run our system online. Usually, I do it locally, but most people don&#8217;t want to run a computer 24/7. In the past, I have used netbooks and PC sticks. That&#8217;s basically a complete computer in a USB stick. But for this installation, we are going to use a custom image on a virtual private server that costs about $4 or $5 a month. So let&#8217;s select Custom Image. I have to provide an URL here. This is the MX Linux version with AHS, which means advanced hardware support. Mx Linux is the most popular Linux distribution. You can check that out on Distrowatch.com. Let&#8217;s copy that. It&#8217;s a Linux system. For the version and the description, I will use the same. Now, I can select Upload. Now it says downloading and that the image cannot be used right now, so it will take a few more minutes. I actually prefer to use Linux because Windows has some disadvantages when it comes to trading. One of those disadvantages is that Windows decides to install updates and then the whole system will shut down and reboot, and that will not happen with a Linux system. You can install updates whenever you want, and you can do it while the system is running, so no restart is required. Another advantage of Linux is that it is possible to do a backup for the whole system and install that on completely different hardware. You can basically take your Linux system with you or clone your server several times, which is a good thing to do if you want to scale up your trading system to a trading server farm. Okay, now the download message is gone and we can use this image to install our server. Let&#8217;s click on Install. Here we have a warning that everything on the server will be deleted. So let&#8217;s click on Install, and it says that the restart process was executed. It can take up to five minutes until my server will be reachable. Here is my installation screen. So let&#8217;s click on Enter. Now it&#8217;s booting the Linux image. This one looks okay, and we start the installer. In my case, I&#8217;m going to change the keyboard settings to German because I&#8217;m from Germany. Let&#8217;s move that to the top and click on apply. The next step is to select a disk layout. I will overwrite the whole one. That takes only a few seconds. This one will be the crowdcompany5 server. The rest is the default. I want to change the location to Germany, Europe. The time zone is Berlin. Let&#8217;s continue. Now we need to provide a username and a password for the user and the root password. I like autologin, and I want to save the live desktop changes. Now let&#8217;s click on next. In a few seconds, we should see that the installation progress is finished. Now it&#8217;s installing grub, and that&#8217;s it. When I click on Finish, it&#8217;s going to automatically reboot the system. That&#8217;s it for the MX Linux installation part on a virtual private server. You can find the link to the solution that I&#8217;m using in the read me description. So make sure that you check out the descriptions below the video. For now, I say thank you for watching, and I will see you in the next video.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-a-linux-server-in-5-minutes/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SETUP A LINUX SERVER IN 5 MINUTES</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_48342"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/JVZoYn2w6Yw?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>&nbsp;</p>
<p>Okay, I&#8217;m going to reinstall one of my virtual private servers. This one will be the one where we will run our system online. Usually, I do it locally, but most people don&#8217;t want to run a computer 24/7. In the past, I have used netbooks and PC sticks. That&#8217;s basically a complete computer in a USB stick. But for this installation, we are going to use a custom image on a virtual private server that costs about $4 or $5 a month. So let&#8217;s select Custom Image. I have to provide an URL here. This is the MX Linux version with AHS, which means advanced hardware support. Mx Linux is the most popular Linux distribution. You can check that out on Distrowatch.com. Let&#8217;s copy that. It&#8217;s a Linux system. For the version and the description, I will use the same. Now, I can select Upload. Now it says downloading and that the image cannot be used right now, so it will take a few more minutes. I actually prefer to use Linux because Windows has some disadvantages when it comes to trading. One of those disadvantages is that Windows decides to install updates and then the whole system will shut down and reboot, and that will not happen with a Linux system.</p>
<p>You can install updates whenever you want, and you can do it while the system is running, so no restart is required. Another advantage of Linux is that it is possible to do a backup for the whole system and install that on completely different hardware. You can basically take your Linux system with you or clone your server several times, which is a good thing to do if you want to scale up your trading system to a trading server farm. Okay, now the download message is gone and we can use this image to install our server. Let&#8217;s click on Install. Here we have a warning that everything on the server will be deleted. So let&#8217;s click on Install, and it says that the restart process was executed. It can take up to five minutes until my server will be reachable. Here is my installation screen. So let&#8217;s click on Enter. Now it&#8217;s booting the Linux image. This one looks okay, and we start the installer. In my case, I&#8217;m going to change the keyboard settings to German because I&#8217;m from Germany. Let&#8217;s move that to the top and click on apply. The next step is to select a disk layout.</p>
<p>I will overwrite the whole one. That takes only a few seconds. This one will be the crowdcompany5 server. The rest is the default. I want to change the location to Germany, Europe. The time zone is Berlin. Let&#8217;s continue. Now we need to provide a username and a password for the user and the root password. I like autologin, and I want to save the live desktop changes. Now let&#8217;s click on next. In a few seconds, we should see that the installation progress is finished. Now it&#8217;s installing grub, and that&#8217;s it. When I click on Finish, it&#8217;s going to automatically reboot the system. That&#8217;s it for the MX Linux installation part on a virtual private server. You can find the link to the solution that I&#8217;m using in the read me description. So make sure that you check out the descriptions below the video. For now, I say thank you for watching, and I will see you in the next video.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-setup-a-linux-server-in-5-minutes/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SETUP A LINUX SERVER IN 5 MINUTES</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – WEEKLY RESULT AND A STATISTICS PROBLEM</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-weekly-result-and-a-statistics-problem/</link>
		
		
		<pubDate>Tue, 16 Jan 2024 07:39:18 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4263</guid>

					<description><![CDATA[<p>&#160; README Documentation (updated often): https://bit.ly/41FPceY &#160; Okay, today is January the fifth, and our system has traded a few more positions here. Currently, we have $291 of profit, and most of you will know that this is about all of the details that MetaTrader provides in the history and in the Trade tab. But there is a way to get much more detailed information, and I would like to set up an online account that is able to give us more data. Formerly, I was using MyFXBook, but I think FXblue is better. As I have seen, some of my accounts on MyFXBook have not been updated correctly. The setup is a little bit weird. First, we need to go to the site. Then we need to go to Analyze your Trading Account. Here is a login, and I already have login details, but for each account, we need to provide different details, and we need to click on the register button here. Now it&#8217;s asking for the broker, and it looks like they don&#8217;t support MetaQuotes, which is actually very weird as MetaQuotes is the company who invented MetaTrader. So that&#8217;s the next problem. Let&#8217;s click on my Broker Server is not listed. And now they suggest I should contact them and ask them to list the broker for me. But I guess that will not be fast enough. So I guess I will have to switch again and use this account here. It wasn&#8217;t recognized as a demo account before, and there&#8217;s a reason for this. So let&#8217;s see what goes on behind the scenes. This is the Metaeditor which we use to create MQL five expert advisors, or as you might call it, algorithmic trading systems. This is the one that I use. This is the source code, which is used by the system. Here you can see stuff like account info double, or in my case, I will use the documentation online. Here is something that is called account trade mode demo. This is used to identify my demo accounts, but not all brokers are able to provide the correct value. So what I have to do is I need to now add my Robo Forex account as a licensed account, which is also what I do for my paying customers and clients, but I can&#8217;t do that in a source code because I&#8217;m using a compiled library here, which also contains the logic for the account licenses. So I will have to do that manually once this video is finished. So for now, we made $291 on this MetaQuotes account, but I think I will have to change to the Robo Forex account on Monday, or I have to publish the MetaQuotes demo account on MyFXbook. Today is Friday, so I think with a few hours to go, this will be about the weekly result. For now, that&#8217;s it. I say thank you for watching, and I will see you in the next video..</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-weekly-result-and-a-statistics-problem/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; WEEKLY RESULT AND A STATISTICS PROBLEM</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_72299"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/eGIZtNCbtwA?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>README Documentation (updated often): <a href="https://bit.ly/41FPceY">
<p>&nbsp;</p>
<p>Okay, today is January the fifth, and our system has traded a few more positions here. Currently, we have $291 of profit, and most of you will know that this is about all of the details that MetaTrader provides in the history and in the Trade tab. But there is a way to get much more detailed information, and I would like to set up an online account that is able to give us more data. Formerly, I was using MyFXBook, but I think FXblue is better. As I have seen, some of my accounts on MyFXBook have not been updated correctly.</p>
<p>The setup is a little bit weird. First, we need to go to the site. Then we need to go to Analyze your Trading Account. Here is a login, and I already have login details, but for each account, we need to provide different details, and we need to click on the register button here. Now it&#8217;s asking for the broker, and it looks like they don&#8217;t support MetaQuotes, which is actually very weird as MetaQuotes is the company who invented MetaTrader. So that&#8217;s the next problem. Let&#8217;s click on my Broker Server is not listed.</p>
<p>And now they suggest I should contact them and ask them to list the broker for me. But I guess that will not be fast enough. So I guess I will have to switch again and use this account here. It wasn&#8217;t recognized as a demo account before, and there&#8217;s a reason for this. So let&#8217;s see what goes on behind the scenes. This is the Metaeditor which we use to create MQL five expert advisors, or as you might call it, algorithmic trading systems. This is the one that I use. This is the source code, which is used by the system.</p>
<p>Here you can see stuff like account info double, or in my case, I will use the documentation online. Here is something that is called account trade mode demo. This is used to identify my demo accounts, but not all brokers are able to provide the correct value. So what I have to do is I need to now add my Robo Forex account as a licensed account, which is also what I do for my paying customers and clients, but I can&#8217;t do that in a source code because I&#8217;m using a compiled library here, which also contains the logic for the account licenses. So I will have to do that manually once this video is finished. So for now, we made $291 on this MetaQuotes account, but I think I will have to change to the Robo Forex account on Monday, or I have to publish the MetaQuotes demo account on MyFXbook. Today is Friday, so I think with a few hours to go, this will be about the weekly result. For now, that&#8217;s it. I say thank you for watching, and I will see you in the next video..</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-weekly-result-and-a-statistics-problem/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; WEEKLY RESULT AND A STATISTICS PROBLEM</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator></item>
		<item>
		<title>MQL5 TUTORIAL – SIMPLE CUSTOM TIME FUNCTION</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-custom-time-function/</link>
		
		
		<pubDate>Sun, 14 Jan 2024 13:30:14 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=1266</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-custom-time-function/"><img title="AlgorithmicTrading088" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-CUSTOM-TIME-FUNCTION.png" alt="MQL5 TUTORIAL &#8211; SIMPLE CUSTOM TIME FUNCTION" width="" /></a>
	</div>
<p>	In this video we are going to talk about a simple custom time function that we have created in MQL5. You see the output here on the chart, we have the date and we have the time including the seconds that is the local time that has been traded right here in the Strategy Tester and now we are going to find out how we can do a custom time function that is going to return the time and this readable format and 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 (template)” from template, “Continue”, I will call this file: “SimpleCustomTimeFunction”, click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function and the two comment lines here. Okay, that&#8217;s it. First we need to create a string variable for our custom time that will be called: “myTime” and it&#8217;s of the type string, so it can contain text and to calculate it we just want to call a custom function called: “GetTime” to calculate the time, so the value of “myTime” will be calculated in the function “GetTime” and when we click on the “Compile” button right now we will see that the “GetTime” function is not defined, so that&#8217;s what we are going to do now. To create a custom function you can use a return type, in our case we will use the string return type, because we are going to deliver the time as text. The name of the function is: “GetTime” as we are calling it here and we don&#8217;t have any parameters so let&#8217;s add two brackets here, we use a local string that will be called: time with seconds (TimeWithSeconds). Now we create a string for the time with seconds (TimeWithSeconds) that&#8217;s also a string type variable and the name will be: “TimeWithSeconds”. Here comes the interesting part; we calculate the time with seconds (TimeWithSeconds) for the local time and that is done by using “TIME_LOCAL”. If you mark “TIME_LOCAL” and press the F1 key you will see that it returns the local time of a computer where the client terminal is running, but it&#8217;s a datetime variable so we use “TimeToStr” to change it to a text and the function: “TimeToStr” (time to string) is converting a value containing time in seconds since the 1st of January in 1970 into a string in this format. We use “TIME_DATE” that will give us the year, the month and the day – that&#8217;s the first part here, this is the pipe sign, it separates the first from the second parameter, the second parameter is “TIME_SECONDS” and that will deliver us the local time including the seconds. Okay. In the last step we want to return the calculated time to the main function by using the “return” function for “TimeWithSeconds” so it will return the calculated value here and assign it to “myTime” and to see it on the chart we use the “Comment” function to create a chart output for the time and when you are done you can click on the “Compile” button here, that should work without any errors now and if that is the case you can click on the little button here to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R and now you should see the Strategy Tester here, please select the “SimpleCustomTimeFunction.ex5”, mark the visualization option here and start your test. We have the date and the time directly on the Forex Chart and now you know how to create an Expert Advisor to calculate the formatted time output on your chart and you have done it with a few lines of MQL5 code.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-custom-time-function/">MQL5 TUTORIAL &#8211; SIMPLE CUSTOM TIME FUNCTION</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-custom-time-function/"><img title="AlgorithmicTrading088" src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5-TUTORIAL-SIMPLE-CUSTOM-TIME-FUNCTION.png" alt="MQL5 TUTORIAL &#8211; SIMPLE CUSTOM TIME FUNCTION" width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>In this video we are going to talk about a simple custom time function that we have created in MQL5.<br />
You see the output here on the chart, we have the date and we have the time including the seconds that is the local time that has been traded right here in the Strategy Tester and now we are going to find out how we can do a custom time function that is going to return the time and this readable format and to do that please click on the little button here or press F4 on your keyboard.<br />
Now you should see the Metaeditor and here you want to click on: “File/ New/ Expert Advisor (template)” from template, “Continue”, I will call this file: “SimpleCustomTimeFunction”, click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function and the two comment lines here.<br />
Okay, that&#8217;s it.<br />
First we need to create a string variable for our custom time that will be called: “myTime” and it&#8217;s of the type string, so it can contain text and to calculate it we just want to call a custom function called: “GetTime” to calculate the time, so the value of “myTime” will be calculated in the function “GetTime” and when we click on the “Compile” button right now we will see that the “GetTime” function is not defined, so that&#8217;s what we are going to do now.<br />
To create a custom function you can use a return type, in our case we will use the string return type, because we are going to deliver the time as text. The name of the function is: “GetTime” as we are calling it here and we don&#8217;t have any parameters so let&#8217;s add two brackets here, we use a local string that will be called: time with seconds (TimeWithSeconds). Now we create a string for the time with seconds (TimeWithSeconds) that&#8217;s also a string type variable and the name will be: “TimeWithSeconds”.<br />
Here comes the interesting part; we calculate the time with seconds (TimeWithSeconds) for the local time and that is done by using “TIME_LOCAL”. If you mark “TIME_LOCAL” and press the F1 key you will see that it returns the local time of a computer where the client terminal is running, but it&#8217;s a datetime variable so we use “TimeToStr” to change it to a text and the function: “TimeToStr” (time to string) is converting a value containing time in seconds since the 1st of January in 1970 into a string in this format.<br />
We use “TIME_DATE” that will give us the year, the month and the day – that&#8217;s the first part here, this is the pipe sign, it separates the first from the second parameter, the second parameter is “TIME_SECONDS” and that will deliver us the local time including the seconds.<br />
Okay. In the last step we want to return the calculated time to the main function by using the “return” function for “TimeWithSeconds” so it will return the calculated value here and assign it to “myTime” and to see it on the chart we use the “Comment” function to create a chart output for the time and when you are done you can click on the “Compile” button here, that should work without any errors now and if that is the case you can click on the little button here to go back to Metatrader.<br />
In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R and now you should see the Strategy Tester here, please select the “SimpleCustomTimeFunction.ex5”, mark the visualization option here and start your test.<br />
We have the date and the time directly on the Forex Chart and now you know how to create an Expert Advisor to calculate the formatted time output on your chart and you have done it with a few lines of MQL5 code.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-tutorial-simple-custom-time-function/?tmstv=1777110366" rel="nofollow" id="download-link-1267" data-redirect="false" >
	Download &ldquo;MQL5 TUTORIAL - SIMPLE CUSTOM TIME FUNCTION&rdquo;	<small>SimpleCustomTimeFunction.txt		&ndash; Downloaded 408 times		&ndash; 598.00 B</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-custom-time-function/">MQL5 TUTORIAL &#8211; SIMPLE CUSTOM TIME FUNCTION</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="14632204" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL4-TUTORIAL-EN/MQL5-TUTORIAL-SIMPLE-CUSTOM-TIME-FUNCTION.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>5:10</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>In this video we are going to talk about a simple custom time function that we have created in MQL5. You see the output here on the chart, we have the date and we have the time including the seconds that is the local time that has been traded right here in the Strategy Tester and now we are going to find out how we can do a custom time function that is going to return the time and this readable format and 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 (template)” from template, “Continue”, I will call this file: “SimpleCustomTimeFunction”, click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function and the two comment lines here. Okay, that&amp;#8217;s it. First we need to create a string variable for our custom time that will be called: “myTime” and it&amp;#8217;s of the type string, so it can contain text and to calculate it we just want to call a custom function called: “GetTime” to calculate the time, so the value of “myTime” will be calculated in the function “GetTime” and when we click on the “Compile” button right now we will see that the “GetTime” function is not defined, so that&amp;#8217;s what we are going to do now. To create a custom function you can use a return type, in our case we will use the string return type, because we are going to deliver the time as text. The name of the function is: “GetTime” as we are calling it here and we don&amp;#8217;t have any parameters so let&amp;#8217;s add two brackets here, we use a local string that will be called: time with seconds (TimeWithSeconds). Now we create a string for the time with seconds (TimeWithSeconds) that&amp;#8217;s also a string type variable and the name will be: “TimeWithSeconds”. Here comes the interesting part; we calculate the time with seconds (TimeWithSeconds) for the local time and that is done by using “TIME_LOCAL”. If you mark “TIME_LOCAL” and press the F1 key you will see that it returns the local time of a computer where the client terminal is running, but it&amp;#8217;s a datetime variable so we use “TimeToStr” to change it to a text and the function: “TimeToStr” (time to string) is converting a value containing time in seconds since the 1st of January in 1970 into a string in this format. We use “TIME_DATE” that will give us the year, the month and the day – that&amp;#8217;s the first part here, this is the pipe sign, it separates the first from the second parameter, the second parameter is “TIME_SECONDS” and that will deliver us the local time including the seconds. Okay. In the last step we want to return the calculated time to the main function by using the “return” function for “TimeWithSeconds” so it will return the calculated value here and assign it to “myTime” and to see it on the chart we use the “Comment” function to create a chart output for the time and when you are done you can click on the “Compile” button here, that should work without any errors now and if that is the case you can click on the little button here to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R and now you should see the Strategy Tester here, please select the “SimpleCustomTimeFunction.ex5”, mark the visualization option here and start your test. We have the date and the time directly on the Forex Chart and now you know how to create an Expert Advisor to calculate the formatted time output on your chart and you have done it with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE CUSTOM TIME FUNCTION appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>In this video we are going to talk about a simple custom time function that we have created in MQL5. You see the output here on the chart, we have the date and we have the time including the seconds that is the local time that has been traded right here in the Strategy Tester and now we are going to find out how we can do a custom time function that is going to return the time and this readable format and 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 (template)” from template, “Continue”, I will call this file: “SimpleCustomTimeFunction”, click on “Continue”, “Continue” and “Finish” and now you can delete everything above the “OnTick” function and the two comment lines here. Okay, that&amp;#8217;s it. First we need to create a string variable for our custom time that will be called: “myTime” and it&amp;#8217;s of the type string, so it can contain text and to calculate it we just want to call a custom function called: “GetTime” to calculate the time, so the value of “myTime” will be calculated in the function “GetTime” and when we click on the “Compile” button right now we will see that the “GetTime” function is not defined, so that&amp;#8217;s what we are going to do now. To create a custom function you can use a return type, in our case we will use the string return type, because we are going to deliver the time as text. The name of the function is: “GetTime” as we are calling it here and we don&amp;#8217;t have any parameters so let&amp;#8217;s add two brackets here, we use a local string that will be called: time with seconds (TimeWithSeconds). Now we create a string for the time with seconds (TimeWithSeconds) that&amp;#8217;s also a string type variable and the name will be: “TimeWithSeconds”. Here comes the interesting part; we calculate the time with seconds (TimeWithSeconds) for the local time and that is done by using “TIME_LOCAL”. If you mark “TIME_LOCAL” and press the F1 key you will see that it returns the local time of a computer where the client terminal is running, but it&amp;#8217;s a datetime variable so we use “TimeToStr” to change it to a text and the function: “TimeToStr” (time to string) is converting a value containing time in seconds since the 1st of January in 1970 into a string in this format. We use “TIME_DATE” that will give us the year, the month and the day – that&amp;#8217;s the first part here, this is the pipe sign, it separates the first from the second parameter, the second parameter is “TIME_SECONDS” and that will deliver us the local time including the seconds. Okay. In the last step we want to return the calculated time to the main function by using the “return” function for “TimeWithSeconds” so it will return the calculated value here and assign it to “myTime” and to see it on the chart we use the “Comment” function to create a chart output for the time and when you are done you can click on the “Compile” button here, that should work without any errors now and if that is the case you can click on the little button here to go back to Metatrader. In Metatrader you want to click on “View/ Strategy Tester” or press CTRL and R and now you should see the Strategy Tester here, please select the “SimpleCustomTimeFunction.ex5”, mark the visualization option here and start your test. We have the date and the time directly on the Forex Chart and now you know how to create an Expert Advisor to calculate the formatted time output on your chart and you have done it with a few lines of MQL5 code. The post MQL5 TUTORIAL &amp;#8211; SIMPLE CUSTOM TIME FUNCTION appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 TUTORIAL – LIVE TRADING EXPERIMENT 2024 – SYSTEM DOWNLOAD AVAILABLE (below)</title>
		<link>https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-system-download-available-below/</link>
		
		
		<pubDate>Wed, 03 Jan 2024 14:11:21 +0000</pubDate>
				<category><![CDATA[NaN]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4255</guid>

					<description><![CDATA[<p>&#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &#160; Okay, let&#8217;s start from the beginning. The trading experiment we&#8217;re conducting in 2024 is different from anything I&#8217;ve done before. A few weeks ago, I was pretty sick and was lying in bed, watching movies on Netflix all day. These included movies with commercials, and one ad I kept being shown was about a woman getting face cream for Christmas. She also demonstrated how to use the cream with pineapple to improve her skin. This didn&#8217;t interest me at all, and even if I was shown this ad a thousand times, I would never use face cream with pineapple. &#160; Why am I telling you this? It&#8217;s about relevance! If I offer something that is irrelevant, nobody will want to buy it. It&#8217;s the same with pineapple face cream. It doesn&#8217;t matter how hard I try to convince someone if it&#8217;s just not relevant. I don&#8217;t think it matters what advertising technology is used. If something doesn&#8217;t interest me, there&#8217;s little anyone can do about it, no matter how appealing the advertising is. As a rule, I look for solutions that bring me more benefit than cost &#8211; popularly known as a bargain. In other words, you get something of value for less than you would be prepared to pay. That&#8217;s why we&#8217;re doing something different this year. I think a lot of companies are at an impasse right now because they&#8217;re trying to convince everyone on the planet to buy their products and everyone is trying to get louder and louder. I myself am not a fan of being ripped off and have never made a big show of how and what I do in trading. &#160; I know that many people in this field wave big wads of cash from a skyscraper in Dubai or loll around on their Ferrari, but I believe that most potential clients quickly see through such dubious strategies. So I spent a long time looking for a way to offer something that I would buy myself, in an unobtrusive way that could convince people like me. I found Frank Kern, who teaches a strategy that I really like. It is described as the oldest trick in his books and is about really helping someone to convince them that you can help them. When it comes to automated trading, that&#8217;s pretty easy and that&#8217;s why we&#8217;re using a demo account now and will be trading with a demo system to get better results in 2024. I believe that you are interested in better results, and I know from the last ten years that 10 to 15 percent of the people who watch these videos are interested in buying the right solution. That doesn&#8217;t mean you have to buy it yourself, but I believe that probabilities are the key to success. &#160; Knowing my numbers, it is very likely that 10 to 15 percent of viewers will spend money with me later because they are convinced that what I am offering is exactly the solution they were looking for. That&#8217;s why the Robot Trading System is now available as a free download for demo accounts. You can find the link below this video. In the next videos we will look at how to set up this system in Meta Trader to achieve good results in the long term. Anyway, I believe that you should trade the first weeks or months on a demo account, and after that you can use the system on a so-called cent account. So this strategy fits well. And I think it can help you and me to achieve better results in 2024. Okay, that&#8217;s it for this video. I&#8217;ll see you in the next one, and thank you for watching.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-system-download-available-below/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SYSTEM DOWNLOAD AVAILABLE (below)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_99838"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/mix36ig6yCE?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>20240101: DOWNLOAD 28 result videos for this system <a href="https://bit.ly/41OIpzK"> </a></p>
<p>20240101: README Documentation (updated often): <a href="https://bit.ly/41FPceY"> </a></p>
<p>20240102: System Download for Demo accounts: <a href="https://bit.ly/3H3diqt">
<p>&nbsp;</p>
<p>Okay, let&#8217;s start from the beginning. The trading experiment we&#8217;re conducting in 2024 is different from anything I&#8217;ve done before. A few weeks ago, I was pretty sick and was lying in bed, watching movies on Netflix all day. These included movies with commercials, and one ad I kept being shown was about a woman getting face cream for Christmas. She also demonstrated how to use the cream with pineapple to improve her skin. This didn&#8217;t interest me at all, and even if I was shown this ad a thousand times, I would never use face cream with pineapple.</p>
<p>&nbsp;</p>
<p>Why am I telling you this? It&#8217;s about relevance! If I offer something that is irrelevant, nobody will want to buy it. It&#8217;s the same with pineapple face cream. It doesn&#8217;t matter how hard I try to convince someone if it&#8217;s just not relevant. I don&#8217;t think it matters what advertising technology is used. If something doesn&#8217;t interest me, there&#8217;s little anyone can do about it, no matter how appealing the advertising is. As a rule, I look for solutions that bring me more benefit than cost &#8211; popularly known as a bargain. In other words, you get something of value for less than you would be prepared to pay. That&#8217;s why we&#8217;re doing something different this year. I think a lot of companies are at an impasse right now because they&#8217;re trying to convince everyone on the planet to buy their products and everyone is trying to get louder and louder. I myself am not a fan of being ripped off and have never made a big show of how and what I do in trading.</p>
<p>&nbsp;</p>
<p>I know that many people in this field wave big wads of cash from a skyscraper in Dubai or loll around on their Ferrari, but I believe that most potential clients quickly see through such dubious strategies. So I spent a long time looking for a way to offer something that I would buy myself, in an unobtrusive way that could convince people like me. I found Frank Kern, who teaches a strategy that I really like. It is described as the oldest trick in his books and is about really helping someone to convince them that you can help them. When it comes to automated trading, that&#8217;s pretty easy and that&#8217;s why we&#8217;re using a demo account now and will be trading with a demo system to get better results in 2024. I believe that you are interested in better results, and I know from the last ten years that 10 to 15 percent of the people who watch these videos are interested in buying the right solution. That doesn&#8217;t mean you have to buy it yourself, but I believe that probabilities are the key to success.</p>
<p>&nbsp;</p>
<p>Knowing my numbers, it is very likely that 10 to 15 percent of viewers will spend money with me later because they are convinced that what I am offering is exactly the solution they were looking for. That&#8217;s why the Robot Trading System is now available as a free download for demo accounts. You can find the link below this video. In the next videos we will look at how to set up this system in Meta Trader to achieve good results in the long term. Anyway, I believe that you should trade the first weeks or months on a demo account, and after that you can use the system on a so-called cent account. So this strategy fits well. And I think it can help you and me to achieve better results in 2024. Okay, that&#8217;s it for this video. I&#8217;ll see you in the next one, and thank you for watching.</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-live-trading-experiment-2024-system-download-available-below/">MQL5 TUTORIAL &#8211; LIVE TRADING EXPERIMENT 2024 &#8211; SYSTEM DOWNLOAD AVAILABLE (below)</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><enclosure length="87060" type="application/x-zip-compressed" url="https://bit.ly/3H3diqt"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>&amp;#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &amp;#160; Okay, let&amp;#8217;s start from the beginning. The trading experiment we&amp;#8217;re conducting in 2024 is different from anything I&amp;#8217;ve done before. A few weeks ago, I was pretty sick and was lying in bed, watching movies on Netflix all day. These included movies with commercials, and one ad I kept being shown was about a woman getting face cream for Christmas. She also demonstrated how to use the cream with pineapple to improve her skin. This didn&amp;#8217;t interest me at all, and even if I was shown this ad a thousand times, I would never use face cream with pineapple. &amp;#160; Why am I telling you this? It&amp;#8217;s about relevance! If I offer something that is irrelevant, nobody will want to buy it. It&amp;#8217;s the same with pineapple face cream. It doesn&amp;#8217;t matter how hard I try to convince someone if it&amp;#8217;s just not relevant. I don&amp;#8217;t think it matters what advertising technology is used. If something doesn&amp;#8217;t interest me, there&amp;#8217;s little anyone can do about it, no matter how appealing the advertising is. As a rule, I look for solutions that bring me more benefit than cost &amp;#8211; popularly known as a bargain. In other words, you get something of value for less than you would be prepared to pay. That&amp;#8217;s why we&amp;#8217;re doing something different this year. I think a lot of companies are at an impasse right now because they&amp;#8217;re trying to convince everyone on the planet to buy their products and everyone is trying to get louder and louder. I myself am not a fan of being ripped off and have never made a big show of how and what I do in trading. &amp;#160; I know that many people in this field wave big wads of cash from a skyscraper in Dubai or loll around on their Ferrari, but I believe that most potential clients quickly see through such dubious strategies. So I spent a long time looking for a way to offer something that I would buy myself, in an unobtrusive way that could convince people like me. I found Frank Kern, who teaches a strategy that I really like. It is described as the oldest trick in his books and is about really helping someone to convince them that you can help them. When it comes to automated trading, that&amp;#8217;s pretty easy and that&amp;#8217;s why we&amp;#8217;re using a demo account now and will be trading with a demo system to get better results in 2024. I believe that you are interested in better results, and I know from the last ten years that 10 to 15 percent of the people who watch these videos are interested in buying the right solution. That doesn&amp;#8217;t mean you have to buy it yourself, but I believe that probabilities are the key to success. &amp;#160; Knowing my numbers, it is very likely that 10 to 15 percent of viewers will spend money with me later because they are convinced that what I am offering is exactly the solution they were looking for. That&amp;#8217;s why the Robot Trading System is now available as a free download for demo accounts. You can find the link below this video. In the next videos we will look at how to set up this system in Meta Trader to achieve good results in the long term. Anyway, I believe that you should trade the first weeks or months on a demo account, and after that you can use the system on a so-called cent account. So this strategy fits well. And I think it can help you and me to achieve better results in 2024. Okay, that&amp;#8217;s it for this video. I&amp;#8217;ll see you in the next one, and thank you for watching. The post MQL5 TUTORIAL &amp;#8211; LIVE TRADING EXPERIMENT 2024 &amp;#8211; SYSTEM DOWNLOAD AVAILABLE (below) appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>&amp;#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &amp;#160; Okay, let&amp;#8217;s start from the beginning. The trading experiment we&amp;#8217;re conducting in 2024 is different from anything I&amp;#8217;ve done before. A few weeks ago, I was pretty sick and was lying in bed, watching movies on Netflix all day. These included movies with commercials, and one ad I kept being shown was about a woman getting face cream for Christmas. She also demonstrated how to use the cream with pineapple to improve her skin. This didn&amp;#8217;t interest me at all, and even if I was shown this ad a thousand times, I would never use face cream with pineapple. &amp;#160; Why am I telling you this? It&amp;#8217;s about relevance! If I offer something that is irrelevant, nobody will want to buy it. It&amp;#8217;s the same with pineapple face cream. It doesn&amp;#8217;t matter how hard I try to convince someone if it&amp;#8217;s just not relevant. I don&amp;#8217;t think it matters what advertising technology is used. If something doesn&amp;#8217;t interest me, there&amp;#8217;s little anyone can do about it, no matter how appealing the advertising is. As a rule, I look for solutions that bring me more benefit than cost &amp;#8211; popularly known as a bargain. In other words, you get something of value for less than you would be prepared to pay. That&amp;#8217;s why we&amp;#8217;re doing something different this year. I think a lot of companies are at an impasse right now because they&amp;#8217;re trying to convince everyone on the planet to buy their products and everyone is trying to get louder and louder. I myself am not a fan of being ripped off and have never made a big show of how and what I do in trading. &amp;#160; I know that many people in this field wave big wads of cash from a skyscraper in Dubai or loll around on their Ferrari, but I believe that most potential clients quickly see through such dubious strategies. So I spent a long time looking for a way to offer something that I would buy myself, in an unobtrusive way that could convince people like me. I found Frank Kern, who teaches a strategy that I really like. It is described as the oldest trick in his books and is about really helping someone to convince them that you can help them. When it comes to automated trading, that&amp;#8217;s pretty easy and that&amp;#8217;s why we&amp;#8217;re using a demo account now and will be trading with a demo system to get better results in 2024. I believe that you are interested in better results, and I know from the last ten years that 10 to 15 percent of the people who watch these videos are interested in buying the right solution. That doesn&amp;#8217;t mean you have to buy it yourself, but I believe that probabilities are the key to success. &amp;#160; Knowing my numbers, it is very likely that 10 to 15 percent of viewers will spend money with me later because they are convinced that what I am offering is exactly the solution they were looking for. That&amp;#8217;s why the Robot Trading System is now available as a free download for demo accounts. You can find the link below this video. In the next videos we will look at how to set up this system in Meta Trader to achieve good results in the long term. Anyway, I believe that you should trade the first weeks or months on a demo account, and after that you can use the system on a so-called cent account. So this strategy fits well. And I think it can help you and me to achieve better results in 2024. Okay, that&amp;#8217;s it for this video. I&amp;#8217;ll see you in the next one, and thank you for watching. The post MQL5 TUTORIAL &amp;#8211; LIVE TRADING EXPERIMENT 2024 &amp;#8211; SYSTEM DOWNLOAD AVAILABLE (below) appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 TUTORIAL – JOIN THE GREAT TRADING EXPERIMENT 2024</title>
		<link>https://mql5tutorial.com/mql5-tutorial-join-the-great-trading-experiment-2024/</link>
		
		
		<pubDate>Tue, 02 Jan 2024 19:10:04 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5tutorial.com/?p=4249</guid>

					<description><![CDATA[<p>&#160; &#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &#160; This video is about a big trading experiment that I would like to do together with you. Today is January 1, 2024, it&#8217;s just before 4 pm and I&#8217;ve spent the day today running strategy tests for all the major currency pairs that I trade myself for this system here, trading through the entire year of 2023. And I will also make these videos available for you to watch for yourself. But the big experiment here is that I would like to use the year 2024 together with people like you to make this system better. That&#8217;s why I&#8217;m now offering a version of the Robot Trading System that runs indefinitely on a demo account from January 2024. This means that if you use a demo account, you can do everything that I do myself. I will also initially trade this system on a demo account, and it will be about how you can set up, adjust and improve such a system over the course of the year so that you get a decent result at the end of the year. We will also discuss and share some other things that might help you, even if you haven&#8217;t had anything to do with automated trading before or if you want to have a look at the whole thing first if you are interested in joining in. You don&#8217;t need any prior knowledge, you don&#8217;t need any capital. All you need is a computer that has been manufactured in the last ten years. You need a demo account. You can get that for free from Metaquotes or other companies and you need to do strategy tests like this here with Metatrader five, which you can also download for free. This time we would have made a net profit of €1,642 on an account with a deposit of €10,000. And why are we doing all this on a demo account? Well, there are few people who are actually willing and ready to invest time in real trading results on a demo account before trading real money with a real money account. And in almost every trading session there are always dips like this. And that leads people to close their account at exactly this point. Because that&#8217;s where the fear is greatest. But you don&#8217;t have to be afraid on a demo account. And as soon as you feel that the system works well enough for you, you can switch at any time. But we have already done experiments like this in the past and I would like to start 2024 in the same way. Because I believe that nothing can replace the knowledge you have gained yourself. And in this case, I think you have little to lose and a lot to gain. That&#8217;s it for this opening video. I wish you a happy new year and in the next few days you will receive more information, new videos and also the download link to the version of this system that you can then use for free on your own demo account. If you are already an existing customer, I have activated a few more parameters for the Robot Trading System here. This means that the system can now be controlled more precisely. And if you like the results here, I&#8217;ll see you in the next video. Thank you very much for watching. And we&#8217;ll continue in the next video. ​</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-join-the-great-trading-experiment-2024/">MQL5 TUTORIAL &#8211; JOIN THE GREAT TRADING EXPERIMENT 2024</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<div class="epyt-video-wrapper"><iframe loading="lazy"  id="_ytid_54586"  width="1024" height="576"  data-origwidth="1024" data-origheight="576" src="https://www.youtube-nocookie.com/embed/xhgZnAC0tic?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=1&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe></div>
<p>&nbsp;</p>
<p>20240101: DOWNLOAD 28 result videos for this system <a href="https://bit.ly/41OIpzK"> </a></p>
<p>20240101: README Documentation (updated often): <a href="https://bit.ly/41FPceY"> </a></p>
<p>20240102: System Download for Demo accounts: <a href="https://bit.ly/3H3diqt"> </a></p>
<p>&nbsp;</p>
<p>This video is about a big trading experiment that I would like to do together with you. Today is January 1, 2024, it&#8217;s just before 4 pm and I&#8217;ve spent the day today running strategy tests for all the major currency pairs that I trade myself for this system here, trading through the entire year of 2023. And I will also make these videos available for you to watch for yourself. But the big experiment here is that I would like to use the year 2024 together with people like you to make this system better. That&#8217;s why I&#8217;m now offering a version of the Robot Trading System that runs indefinitely on a demo account from January 2024.</p>
<p>This means that if you use a demo account, you can do everything that I do myself. I will also initially trade this system on a demo account, and it will be about how you can set up, adjust and improve such a system over the course of the year so that you get a decent result at the end of the year. We will also discuss and share some other things that might help you, even if you haven&#8217;t had anything to do with automated trading before or if you want to have a look at the whole thing first if you are interested in joining in. You don&#8217;t need any prior knowledge, you don&#8217;t need any capital. All you need is a computer that has been manufactured in the last ten years. You need a demo account. You can get that for free from Metaquotes or other companies and you need to do strategy tests like this here with Metatrader five, which you can also download for free. This time we would have made a net profit of €1,642 on an account with a deposit of €10,000. And why are we doing all this on a demo account? Well, there are few people who are actually willing and ready to invest time in real trading results on a demo account before trading real money with a real money account. And in almost every trading session there are always dips like this. And that leads people to close their account at exactly this point.</p>
<p>Because that&#8217;s where the fear is greatest. But you don&#8217;t have to be afraid on a demo account. And as soon as you feel that the system works well enough for you, you can switch at any time. But we have already done experiments like this in the past and I would like to start 2024 in the same way. Because I believe that nothing can replace the knowledge you have gained yourself. And in this case, I think you have little to lose and a lot to gain. That&#8217;s it for this opening video. I wish you a happy new year and in the next few days you will receive more information, new videos and also the download link to the version of this system that you can then use for free on your own demo account. If you are already an existing customer, I have activated a few more parameters for the Robot Trading System here. This means that the system can now be controlled more precisely. And if you like the results here, I&#8217;ll see you in the next video. Thank you very much for watching. And we&#8217;ll continue in the next video. ​</p><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-join-the-great-trading-experiment-2024/">MQL5 TUTORIAL &#8211; JOIN THE GREAT TRADING EXPERIMENT 2024</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
		
			<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><enclosure length="87060" type="application/x-zip-compressed" url="https://bit.ly/3H3diqt"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>&amp;#160; &amp;#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &amp;#160; This video is about a big trading experiment that I would like to do together with you. Today is January 1, 2024, it&amp;#8217;s just before 4 pm and I&amp;#8217;ve spent the day today running strategy tests for all the major currency pairs that I trade myself for this system here, trading through the entire year of 2023. And I will also make these videos available for you to watch for yourself. But the big experiment here is that I would like to use the year 2024 together with people like you to make this system better. That&amp;#8217;s why I&amp;#8217;m now offering a version of the Robot Trading System that runs indefinitely on a demo account from January 2024. This means that if you use a demo account, you can do everything that I do myself. I will also initially trade this system on a demo account, and it will be about how you can set up, adjust and improve such a system over the course of the year so that you get a decent result at the end of the year. We will also discuss and share some other things that might help you, even if you haven&amp;#8217;t had anything to do with automated trading before or if you want to have a look at the whole thing first if you are interested in joining in. You don&amp;#8217;t need any prior knowledge, you don&amp;#8217;t need any capital. All you need is a computer that has been manufactured in the last ten years. You need a demo account. You can get that for free from Metaquotes or other companies and you need to do strategy tests like this here with Metatrader five, which you can also download for free. This time we would have made a net profit of €1,642 on an account with a deposit of €10,000. And why are we doing all this on a demo account? Well, there are few people who are actually willing and ready to invest time in real trading results on a demo account before trading real money with a real money account. And in almost every trading session there are always dips like this. And that leads people to close their account at exactly this point. Because that&amp;#8217;s where the fear is greatest. But you don&amp;#8217;t have to be afraid on a demo account. And as soon as you feel that the system works well enough for you, you can switch at any time. But we have already done experiments like this in the past and I would like to start 2024 in the same way. Because I believe that nothing can replace the knowledge you have gained yourself. And in this case, I think you have little to lose and a lot to gain. That&amp;#8217;s it for this opening video. I wish you a happy new year and in the next few days you will receive more information, new videos and also the download link to the version of this system that you can then use for free on your own demo account. If you are already an existing customer, I have activated a few more parameters for the Robot Trading System here. This means that the system can now be controlled more precisely. And if you like the results here, I&amp;#8217;ll see you in the next video. Thank you very much for watching. And we&amp;#8217;ll continue in the next video. ​ The post MQL5 TUTORIAL &amp;#8211; JOIN THE GREAT TRADING EXPERIMENT 2024 appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>&amp;#160; &amp;#160; 20240101: DOWNLOAD 28 result videos for this system https://bit.ly/41OIpzK 20240101: README Documentation (updated often): https://bit.ly/41FPceY 20240102: System Download for Demo accounts: https://bit.ly/3H3diqt &amp;#160; This video is about a big trading experiment that I would like to do together with you. Today is January 1, 2024, it&amp;#8217;s just before 4 pm and I&amp;#8217;ve spent the day today running strategy tests for all the major currency pairs that I trade myself for this system here, trading through the entire year of 2023. And I will also make these videos available for you to watch for yourself. But the big experiment here is that I would like to use the year 2024 together with people like you to make this system better. That&amp;#8217;s why I&amp;#8217;m now offering a version of the Robot Trading System that runs indefinitely on a demo account from January 2024. This means that if you use a demo account, you can do everything that I do myself. I will also initially trade this system on a demo account, and it will be about how you can set up, adjust and improve such a system over the course of the year so that you get a decent result at the end of the year. We will also discuss and share some other things that might help you, even if you haven&amp;#8217;t had anything to do with automated trading before or if you want to have a look at the whole thing first if you are interested in joining in. You don&amp;#8217;t need any prior knowledge, you don&amp;#8217;t need any capital. All you need is a computer that has been manufactured in the last ten years. You need a demo account. You can get that for free from Metaquotes or other companies and you need to do strategy tests like this here with Metatrader five, which you can also download for free. This time we would have made a net profit of €1,642 on an account with a deposit of €10,000. And why are we doing all this on a demo account? Well, there are few people who are actually willing and ready to invest time in real trading results on a demo account before trading real money with a real money account. And in almost every trading session there are always dips like this. And that leads people to close their account at exactly this point. Because that&amp;#8217;s where the fear is greatest. But you don&amp;#8217;t have to be afraid on a demo account. And as soon as you feel that the system works well enough for you, you can switch at any time. But we have already done experiments like this in the past and I would like to start 2024 in the same way. Because I believe that nothing can replace the knowledge you have gained yourself. And in this case, I think you have little to lose and a lot to gain. That&amp;#8217;s it for this opening video. I wish you a happy new year and in the next few days you will receive more information, new videos and also the download link to the version of this system that you can then use for free on your own demo account. If you are already an existing customer, I have activated a few more parameters for the Robot Trading System here. This means that the system can now be controlled more precisely. And if you like the results here, I&amp;#8217;ll see you in the next video. Thank you very much for watching. And we&amp;#8217;ll continue in the next video. ​ The post MQL5 TUTORIAL &amp;#8211; JOIN THE GREAT TRADING EXPERIMENT 2024 appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – Simple MQL5 New Candle Robot</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-mql5-new-candle-robot/</link>
		
		
		<pubDate>Fri, 29 Dec 2023 07:38:21 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MQL5 Entry Signals]]></category>
		<category><![CDATA[Video]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=535</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-new-candle-robot/"><img title="A man working on a laptop at night." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5%20Simple%20New%20Candle%20Robot.png" alt="A man working on a laptop at night." width="" /></a>
	</div>
<p>	&#160; Introduction to Counting New Candles on the Chart (00:00 &#8211; 00:17) Discussing the usefulness of counting new candles on a chart and showing the output of four candles since the start of the expert advisor. Importance of Candle Counting in Automated Trading (00:17 &#8211; 00:36) Explaining why counting candles is important in automated trading, especially when trading multiple positions and currency pairs. Resource Management and Avoiding Computer Crashes (00:36 &#8211; 01:17) Highlighting the importance of resource management to avoid computer crashes, especially during fast market movements. Creating a Simple Expert Advisor for New Candle Detection (01:17 &#8211; 01:57) Demonstrating how to create a simple expert advisor in MetaTrader to detect new candles. Setting Up Price Array and Sorting for Candle Data (01:57 &#8211; 02:20) Instructions on setting up a price array and sorting it to hold price data for candle detection. Filling the Array with Price Data and Counting New Candles (02:20 &#8211; 02:59) Steps to fill the array with price data and use it to count the number of new candles since the last start of the expert advisor. Creating Timestamp Variables for Candle Time Tracking (02:59 &#8211; 03:42) Creating date/time variables to track the timestamp of the current and last checked candles. Updating Candle Counter and Displaying Output on Chart (03:42 &#8211; 04:36) Updating the candle counter when a new candle is detected and displaying the output on the chart. &#160; Sometimes it is helpful to count the new candles on the chart. The output in the left upper corner on the chart says we had four candles since we started this Expert Advisor,. One, two, three, four, this is the fifth one. Now you might ask yourself why is this important? Well an Expert Advisor can trade several positions on a chart, and you also can trade several currency pairs and every single candle on the chart can have lots of different price moves. And every time a price changes the OnTick function will be triggered but a lot of trading strategies use close prices. So instead of maybe fifteen calculations within this candle, you would only need one calculation for the close price. Even a high tech computer may have a resource problem, if you try to calculate several dozen trades on several dozen charts because when the market starts to move really fast your computer might be overwhelmed and it may cause a crash. So if you want to avoid computer crashes, it&#8217;s a good idea to save resources. To do that you can simply check if a new candle is created and now we will create a simple little Expert Advisor to do that. So let&#8217;s click the little button over here or hit the F4 key to bring up the Meta Editor. Select File, new Expert Advisor from template, continue, and we will give it the name Simple New Candle. Now click on continue, continue, finish, and remove everything above the OnTick function. Let&#8217;s delete the two comment lines here. Okay now the first thing we need is the price array to hold our price data. So let&#8217;s create that, that can be done with MQLRates and we will call a price data. Now we want to sort our array from the current candle downwards with arraysetasseries and in the next step we need to fill it with data. That is done by using copyrates for the current currency pair on the chart and the current selected period. For example I prefer a one minute charts, we want to start with the current candle zero, and copy the price for three candles into our little array price data. To count the number of new candles since the last start of the Expert Advisor, we need a new candle counter. This candle counter will be an integer and it will be static, that means it will never lose its value even if we would like to leave the function. Okay let&#8217;s move on, now we are creating datetime variable that will hold a time stamp; this one will hold the time stamp for the last time we checked and it is also static so it will never lose its value. And for the current candle we need another datetime variable and that will be called time stamp current candle and we will fill it by getting the time value of the current candle from our price data array. And if the time stamp for the current candle is different from the timestamp the last time we checked, we want to remember the current timestamp for the next time by assigning it to the timestamp last check variable. Now we want to add the value one to our current candle counter and the last thing we need us the output on the chart. So let&#8217;s compile the little Expert Advisor here and we have zero errors and zero warnings. So let&#8217;s hit the F4 key or click this button to go back to MetaTrader, select View Strategy Test or hit the control and the R key. Look out for the simple new candle.ex5 file. Mark the visualization option and click on start. And now you should see your candles on the chart being counted and that can be done very fast and you did it in five minutes by creating this little Expert Advisor here.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-new-candle-robot/">MQL5 Tutorial &#8211; Simple MQL5 New Candle Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-new-candle-robot/"><img title="A man working on a laptop at night." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/MQL5%20Simple%20New%20Candle%20Robot.png" alt="A man working on a laptop at night." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>&nbsp;</p>
<ol>
<li><strong>Introduction to Counting New Candles on the Chart</strong> (00:00 &#8211; 00:17) Discussing the usefulness of counting new candles on a chart and showing the output of four candles since the start of the expert advisor.</li>
<li><strong>Importance of Candle Counting in Automated Trading</strong> (00:17 &#8211; 00:36) Explaining why counting candles is important in automated trading, especially when trading multiple positions and currency pairs.</li>
<li><strong>Resource Management and Avoiding Computer Crashes</strong> (00:36 &#8211; 01:17) Highlighting the importance of resource management to avoid computer crashes, especially during fast market movements.</li>
<li><strong>Creating a Simple Expert Advisor for New Candle Detection</strong> (01:17 &#8211; 01:57) Demonstrating how to create a simple expert advisor in MetaTrader to detect new candles.</li>
<li><strong>Setting Up Price Array and Sorting for Candle Data</strong> (01:57 &#8211; 02:20) Instructions on setting up a price array and sorting it to hold price data for candle detection.</li>
<li><strong>Filling the Array with Price Data and Counting New Candles</strong> (02:20 &#8211; 02:59) Steps to fill the array with price data and use it to count the number of new candles since the last start of the expert advisor.</li>
<li><strong>Creating Timestamp Variables for Candle Time Tracking</strong> (02:59 &#8211; 03:42) Creating date/time variables to track the timestamp of the current and last checked candles.</li>
<li><strong>Updating Candle Counter and Displaying Output on Chart</strong> (03:42 &#8211; 04:36) Updating the candle counter when a new candle is detected and displaying the output on the chart.</li>
</ol>
<p>&nbsp;</p>
<p>Sometimes it is helpful to count the new candles on the chart.<br />
The output in the left upper corner on the chart says we had four candles since we started this Expert Advisor,.<br />
One, two, three, four, this is the fifth one.<br />
Now you might ask yourself why is this important?<br />
Well an Expert Advisor can trade several positions on a chart, and you also can trade several currency pairs and every single candle on the chart can have lots of different price moves.<br />
And every time a price changes the OnTick function will be triggered but a lot of trading strategies use close prices.<br />
So instead of maybe fifteen calculations within this candle, you would only need one calculation for the close price.<br />
Even a high tech computer may have a resource problem, if you try to calculate several dozen trades on several dozen charts because when the market starts to move really fast your computer might be overwhelmed and it may cause a crash.<br />
So if you want to avoid computer crashes, it&#8217;s a good idea to save resources.<br />
To do that you can simply check if a new candle is created and now we will create a simple little Expert Advisor to do that.<br />
So let&#8217;s click the little button over here or hit the F4 key to bring up the Meta Editor.<br />
Select File, new Expert Advisor from template, continue, and we will give it the name Simple New Candle.<br />
Now click on continue, continue, finish, and remove everything above the OnTick function.<br />
Let&#8217;s delete the two comment lines here. Okay now the first thing we need is the price array to hold our price data.<br />
So let&#8217;s create that, that can be done with MQLRates and we will call a price data.<br />
Now we want to sort our array from the current candle downwards with arraysetasseries and in the next step we need to fill it with data.<br />
That is done by using copyrates for the current currency pair on the chart and the current selected period.<br />
For example I prefer a one minute charts, we want to start with the current candle zero, and copy the price for three candles into our little array price data.<br />
To count the number of new candles since the last start of the Expert Advisor, we need a new candle counter.<br />
This candle counter will be an integer and it will be static, that means it will never lose its value even if we would like to leave the function.<br />
Okay let&#8217;s move on, now we are creating datetime variable that will hold a time stamp; this one will hold the time stamp for the last time we checked and it is also static so it will never lose its value.<br />
And for the current candle we need another datetime variable and that will be called time stamp current candle and we will fill it by getting the time value of the current candle from our price data array.<br />
And if the time stamp for the current candle is different from the timestamp the last time we checked, we want to remember the current timestamp for the next time by assigning it to the timestamp last check variable.<br />
Now we want to add the value one to our current candle counter and the last thing we need us the output on the chart.<br />
So let&#8217;s compile the little Expert Advisor here and we have zero errors and zero warnings.<br />
So let&#8217;s hit the F4 key or click this button to go back to MetaTrader, select View Strategy Test or hit the control and the R key. Look out for the simple new candle.ex5 file.<br />
Mark the visualization option and click on start.<br />
And now you should see your candles on the chart being counted and that can be done very fast and you did it in five minutes by creating this little Expert Advisor here.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/mql5-simple-new-candle-expert-advisor-from-mql5-tutorial/?tmstv=1777110366" rel="nofollow" id="download-link-474" data-redirect="false" >
	Download &ldquo;MQL5 Simple New Candle Expert Advisor from MQL5 Tutorial&rdquo;	<small>SimpleNewCandle.txt		&ndash; Downloaded 505 times		&ndash; 1.11 KB</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-new-candle-robot/">MQL5 Tutorial &#8211; Simple MQL5 New Candle Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="12435664" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/podcast/MQL5-Tutorial-Simple-New-Candle-Robot.mp4"/>

				<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>4:52</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>&amp;#160; Introduction to Counting New Candles on the Chart (00:00 &amp;#8211; 00:17) Discussing the usefulness of counting new candles on a chart and showing the output of four candles since the start of the expert advisor. Importance of Candle Counting in Automated Trading (00:17 &amp;#8211; 00:36) Explaining why counting candles is important in automated trading, especially when trading multiple positions and currency pairs. Resource Management and Avoiding Computer Crashes (00:36 &amp;#8211; 01:17) Highlighting the importance of resource management to avoid computer crashes, especially during fast market movements. Creating a Simple Expert Advisor for New Candle Detection (01:17 &amp;#8211; 01:57) Demonstrating how to create a simple expert advisor in MetaTrader to detect new candles. Setting Up Price Array and Sorting for Candle Data (01:57 &amp;#8211; 02:20) Instructions on setting up a price array and sorting it to hold price data for candle detection. Filling the Array with Price Data and Counting New Candles (02:20 &amp;#8211; 02:59) Steps to fill the array with price data and use it to count the number of new candles since the last start of the expert advisor. Creating Timestamp Variables for Candle Time Tracking (02:59 &amp;#8211; 03:42) Creating date/time variables to track the timestamp of the current and last checked candles. Updating Candle Counter and Displaying Output on Chart (03:42 &amp;#8211; 04:36) Updating the candle counter when a new candle is detected and displaying the output on the chart. &amp;#160; Sometimes it is helpful to count the new candles on the chart. The output in the left upper corner on the chart says we had four candles since we started this Expert Advisor,. One, two, three, four, this is the fifth one. Now you might ask yourself why is this important? Well an Expert Advisor can trade several positions on a chart, and you also can trade several currency pairs and every single candle on the chart can have lots of different price moves. And every time a price changes the OnTick function will be triggered but a lot of trading strategies use close prices. So instead of maybe fifteen calculations within this candle, you would only need one calculation for the close price. Even a high tech computer may have a resource problem, if you try to calculate several dozen trades on several dozen charts because when the market starts to move really fast your computer might be overwhelmed and it may cause a crash. So if you want to avoid computer crashes, it&amp;#8217;s a good idea to save resources. To do that you can simply check if a new candle is created and now we will create a simple little Expert Advisor to do that. So let&amp;#8217;s click the little button over here or hit the F4 key to bring up the Meta Editor. Select File, new Expert Advisor from template, continue, and we will give it the name Simple New Candle. Now click on continue, continue, finish, and remove everything above the OnTick function. Let&amp;#8217;s delete the two comment lines here. Okay now the first thing we need is the price array to hold our price data. So let&amp;#8217;s create that, that can be done with MQLRates and we will call a price data. Now we want to sort our array from the current candle downwards with arraysetasseries and in the next step we need to fill it with data. That is done by using copyrates for the current currency pair on the chart and the current selected period. For example I prefer a one minute charts, we want to start with the current candle zero, and copy the price for three candles into our little array price data. To count the number of new candles since the last start of the Expert Advisor, we need a new candle counter. This candle counter will be an integer and it will be static, that means it will never lose its value even if we would like to leave the function. Okay let&amp;#8217;s move on, now we are creating datetime variable that will hold a time stamp; this one will hold the time stamp for the last time we checked and it is also static so it will never lose its value. And for the current candle we need another datetime variable and that will be called time stamp current candle and we will fill it by getting the time value of the current candle from our price data array. And if the time stamp for the current candle is different from the timestamp the last time we checked, we want to remember the current timestamp for the next time by assigning it to the timestamp last check variable. Now we want to add the value one to our current candle counter and the last thing we need us the output on the chart. So let&amp;#8217;s compile the little Expert Advisor here and we have zero errors and zero warnings. So let&amp;#8217;s hit the F4 key or click this button to go back to MetaTrader, select View Strategy Test or hit the control and the R key. Look out for the simple new candle.ex5 file. Mark the visualization option and click on start. And now you should see your candles on the chart being counted and that can be done very fast and you did it in five minutes by creating this little Expert Advisor here. The post MQL5 Tutorial &amp;#8211; Simple MQL5 New Candle Robot appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>&amp;#160; Introduction to Counting New Candles on the Chart (00:00 &amp;#8211; 00:17) Discussing the usefulness of counting new candles on a chart and showing the output of four candles since the start of the expert advisor. Importance of Candle Counting in Automated Trading (00:17 &amp;#8211; 00:36) Explaining why counting candles is important in automated trading, especially when trading multiple positions and currency pairs. Resource Management and Avoiding Computer Crashes (00:36 &amp;#8211; 01:17) Highlighting the importance of resource management to avoid computer crashes, especially during fast market movements. Creating a Simple Expert Advisor for New Candle Detection (01:17 &amp;#8211; 01:57) Demonstrating how to create a simple expert advisor in MetaTrader to detect new candles. Setting Up Price Array and Sorting for Candle Data (01:57 &amp;#8211; 02:20) Instructions on setting up a price array and sorting it to hold price data for candle detection. Filling the Array with Price Data and Counting New Candles (02:20 &amp;#8211; 02:59) Steps to fill the array with price data and use it to count the number of new candles since the last start of the expert advisor. Creating Timestamp Variables for Candle Time Tracking (02:59 &amp;#8211; 03:42) Creating date/time variables to track the timestamp of the current and last checked candles. Updating Candle Counter and Displaying Output on Chart (03:42 &amp;#8211; 04:36) Updating the candle counter when a new candle is detected and displaying the output on the chart. &amp;#160; Sometimes it is helpful to count the new candles on the chart. The output in the left upper corner on the chart says we had four candles since we started this Expert Advisor,. One, two, three, four, this is the fifth one. Now you might ask yourself why is this important? Well an Expert Advisor can trade several positions on a chart, and you also can trade several currency pairs and every single candle on the chart can have lots of different price moves. And every time a price changes the OnTick function will be triggered but a lot of trading strategies use close prices. So instead of maybe fifteen calculations within this candle, you would only need one calculation for the close price. Even a high tech computer may have a resource problem, if you try to calculate several dozen trades on several dozen charts because when the market starts to move really fast your computer might be overwhelmed and it may cause a crash. So if you want to avoid computer crashes, it&amp;#8217;s a good idea to save resources. To do that you can simply check if a new candle is created and now we will create a simple little Expert Advisor to do that. So let&amp;#8217;s click the little button over here or hit the F4 key to bring up the Meta Editor. Select File, new Expert Advisor from template, continue, and we will give it the name Simple New Candle. Now click on continue, continue, finish, and remove everything above the OnTick function. Let&amp;#8217;s delete the two comment lines here. Okay now the first thing we need is the price array to hold our price data. So let&amp;#8217;s create that, that can be done with MQLRates and we will call a price data. Now we want to sort our array from the current candle downwards with arraysetasseries and in the next step we need to fill it with data. That is done by using copyrates for the current currency pair on the chart and the current selected period. For example I prefer a one minute charts, we want to start with the current candle zero, and copy the price for three candles into our little array price data. To count the number of new candles since the last start of the Expert Advisor, we need a new candle counter. This candle counter will be an integer and it will be static, that means it will never lose its value even if we would like to leave the function. Okay let&amp;#8217;s move on, now we are creating datetime variable that will hold a time stamp; this one will hold the time stamp for the last time we checked and it is also static so it will never lose its value. And for the current candle we need another datetime variable and that will be called time stamp current candle and we will fill it by getting the time value of the current candle from our price data array. And if the time stamp for the current candle is different from the timestamp the last time we checked, we want to remember the current timestamp for the next time by assigning it to the timestamp last check variable. Now we want to add the value one to our current candle counter and the last thing we need us the output on the chart. So let&amp;#8217;s compile the little Expert Advisor here and we have zero errors and zero warnings. So let&amp;#8217;s hit the F4 key or click this button to go back to MetaTrader, select View Strategy Test or hit the control and the R key. Look out for the simple new candle.ex5 file. Mark the visualization option and click on start. And now you should see your candles on the chart being counted and that can be done very fast and you did it in five minutes by creating this little Expert Advisor here. The post MQL5 Tutorial &amp;#8211; Simple MQL5 New Candle Robot appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
		<item>
		<title>MQL5 Tutorial – Simple MQL5 Bollinger Bands Robot</title>
		<link>https://mql5tutorial.com/mql5-tutorial-simple-mql5-bollinger-bands-robot/</link>
		
		
		<pubDate>Tue, 19 Dec 2023 10:35:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MQL5 Entry Signals]]></category>
		<category><![CDATA[Videos]]></category>
		<guid isPermaLink="false">https://mql5-tutorial.com/?p=532</guid>

					<description><![CDATA[<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-bollinger-bands-robot/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/SimpleBollingerBandsRobot.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
<p>	&#160; Introduction to Bollinger Bands and Expert Advisor Calculation (00:00 &#8211; 01:03) Introduction to using Bollinger Bands in trading and how the expert advisor can calculate all three bands with higher accuracy. Trading Strategy with Bollinger Bands (01:03 &#8211; 01:34) Explaining the trading strategy: opening a short trade when the price breaks the upper Bollinger Band and a long trade when it breaks the lower band and returns. Creating an Expert Advisor for Bollinger Bands (01:34 &#8211; 02:05) Instructions on creating an expert advisor in MetaTrader to automate trading with Bollinger Bands. Setting Up Arrays and Defining Bollinger Bands in Code (02:05 &#8211; 03:21) Coding steps to set up arrays for each Bollinger Band and defining the bands based on the current chart and time period. Outputting Calculated Values on the Chart (03:21 &#8211; 03:38) Using the comment function to output the calculated values of the Bollinger Bands on the chart. Compiling the Code and Preparing MetaTrader (03:38 &#8211; 04:20) Compiling the expert advisor code and setting up MetaTrader to display the Bollinger Bands on the chart. Testing the Expert Advisor in Strategy Tester (04:20 &#8211; 05:39) Running the expert advisor in the strategy tester and comparing the calculated values with the chart&#8217;s Bollinger Bands. &#160; If you like to use indicators, you might have heard of the Bollinger bands. This little Expert Advisor here can calculate all three bands. If you put your mouse cursor over the middle band here you see a value of 0.712078 and our calculated value for the middle band is 0.7120775, this calculation even is a little bit more accurate. The value for the upper Bollinger band is 0.712457 and here we have 0.712457. And for the lower Ballinger band it&#8217;s the same 0711698, 0.7116979. This value is even more accurate because this one is rounded. So what can we do with a Bollinger Bands? Well the idea is as the price breaks the upper Bollinger band we want to get in at the next entry and we would like to open a short trade here, because we expect the price to fall. In the other case if the price breaks the Bollinger band here and it gets back into the bands we would go for a long trade because the price might rise. So if you can create an automated Expert Advisor that is able to compare these values over here with the current price, you can fully automate this. Your computer can trade the Bollinger bands automatically and you don&#8217;t have to sit in front of your screen all the time. So let&#8217;s create a little Expert Advisor! To do that please hit the F4 key or click this little button over here and that will open the Meta Editor. Here we click on new Expert Advisor from template, continue, we will call it simple Bollinger bands, click on continue, continue, finish. Remove everything above the OnTick function, remove the comments and the first thing we need is an array for each of the Bollinger bands one, two, three times a double array. Now we need to sort our three arrays to hold prices from the current candle downwards and we do that with the function arraysetasseries. In the next step we need to define the Bollinger bands. We want our Expert Advisor to use the current chart for the current time period used on the chart. It should calculate the Bollinger bands for twenty candles without any shift and with a standard deviation of two, that all should be calculated for the closed price of the candle. Afterwards we need to copy the price information into three arrays and now it&#8217;s time to calculate the actual value for the current candle and to store it in a variable for each of the three bands. That&#8217;s it for the calculation. Now we want to output our calculated values on the chart, we do that with the comment function and it will output the name of the variable and the value we have calculated in this block. Okay let&#8217;s compile the code. We have no errors and no warnings. So let&#8217;s click the little button over here or hit the F4 key to bring up the Meta Trader, to make the Bollinger band visible on the screen we will use a little trick. Please click on insert, indicators, Bollinger bands, select the period of twenty candles with a shift value of zero and the deviation value of two, we want to apply all this to the closed price of the candles and now you can pick a color and style for the line. I prefer these thicker lines. Let&#8217;s click on okay and you will see the visual representation of the Bollinger bands on the chart. Now right click the chart select templates, save template and save it as Tester.tpl to make it the default chart for strategy tester. And if you save it as default.tpl it will also become the default template if you open a new chart in life trading. So let&#8217;s bring up the Strategy Tester by clicking on View Strategy Tester or hitting the control and the R key and select the simple Bollinger bands.ex5 file, make sure to and enable visualization here and start the test. And this is what you should see now, let&#8217;s stop it here and check the values. This is 0.706251, 0.7062505, thats okay. The upper Bollinger band is 0.706916, 0.706916, that&#8217;s also okay and the lower Bollinger band is 0.705585, and that&#8217;s exactly what&#8217;s calculated here, so it works. In this video you learned to calculate all the Bollinger bands by creating this little Expert Advisor here.</p>
<p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-bollinger-bands-robot/">MQL5 Tutorial &#8211; Simple MQL5 Bollinger Bands Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
	<div>
	<a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-bollinger-bands-robot/"><img title="A businessman in a suit in front of a computer screen." src="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/SimpleBollingerBandsRobot.png" alt="A businessman in a suit in front of a computer screen." width="" /></a>
	</div>
	<p class="fv-flowplayer-feed"></p>
<p>&nbsp;</p>
<ol>
<li><strong>Introduction to Bollinger Bands and Expert Advisor Calculation</strong> (00:00 &#8211; 01:03) Introduction to using Bollinger Bands in trading and how the expert advisor can calculate all three bands with higher accuracy.</li>
<li><strong>Trading Strategy with Bollinger Bands</strong> (01:03 &#8211; 01:34) Explaining the trading strategy: opening a short trade when the price breaks the upper Bollinger Band and a long trade when it breaks the lower band and returns.</li>
<li><strong>Creating an Expert Advisor for Bollinger Bands</strong> (01:34 &#8211; 02:05) Instructions on creating an expert advisor in MetaTrader to automate trading with Bollinger Bands.</li>
<li><strong>Setting Up Arrays and Defining Bollinger Bands in Code</strong> (02:05 &#8211; 03:21) Coding steps to set up arrays for each Bollinger Band and defining the bands based on the current chart and time period.</li>
<li><strong>Outputting Calculated Values on the Chart</strong> (03:21 &#8211; 03:38) Using the comment function to output the calculated values of the Bollinger Bands on the chart.</li>
<li><strong>Compiling the Code and Preparing MetaTrader</strong> (03:38 &#8211; 04:20) Compiling the expert advisor code and setting up MetaTrader to display the Bollinger Bands on the chart.</li>
<li><strong>Testing the Expert Advisor in Strategy Tester</strong> (04:20 &#8211; 05:39) Running the expert advisor in the strategy tester and comparing the calculated values with the chart&#8217;s Bollinger Bands.</li>
</ol>
<p>&nbsp;</p>
<p>If you like to use indicators, you might have heard of the Bollinger bands.<br />
This little Expert Advisor here can calculate all three bands.<br />
If you put your mouse cursor over the middle band here you see a value of 0.712078 and our calculated value for the middle band is 0.7120775, this calculation even is a little bit more accurate.<br />
The value for the upper Bollinger band is 0.712457 and here we have 0.712457.<br />
And for the lower Ballinger band it&#8217;s the same 0711698, 0.7116979.<br />
This value is even more accurate because this one is rounded.<br />
So what can we do with a Bollinger Bands?<br />
Well the idea is as the price breaks the upper Bollinger band we want to get in at the next entry and we would like to open a short trade here, because we expect the price to fall.<br />
In the other case if the price breaks the Bollinger band here and it gets back into the bands we would go for a long trade because the price might rise.<br />
So if you can create an automated Expert Advisor that is able to compare these values over here with the current price, you can fully automate this.<br />
Your computer can trade the Bollinger bands automatically and you don&#8217;t have to sit in front of your screen all the time.<br />
So let&#8217;s create a little Expert Advisor!<br />
To do that please hit the F4 key or click this little button over here and that will open the Meta Editor.<br />
Here we click on new Expert Advisor from template, continue, we will call it simple Bollinger bands, click on continue, continue, finish.<br />
Remove everything above the OnTick function, remove the comments and the first thing we need is an array for each of the Bollinger bands one, two, three times a double array.<br />
Now we need to sort our three arrays to hold prices from the current candle downwards and we do that with the function arraysetasseries.<br />
In the next step we need to define the Bollinger bands.<br />
We want our Expert Advisor to use the current chart for the current time period used on the chart.<br />
It should calculate the Bollinger bands for twenty candles without any shift and with a standard deviation of two, that all should be calculated for the closed price of the candle.<br />
Afterwards we need to copy the price information into three arrays and now it&#8217;s time to calculate the actual value for the current candle and to store it in a variable for each of the three bands.<br />
That&#8217;s it for the calculation. Now we want to output our calculated values on the chart, we do that with the comment function and it will output the name of the variable and the value we have calculated in this block.<br />
Okay let&#8217;s compile the code. We have no errors and no warnings.<br />
So let&#8217;s click the little button over here or hit the F4 key to bring up the Meta Trader, to make the Bollinger band visible on the screen we will use a little trick.<br />
Please click on insert, indicators, Bollinger bands, select the period of twenty candles with a shift value of zero and the deviation value of two, we want to apply all this to the closed price of the candles and now you can pick a color and style for the line.<br />
I prefer these thicker lines. Let&#8217;s click on okay and you will see the visual representation of the Bollinger bands on the chart.<br />
Now right click the chart select templates, save template and save it as Tester.tpl to make it the default chart for strategy tester.<br />
And if you save it as default.tpl it will also become the default template if you open a new chart in life trading.<br />
So let&#8217;s bring up the Strategy Tester by clicking on View Strategy Tester or hitting the control and the R key and select the simple Bollinger bands.ex5 file, make sure to and enable visualization here and start the test.<br />
And this is what you should see now, let&#8217;s stop it here and check the values.<br />
This is 0.706251, 0.7062505, thats okay.<br />
The upper Bollinger band is 0.706916, 0.706916, that&#8217;s also okay and the lower Bollinger band is 0.705585, and that&#8217;s exactly what&#8217;s calculated here, so it works.<br />
In this video you learned to calculate all the Bollinger bands by creating this little Expert Advisor here.</p>

<a  data-e-Disable-Page-Transition="true" class="download-link download-button aligncenter" title="" href="https://mql5tutorial.com/download/simple-bollinger-bands-expert-advisor-from-mql5-tutorial/?tmstv=1777110366" rel="nofollow" id="download-link-456" data-redirect="false" >
	Download &ldquo;MQL5 Simple Bollinger Bands Expert Advisor from MQL5 Tutorial&rdquo;	<small>SimpleBollingerBands.txt		&ndash; Downloaded 620 times		&ndash; 1.11 KB</small>
</a><p>The post <a href="https://mql5tutorial.com/mql5-tutorial-simple-mql5-bollinger-bands-robot/">MQL5 Tutorial &#8211; Simple MQL5 Bollinger Bands Robot</a> appeared first on <a href="https://mql5tutorial.com">MQL5 Tutorial</a>.</p>
]]></content:encoded>
					
		
				<enclosure length="18888430" type="video/mp4" url="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/podcast/MQL5-Tutorial-Simple-Bollinger-Bands-Robot.mp4"/>

				<itunes:image href="https://d8wyob5mxqc1u.cloudfront.net/MQL5Tutorial/SimpleBollingerBandsRobot.png"/>
		<itunes:episodeType>full</itunes:episodeType>
		<itunes:duration>5:56</itunes:duration>
	<dc:creator>Raimund.Bauer@crowdcompany-UG.com (Raimund Bauer)</dc:creator><itunes:explicit>no</itunes:explicit><itunes:subtitle>&amp;#160; Introduction to Bollinger Bands and Expert Advisor Calculation (00:00 &amp;#8211; 01:03) Introduction to using Bollinger Bands in trading and how the expert advisor can calculate all three bands with higher accuracy. Trading Strategy with Bollinger Bands (01:03 &amp;#8211; 01:34) Explaining the trading strategy: opening a short trade when the price breaks the upper Bollinger Band and a long trade when it breaks the lower band and returns. Creating an Expert Advisor for Bollinger Bands (01:34 &amp;#8211; 02:05) Instructions on creating an expert advisor in MetaTrader to automate trading with Bollinger Bands. Setting Up Arrays and Defining Bollinger Bands in Code (02:05 &amp;#8211; 03:21) Coding steps to set up arrays for each Bollinger Band and defining the bands based on the current chart and time period. Outputting Calculated Values on the Chart (03:21 &amp;#8211; 03:38) Using the comment function to output the calculated values of the Bollinger Bands on the chart. Compiling the Code and Preparing MetaTrader (03:38 &amp;#8211; 04:20) Compiling the expert advisor code and setting up MetaTrader to display the Bollinger Bands on the chart. Testing the Expert Advisor in Strategy Tester (04:20 &amp;#8211; 05:39) Running the expert advisor in the strategy tester and comparing the calculated values with the chart&amp;#8217;s Bollinger Bands. &amp;#160; If you like to use indicators, you might have heard of the Bollinger bands. This little Expert Advisor here can calculate all three bands. If you put your mouse cursor over the middle band here you see a value of 0.712078 and our calculated value for the middle band is 0.7120775, this calculation even is a little bit more accurate. The value for the upper Bollinger band is 0.712457 and here we have 0.712457. And for the lower Ballinger band it&amp;#8217;s the same 0711698, 0.7116979. This value is even more accurate because this one is rounded. So what can we do with a Bollinger Bands? Well the idea is as the price breaks the upper Bollinger band we want to get in at the next entry and we would like to open a short trade here, because we expect the price to fall. In the other case if the price breaks the Bollinger band here and it gets back into the bands we would go for a long trade because the price might rise. So if you can create an automated Expert Advisor that is able to compare these values over here with the current price, you can fully automate this. Your computer can trade the Bollinger bands automatically and you don&amp;#8217;t have to sit in front of your screen all the time. So let&amp;#8217;s create a little Expert Advisor! To do that please hit the F4 key or click this little button over here and that will open the Meta Editor. Here we click on new Expert Advisor from template, continue, we will call it simple Bollinger bands, click on continue, continue, finish. Remove everything above the OnTick function, remove the comments and the first thing we need is an array for each of the Bollinger bands one, two, three times a double array. Now we need to sort our three arrays to hold prices from the current candle downwards and we do that with the function arraysetasseries. In the next step we need to define the Bollinger bands. We want our Expert Advisor to use the current chart for the current time period used on the chart. It should calculate the Bollinger bands for twenty candles without any shift and with a standard deviation of two, that all should be calculated for the closed price of the candle. Afterwards we need to copy the price information into three arrays and now it&amp;#8217;s time to calculate the actual value for the current candle and to store it in a variable for each of the three bands. That&amp;#8217;s it for the calculation. Now we want to output our calculated values on the chart, we do that with the comment function and it will output the name of the variable and the value we have calculated in this block. Okay let&amp;#8217;s compile the code. We have no errors and no warnings. So let&amp;#8217;s click the little button over here or hit the F4 key to bring up the Meta Trader, to make the Bollinger band visible on the screen we will use a little trick. Please click on insert, indicators, Bollinger bands, select the period of twenty candles with a shift value of zero and the deviation value of two, we want to apply all this to the closed price of the candles and now you can pick a color and style for the line. I prefer these thicker lines. Let&amp;#8217;s click on okay and you will see the visual representation of the Bollinger bands on the chart. Now right click the chart select templates, save template and save it as Tester.tpl to make it the default chart for strategy tester. And if you save it as default.tpl it will also become the default template if you open a new chart in life trading. So let&amp;#8217;s bring up the Strategy Tester by clicking on View Strategy Tester or hitting the control and the R key and select the simple Bollinger bands.ex5 file, make sure to and enable visualization here and start the test. And this is what you should see now, let&amp;#8217;s stop it here and check the values. This is 0.706251, 0.7062505, thats okay. The upper Bollinger band is 0.706916, 0.706916, that&amp;#8217;s also okay and the lower Bollinger band is 0.705585, and that&amp;#8217;s exactly what&amp;#8217;s calculated here, so it works. In this video you learned to calculate all the Bollinger bands by creating this little Expert Advisor here. The post MQL5 Tutorial &amp;#8211; Simple MQL5 Bollinger Bands Robot appeared first on MQL5 Tutorial.</itunes:subtitle><itunes:author>Raimund Bauer</itunes:author><itunes:summary>&amp;#160; Introduction to Bollinger Bands and Expert Advisor Calculation (00:00 &amp;#8211; 01:03) Introduction to using Bollinger Bands in trading and how the expert advisor can calculate all three bands with higher accuracy. Trading Strategy with Bollinger Bands (01:03 &amp;#8211; 01:34) Explaining the trading strategy: opening a short trade when the price breaks the upper Bollinger Band and a long trade when it breaks the lower band and returns. Creating an Expert Advisor for Bollinger Bands (01:34 &amp;#8211; 02:05) Instructions on creating an expert advisor in MetaTrader to automate trading with Bollinger Bands. Setting Up Arrays and Defining Bollinger Bands in Code (02:05 &amp;#8211; 03:21) Coding steps to set up arrays for each Bollinger Band and defining the bands based on the current chart and time period. Outputting Calculated Values on the Chart (03:21 &amp;#8211; 03:38) Using the comment function to output the calculated values of the Bollinger Bands on the chart. Compiling the Code and Preparing MetaTrader (03:38 &amp;#8211; 04:20) Compiling the expert advisor code and setting up MetaTrader to display the Bollinger Bands on the chart. Testing the Expert Advisor in Strategy Tester (04:20 &amp;#8211; 05:39) Running the expert advisor in the strategy tester and comparing the calculated values with the chart&amp;#8217;s Bollinger Bands. &amp;#160; If you like to use indicators, you might have heard of the Bollinger bands. This little Expert Advisor here can calculate all three bands. If you put your mouse cursor over the middle band here you see a value of 0.712078 and our calculated value for the middle band is 0.7120775, this calculation even is a little bit more accurate. The value for the upper Bollinger band is 0.712457 and here we have 0.712457. And for the lower Ballinger band it&amp;#8217;s the same 0711698, 0.7116979. This value is even more accurate because this one is rounded. So what can we do with a Bollinger Bands? Well the idea is as the price breaks the upper Bollinger band we want to get in at the next entry and we would like to open a short trade here, because we expect the price to fall. In the other case if the price breaks the Bollinger band here and it gets back into the bands we would go for a long trade because the price might rise. So if you can create an automated Expert Advisor that is able to compare these values over here with the current price, you can fully automate this. Your computer can trade the Bollinger bands automatically and you don&amp;#8217;t have to sit in front of your screen all the time. So let&amp;#8217;s create a little Expert Advisor! To do that please hit the F4 key or click this little button over here and that will open the Meta Editor. Here we click on new Expert Advisor from template, continue, we will call it simple Bollinger bands, click on continue, continue, finish. Remove everything above the OnTick function, remove the comments and the first thing we need is an array for each of the Bollinger bands one, two, three times a double array. Now we need to sort our three arrays to hold prices from the current candle downwards and we do that with the function arraysetasseries. In the next step we need to define the Bollinger bands. We want our Expert Advisor to use the current chart for the current time period used on the chart. It should calculate the Bollinger bands for twenty candles without any shift and with a standard deviation of two, that all should be calculated for the closed price of the candle. Afterwards we need to copy the price information into three arrays and now it&amp;#8217;s time to calculate the actual value for the current candle and to store it in a variable for each of the three bands. That&amp;#8217;s it for the calculation. Now we want to output our calculated values on the chart, we do that with the comment function and it will output the name of the variable and the value we have calculated in this block. Okay let&amp;#8217;s compile the code. We have no errors and no warnings. So let&amp;#8217;s click the little button over here or hit the F4 key to bring up the Meta Trader, to make the Bollinger band visible on the screen we will use a little trick. Please click on insert, indicators, Bollinger bands, select the period of twenty candles with a shift value of zero and the deviation value of two, we want to apply all this to the closed price of the candles and now you can pick a color and style for the line. I prefer these thicker lines. Let&amp;#8217;s click on okay and you will see the visual representation of the Bollinger bands on the chart. Now right click the chart select templates, save template and save it as Tester.tpl to make it the default chart for strategy tester. And if you save it as default.tpl it will also become the default template if you open a new chart in life trading. So let&amp;#8217;s bring up the Strategy Tester by clicking on View Strategy Tester or hitting the control and the R key and select the simple Bollinger bands.ex5 file, make sure to and enable visualization here and start the test. And this is what you should see now, let&amp;#8217;s stop it here and check the values. This is 0.706251, 0.7062505, thats okay. The upper Bollinger band is 0.706916, 0.706916, that&amp;#8217;s also okay and the lower Bollinger band is 0.705585, and that&amp;#8217;s exactly what&amp;#8217;s calculated here, so it works. In this video you learned to calculate all the Bollinger bands by creating this little Expert Advisor here. The post MQL5 Tutorial &amp;#8211; Simple MQL5 Bollinger Bands Robot appeared first on MQL5 Tutorial.</itunes:summary><itunes:keywords>mql5,mql5,tutorial,learn,mql5,mql5,lessons,forex,trading,algo,trading,metatrader5,metaeditor,jimdandy1958,bilal,haider,forex,boat,charting,algorithmic,trading,trading,robot,daytrader,daytrading,forex,trading,forex,tutorial,auto,trading,trading,for,beginne</itunes:keywords></item>
	</channel>
</rss>