How to write MQL4 Custom Indicator Step by Step What you’ll learn in this video How to create default indicator template How to use the onCalculate Event Prerequisites You must know the basic core knowledge before continue this tutorial You must know how the program flows You must know the basic of data type, how to use integer (int), how to use boolean (bool), how to use array You must know how to use function You must know how to use MQL4 predefined method like iClose() You must know how to use loop You must know how to use comparison How to create default indicator template At first, you can learn how to create indicator by default from the Metatrader Editor Go to Metatrader 4 > Tools > Open MetaQuotes Languages Editor Go to New Choose Custom Indicator Choose the default setting and key in the indicator name Choose the number of indicators that you want to add at the Plots as below Add in the number indicator number Click on Finish Then the custom indicator will be generated. How to use the onCalculate Event Next you should learn how to change the value onCalculate Event. Oncalculate is function to refresh the chart with indicator when the chart receive new price from the server. In MT4, on receiving new price from the server, it is also called on receiving new tick. Our job onCalculate Event is to add on price on the to the buffer array that we have created Label1Buffer. Each of the buffer array is storing the price indicator. Upon filling the price into the buffer array, then we could draw the indicator in the chart. Example 1: I am using a loop to loop through all the uncounted bar with value with two prices. With this, you will get the two lines 109.36 and 109.06 . Example 2: Similar idea, you could design your indicator to feed in different values into the indicator buffer. Example, I’m drawing the value of price with previous bar close price. You could access to the source code here . You could register free and access to the source code above. Post Views: 21,513
Best Expert Advisor Builders What is the available best EA builder ? Which EA Builder covers the most features in checking condition? Which EA is the most reliable and easy to be used without the knowledge of MQL4 programming ? Before I start on EA builder, do you already have the knowledge of EA Build? What is a EA Builder? Previously, I also have taught you how to construct and build your own forex strategy . This is the fundamental on how to design your forex strategy based on the trade logics. For more advance level, you should know how to use comparison logic like more than, lesser than, more or equal than, lesser or equal than , equal or not equal to help you make comparison for a single strategy checking. For more deeper, you also know how to use AND and OR operators to compare multiple conditions. These all knowledges are essential for you before you start to look at what is EA Builders. Let’s assume you are experts of these and you are ready to create your Expert Advisor (EA), then let’s continue below. I am going to introduce the best EA Builder that I searched across so far – which is EA Builder.com What you’ll learn in this post What could the EABuilder.com do What couldn’t the EABuilder.com do How much does it cost Step by step how to build a Expert Advisor Robot through EABuilder.com What could the EABuilder.com do From my best of knowledge, all the EA builders in the market provides basic to intermediate level of flexibility to create the conditions. You can do the simple condition checks scenario as below I want to create a new buy trade when 5 moving average is above 13 moving average The Bollinger band is getting smaller Below is the full list of the feature supported by EABuilder.com Trade to enter Buy, Sell, Buy Stop, Sell Stop, Buy Limit, Sell Limit Trade to close Buy, Sell, Buy Stop, Sell Stop, Buy Limit, Sell Limit Condition to check Indicators Price Comparison (Accelerator Oscillator, Accumulation/Distribution, Alligator, Average Directional Movement, Average True Range, Awesome Oscillator, Bear power, Bollinger bands, Bulls power, Commodity Channel Index, Demarker, Envelopes, Force Index, Fractals, Gator Oscillator, Ichimoku Kinko Hyo, MACD, Market Facilitation Index, Momentum, Money Flow Index, Moving Average, Moving Average of Oscillator, On Balance Volume, Parabolic SAR, Relative Strength Index, Relative Vigor Index, Standard Deviation, Volumes, and William’s Percent Range Price Bid, Ask Candlestick All timeframes (From 1 minute to 1 month), current timeframe Number of the candlestick (current, previous .. until last 20th bar) Open , High, Low, Close, Body Length Custom Code You can write own custom code on in what condition the indicator should show However, this need the knowledge of MQL4 programming knowledge Trendline A new feature from the EABuilder to test on the up trendline or down trendline S/R A new feature supported by the EABuilder to test on the support and resistance value based on different time interval Money management Trailing stop lost Lot size Risk per trade Martingle Extra features to be added on top of the indicators Draw on separate window Show up alert When indicator pains Show alert Print out to Journal Send email Print to file Send notification Maximum open trades / long trades/ short trades / pending trades Screenshot above is showing how to create a condition to open a buying trade. The condition could be set through just by selecting on the criteria that you want to set. All in all, the provided features are quite complete. What couldn’t the EABuilder.com do Nevertheless, if you are comparing EABuilder.com with the flexibilities of creating Expert Advisor through MQL4 Programming knowledge, then it is surely lagging behind. There are several aspect of EABuilder couldn’t do. Let me give you some example as below The ability of comparing multiple condition through “Either OR” operation I.e. I want to create a trade ONLY when EITHER RSI is > 70 OR Bollinger band different is 30 pips The ability to check on the trade information to create a trade I.e. I want to stop all trades when total stop lost is – 100 The ability to change the lot size accordingly to your account balance i.e. I want to create the lot size on 5% of my account balance There are more in the lists. Anyway, I think you could ignore this if you do not need the condition to check. You could just use the provided basic function. How much does it cost This site provides free access to create the Expert advisor. However, you need to pay $97 for the service to generate the source code in .EA for you. Sign up for free here to try out create your EA. Step by step how to build an Expert Advisor Robot through EABuilder.com Here, I will teach you how to create a Expert Advisor Robot through EA Builder.com Step 1 Login into the EABuilder.com Step 2 Click on the New ICON on the top left and choose “Strategy” Step 3 Write a name and press Create Step 4 Click on the tab to create a trade, or close a trade Step 5 Click on the Add condition to add condition accordingly to your trade strategy Example below I create my open trade condition with 5 moving average is more than 14 moving average. If you do not know how to use more than or smaller than, refer to this post to learn how to use the operator. Step 6 Click on the source and generate your EA. Step 7 Upon getting your EA, you could place into Metatrader 4. If you do not know how to do it, please follow this post on how to install the .EA into Metatrader 4. I have covered most of the topic from which EA Builder to use, how to create EA through the comparison operator , as well as how to install the .EA into Metatrader 4. I hope you have learned something from the post. If you still have any doubts, please feel free to email us and we will help to solve your problem.
How to Compare Multiple Conditions using AND OR in Forex Trading Strategy In previous post, you have learned how to use the relational operators to build a single criteria check. more than, lesser than, more or equal than, lesser or equal than, equal not equal How about if you want to design multiple criteria check? In this post, you will learn on Logical Operator How could Logical Operator do How to use AND operator How to use OR operator How to check more than 2 conditions? How could Logical Operator do Logical operator allows you to check multiple criteria in a same time. During your design of trading strategy, you might come across the scenario as below Scenario #1 I want to do a pending buy stop when When 5 moving average is > 13 moving average When RSI < 70 When RSI > 30 When MACD signal value is > 0 (Positive) In this scenario, you want all conditions to be met in order to perform your buy stop Scenario #2 I want to close the trade When the 5 moving average is < 13 moving average OR When RSI > 70 In this scenario, you want to close the trade when either one of the condition is met , whether is the 5 moving average is < 13 moving average or RSI is > 70. Let’s reveal how to cover the scenario 1 and scenario 2 using logical operator. How to use AND operator AND operator or && (double ampersand) is a operator that allow you to compare A condition and B condition where it will only be true when A condition is matched AND B conditions is matched. In this example, I will use two conditions to check Condition A: 5 moving average is > 13 moving average Condition B: RSI < 70 Case #1 is the only one is matched when condition A and condition B is matched. Only any of the condition is fail, then the overall criteria check in AND operator will be fail (Case #2, Case #3 and Case #4) This is suitable for strategy that need an absolute match on the criteria to do on the action. If anyone of the condition checking fail, then action will not be proceeded. How to use OR operator OR operator or || (double vertical splash) is a operator that allow you to compare A condition and B condition where it will be true when either A condition is matched OR B conditions is matched. Similarly, I am using the same example from above Condition A: 5 moving average is > 13 moving average Condition B: RSI < 70 If using OR operator, any of the condition is true, then the overall result will be true. This result is true for Case #1, Case #2, and Case #3. It will only be fail, when both condition A and condition B is failed (Case #4). How to check more than 2 conditions? Now you should have know how to compare 2 conditions concurrently. How about 3 conditions ? 4 ? or 5 ? Same rules logical condition applied to more conditions check even if is 3 conditions or 4 conditions or 5 conditions. Lets say you have a condition as below to create a new trade and you are using AND to check on 4 conditions Condition 1: I want to have 3 continuous bullish bar Condition 2: I want to check RSI is between 70 and between 30 Condition 3: I want to check 5 moving average is above 13 moving average Condition 4: I only want to trade in between 3pm to 10pm So if you are using AND condition, anyone of the condition is not matched, then your new trade will be executed That’s end of the topic. This concludes the condition checking lessons: You should have know how to do a simple condition check You should have know how to make multiple condition check through AND or OR operator I hope you have learned something from this post. Thank you for reading and happy learning.
How to use more than , lesser than, equal or not equal in Forex Trading Strategy As a part of how to design your forex trading strategy, you need to know what is the condition that you could check for ? In general, you know you could compare the price, buw how to compare the price? For example, you want to check Whether the price has moved more than the 5 moving average price ? Whether the price has moved lesser than the 5 moving average price? This post is going to reveal the type of mathematic condition that you could use to check your criteria, they are known as relational operators. This knowledge will help you when you’re designing your condition using the EA builder to design your condition for custom indicator custom EA. What you’ll learn in this post What does relational operators do? More than > Lesser than < Equal == More or equal than >= Lesser or equal than <= Not equal != These are the relational operators that are commonly used when you want to design your trading strategy. What does relational operator do? From the example below, I am using two variables to make comparison A and B . A and B can either be a price Ask, Bid, Open Price, High Price, Low price, or Close price an indicator price (i.e. Moving average price , Bollinger band price) Time Volume or etc A reminder, the comparison will ONLY give you TWO results in True / Matched / Condition passed False / Mismatched / Condition failed For both of the results, you could decide to do the actions that you want. For example, if the condition checking is passed, then you do a buy trade, on the other hand, if the condition checking is failed, then you do a sell trade. On both results, whether is true or fail, you could decide to do something on each of the result, or you could just do nothing. For example, I only want to execute sell trade when the result is fail. I will do nothing if the checking is true. I only want to close the trade when the condition checking is true. More than > This operator more than > is to check whether A is more than B. For example, Examples Condition Check IF Result Graph Examples A = 102.00 B = 101.00 A > B Condition Matched. A = Blue Line B = Red Line A = 101.00 B = 102.00 A > B Condition Failed. A = Blue Line B = Red Line Lesser than < This operator lesser than < is to check whether A lesser more than B. For example, Examples Condition Check IF Result Graph Examples A = 102.00 B = 101.99 A < B Condition Failed. A = Blue Line B = Red Line A = 101.99 B = 102.00 A < B Condition Matched. A = Blue Line B = Red Line Equal == This equal operator is to check the whether A is exactly the same with B. For example, Examples Condition Check IF Result Graph Examples A = 70.00 B = 70.00 A == B Condition Matched. A = Blue Line B = Red Line A = 70 B = 71.01 A == B Condition Failed. A = Blue Line B = Red Line A = 70 B = 69.99 A == B Condition Failed. A = Blue Line B = Red Line More or Equal than >= More or equal than operator is to check whether the price is more than OR equal with. Unlike the more than > comparison, if the price is exactly the same, it is still not true. However, in this comparison, the result is true when the price is exactly the same. For example, Examples Condition Check IF Result Graph Examples A = 70.00 B = 70.00 A >= B Condition Matched. A = Blue Line B = Red Line A = 70 B = 71.01 A >= B Condition Matched. A = Blue Line B = Red Line A = 70 B = 69.99 A >= B Condition Failed. A = Blue Line B = Red Line Lesser or Equal than <= This is the opposite of the more or equal than operator. It is to check if the price is lesser or equal than . The condition is true when the price is exact the same or lesser. For example, Examples Condition Check IF Result Graph Examples A = 70.00 B = 70.00 A <= B Condition Matched. A = Blue Line B = Red Line A = 70 B = 71.01 A <= B Condition Failed. A = Blue Line B = Red Line A = 70 B = 69.99 A <= B Condition Matched. A = Blue Line B = Red Line Not Equal != Not equal is the opposite sign of equal. Anything that is not equal then will result in true. For example, Examples Condition Check IF Result Graph Examples A = 70.00 B = 70.00 A != B Condition Failed. A = Blue Line B = Red Line A = 70 B = 71.01 A != B Condition Matched. A = Blue Line B = Red Line A = 70 B = 69.99 A != B Condition Matched. A = Blue Line B = Red Line So summary, in this post, you should have learned how to use the relational operator to make your comparison. You should know the basic relational operator like > more than, < lesser than, >= more or equal than, <= lesser or equal than, == equal operator, != not equal operator. With this, you should able to create your own trading strategy. Nevertheless, in this post, it only mentions how to create a single criteria check. How about you want to combine 2 criteria check? For example, I want to check both 5 moving average is > 13 moving average RSI price is < 70 You will learn this in next post. Stay tune. I wish you happy learning and success in creating your EA robot.
How to Build EA Robot Strategy | How to Design Your Forex Trading Strategy This post is to show you how to build a good forex trading strategy for your trade or for your EA robot. A good strategy covers different aspects from trade entry, trade management to account management. These 3 aspects are the crucial elements that you should think while you are designing your trade strategy. Trade strategy is the golden trade secret that each trader owns. Revealing the trade strategy to other is like allowing other to know your secrets. On the other hand, stealing other trader trade strategy or reverse engineering the EA robot to reveal the trade strategy is an unethical behavior that I definitely say NO. Therefore, protect your trade strategy and protect your own copyright. Back to the topic, any of the trading method could be written as a trade strategy. If someone is trading through the gut feeling, then he will surely lost in trade in long run when the emotions come. Therefore, before you trade, you should design your trade strategy. You should follow your trade strategy in any circumstances without affected by any emotion, especially in trade entry, in taking profit, in stopping lost and in account management. These are the keys that you will accumulate your profit, rather than you are betting all your money in a trade blindly. Trading is not gambling, but trading is a skill of finding out the probability through technical analysis or fundamental analysis. What you’ll learn in this post? What is Forex trading strategy How to design trade strategy Step 1: Design strategy for trade entry Step 2: Design strategy for trade exit (take profit or stop loss) Step 3: Win to Loss Ratio, Profit to Loss Ratio Step 4: Test your strategy What is Forex trading strategy Trading strategy is a set of condition checking to take an action in MT4. The set of criteria could consists of ONE or MANY conditions. Use the keyword “WHEN” to ask yourself when you want to do an action. The action could be buy / close / modify / close trade. So you need to ask yourself these questions: What is your action ? When you want your action to be executed ? For example: (What is my action) : I want to do a buy trade (When you want your action to be executed) : I want to execute a new buy trade when I’ve detected 3 past bars is bullish bar Thus, The “When you want to trade ” is the strategy checking or you could say this is a set of criteria. So this is pretty simple right. Now, it is time to convert your thoughts into a sequence of thought flows. I normally just use power point to help me or draft out in a paper. You could use a flow diagram with rectangle shaped box, diamond shaped box, and round shape box to form your idea. For example as: Flow Chart Explanation: Round shaped boxes are use to indicate start of strategy checking and end of the checking Diamond shaped box is used for decision making. There are ONLY two possible outcome: whether is the checking is matched or fail (In programming, it is true or false) True is when the checking is matched False is when the checking is fail Rectangle shaped box is used for action: i.e. You want to do a buy trade Arrows flow is used to indicate the flow of thought of what will happen next So, try to draft out your trading strategy in a paper or even in power point. You can use this template for a quick start too. Download the Template here. Step 1: Design strategy for trade entry First is to design your trade entry, whether is a buy trade, sell trade or pending trades like buy stop, sell stop, buy limit or sell limit. These are the action for the trade entry. Before that, you need to think of when you want the trade to be executed. In general, it can be broken down into two: Which timeframe you want the trade to be checked For example in 5 minutes chart, 15 minutes chart, 30 minute chart, 1 hour chart, 4 hours chart, 1 day chart, 1 week chart or 1 year chart i.e. I want to check on every new bar created in 5 minutes chart What is the criteria need to be met ? You can use indicator to find the criteria For example moving average , RSI, MACD. i.e. Price is moving above 5 moving average You also can use the help of Price action in finding the resistance and supports With these, then you can form a single criteria check. You could write it out your criteria check as below I want to check on every new bar in 5 minutes chart When the previous price is moving more than previous bar 5 moving average For more advance criteria check, you could combine more criteria into checking, for example I want to check on every new bar in 5 minutes chart, previous price is moving more than previous 5 moving average I also want to check that at the same time previous RSI value is lesser than 70 In this example, you combine two indicators check. There is also time that you could combine checking in different time frames. For example I want to check on every new bar in 5 minutes chart, previous price is moving more than previous 5 moving average I also want to check that at the point of time 4 hours time frame, current RSI price is lesser than 70. The criteria checking is depending on your trade strategy. It is on your research and study, which indicators will give you more profits. Design strategy for trade exit (take profit or stop loss) Now, once your trade is entered, you also could write the trade strategy for your take profit and stop loss. Normally the once the trade is executed, you will check on the condition of your trade in every price changed. On each price changed, you can take action as below Change your trades through modifying the take profit or stop loss Close your trade in critical condition Again, you could write your strategy for these actions. Win to Loss Ratio and Profit to Loss Ratio This is very important that you need to consider on the risk management: Win to loss ratio This is the ratio how many times you win versus how many time you lost i.e. I win 8 times out of 10 times, loss 2 time. The win to loss ratio is 80% i.e. I win 2 times out of 10 times, loss 8 time. The win to loss ratio is 20% Profit to loss ratio This is the ratio of profit versus loss in a single trade i.e. I win 50 pips averagely in a time, but if I loss 20 pips averagely in a time. Then the profit to loss ratio is 250%. This also means, if I win one time, basically I could cover 2.5 times of lost. i.e. I win 20 pips averagely in a time, but if I loss 50 pips averagely in a time. Then the profit to loss ratio is 40%. This also means, if I lost one time, basically I would need 2.5 times of wining to cover my lost. Both ratio carries different weights. You will still lost in total if you didn’t calculate correctly. For example If my win to loss ratio is 50% (10 times of trade, 5 times will win, 5 times will loss) I will loss in total if my profit to loss ratio is less than 50%, meaning I need more wining trade in order to cover my losing trade However, if my profit to loss ratio is more than 50%, then I will win in total. This is to show you how important that you should understand the ratios and design your stop loss and take profit correctly. Test your strategy Lastly, you should test your strategy for goes into live. There are two ways you could test your strategy. First: build an EA and test through MT4 Strategy Tester. With this, you could get 100% of accuracy whether your trade strategy is working or not, whether will loss or win through the past history. Robot will not tell lies. Second: You need to do the back test one by one through Metatrader 4 past history. You need to be honest to your self and only follow the strategy that you have defined, else you will not get the 100% of accuracy and know the result of trade strategy if it is working. So, this is the end of the post. I hope you have learned the knowledge of how to design your trading strategy. By now, you should be clear the trade considerations that you need to think when design a trade. These all will eventually affect your result. I hope it will help you to improve your trade. Happy learning ^^
EA Builder Custom Indicator – How to build custom Indicator through Free EA Builder Many newbies are asking me if whether could build own custom indicator fast without any MQL4 programming language. Yes. This is the solution. You could use knowledge of this post to create your own custom indicator through a FREE EA Builder. I assumed that you have known what is indicator. Indicator is a group of values to be drawn as Line or Objects (Arrows) to be shown in the chart. This post I will teach you Introduction to Free EA Builder to build custom indicator What is supported in the EA Builder to build the custom indicator How to build the custom indicator using this EA Builder Introduction to Free EA Builder to build custom indicator The free EA builder I could recommend is www.EABuilder.com This site provides free access and building of custom indicator through the their EA Builder. Nevertheless, you need to sign-up free at this site in order to build the custom indicator and download the source. After you have signed up, just log in . You will be brought to the screenshot above. This is the place you pull in your condition on when to draw the indicator. I will rate this site as below for the feature to create custom indicator through EA Builder User Friendliness Consider I am new in EA builder, I would rate this 4 stars out of 5 stars. It is quite easy to click on the criteria, smoother than other web EA builder. The page will not keep on refresh like the other. It is quite intuitive to be used. Strategy supports The supported condition is quite completed. In fact, is the most complete conditions that I have come across. I will rate this 4 stars out of 5. I will describe the supported strategy / conditions in here in this post. The reason i rate it 4 out of 5 due to the it supports the condition by doing comparison between two values, i.e. indicators value / trend line value / candlestick price value. If I want to build indicators like pivot points ? Then this EA Builder couldn’t do so. That is why i rate it as 4. However, it is suitable to used as beginner who want to build simple indicator. This is the most easiest and robust EA Builder site that you could try. What is supported in the EA Builder to build the custom indicator This EA Builder supports quite a complete list of conditions. It is the most complete indicator EA builder that i have come across. I breakdown the conditions supported as below Indicators Price Comparison (Accelerator Oscillator, Accumulation/Distribution, Alligator, Average Directional Movement, Average True Range, Awesome Oscillator, Bear power, Bollinger bands, Bulls power, Commodity Channel Index, Demarker, Envelopes, Force Index, Fractals, Gator Oscillator, Ichimoku Kinko Hyo, MACD, Market Facilitation Index, Momentum, Money Flow Index, Moving Average, Moving Average of Oscillator, On Balance Volume, Parabolic SAR, Relative Strength Index, Relative Vigor Index, Standard Deviation, Volumes, and William’s Percent Range Price Bid, Ask Candlestick All timeframes (From 1 minute to 1 month), current timeframe Number of the candlestick (current, previous .. until last 20th bar) Open , High, Low, Close, Body Length Custom Code You can write own custom code on in what condition the indicator should show However, this need the knowledge of MQL4 programming knowledge Trendline A new feature from the EABuilder to test on the up trendline or down trendline S/R A new feature supported by the EABuilder to test on the support and resistance value based on different time interval Extra features to be added on top of the indicators Draw on separate window Show up alert When indicator pains Show alert Print out to Journal Send email Print to file Send notification The most important is, this free version is able to download the source code without any fee. How to build the custom indicator using this EA Builder As long as you know your custom indicator condition, then you could select the condition at the indicator condition page to build your condition. There are two tips for you before you build your indicator You should know when you need the indicator to be shown . Or in other word, your condition is used to check whether the indicator should be drawn on the chart. Each indicator is checked on each of the bar itself. This is where you design your condition Example on the condition: At current bar , time 10:00, Ask price is larger than 5 moving average. If the condition is true, draw the indicator. You should know where you need to the indicator to be drawn. This means what is the price the indicator should be drawn at the particular bar. Example: when my condition check is true on point 1, the Ask price is larger than 5 moving average, I want to draw the indicator at the Bid price of the indicator. So, you need to be clear on the concepts above when want to draw indicator. After you construct your idea, then you can populate it through the EA Builder I constructed mine condition (point 1) and the price (point 2) as below: Then move to download page, you could generate and download your source file here. The video will show you how to create the custom indicator live through EA Builder. Access EABuilder.com here to build your FREE custom Indicator. I hope you have learned how to build the custom indicator through Free EA Builder. Hope this will bring you the knowledge in how to build the custom indicator. Follow us for more new upcoming tutorial and updates.
How to install EA .mq4 in Metatrader 4 | How to use MQ4 in MT4 This post is to teach you how to install .mq4 file into metatrader 4. You might obtain the .mq4 from the following method: You get a free EA robot from the web You get the EA from EA builder You copy from someone You build you own Expert advisor through Metaeditor However, as the beginner of EA robot user, you do not know. This post is designed for you to learn Step1 : Where to place the .mq4 file into the local machine Step2 : How to compile the .mq4 file into .ex4 file Step3 : How to run the EA Step4 : How to test the EA Where to place the .mq4 file into the local machine These are the step how where to place the .mq4 file to the local Metatrader 4 Be ready on your .mq4 file, you know where you have downloaded your .mq4 file from Find out the location of the installed MQL4 path *Note that: the MQL4 path might be different from the Metrader 4 path that you have installed. Normally people will confuse on the location where to find the path. The only solution is this. Go to Metatrader 4 > Click on MetaQuotes Language Editor At the MetaEditor, Navigator > Expert > Simply choose a file, right click the file and choose Open Folder A dialog window will be popup up. Record the path on the Location. I.e.C:\Users\lutherthan\AppData\Roaming\MetaQuotes\Terminal\50CA3DFB510CC5A8F28B48D1BF2A5702\MQL4\ExpertsORC:\Program Files (x86)\MetaTrader 4\MQL4\Experts\ Open the recorded file path above Paste the .mq4 file into this folder. Note that it has to be “Experts” folder . Experts folder is meant for EA robot. Do not paste into other folder . Return to MetaEditor Right click on the Experts folder > Refresh Check on the file that you have pasted if it is shown in the navigator How to compile the .mq4 file into .ex4 file You already in the midway of running the EA robot. Now this is the time to build the .mq4 to .ex4 file. .ex4 file is a binary file that is understood by Metatrader 4. So you need to compile the .mq4 file through MetaEditor. Below is the step. Double click the pasted EA .mq4 file in Navigator > Experts (We are in Metaeditor still) Click the button “Compile” at the toolbar Ensure it is error free – 0 Errors. Note that if you have errors, this means your compilation fails. You need to contact the .mq4 source again to get a correct .mq4 source file. How to run the EA Ok. Now you are ready to run your EA in the Metatrader 4. Go back to Metatrader 4 Go to Navigator on the left panel Go to Expert Advisors Ensure your EA that you have compiled (same name with the file name) exists in the Navigator > Expert folder Double click on on the EA or drag the EA into the chart and timeframe that you want to trade At the dialog, “common” tab, check / tick on the “Allow live trading”. This is to allow the EA robot to trade for you. Note that, if you not click this, the robot will not trade for you. This is the security feature provided by MT4. Then click OK on the pop up dialog Next ensure the Autotrading button is enabled. Screenshot below is disabled . Click on the button to enable it. With this is turned on, your EA is now running. Another indicator to prove the EA has been successfully loaded into Metatrader 4 is that you could see a smiley face 🙂 on the top right of the symbol. This shows the EA is running. However, if your EA is in sad face 🙁 This means something go wrongs to your EA. Check on the previous few steps again. You will get a smiley 🙂 face very soon. How to test the EA To test your EA, you should have all the steps above , which is the EA is compiled successfully. You could follow the steps on strategy tester to fully test on your EA. Thank you for reading. I hope you learn something from this post. ~
Free EA Builder I am going to review free EA builder. Out of so many available free EA builder in the market, from my experience of writing EA robot, as beginner of building EA, you could try on this free EA builder. In this post, I am going to review on http://www.forexeadvisor.com/ Typically i would rate this Free EA Builder as below User Friendliness Consder I am new in EA builder, I would rate this 4 stars out of 5 stars. It is easier to understand and use the web interface to generate criteria that i want. Strategy supports The strategies that are supported by is creating trade strategy on buy, sell, close buy and close sell. The supported indicators lists is almost complete. Nevertheless, this is suitable for basic EA building, not for complex EA. These are the following contents that you will learn throughout this articles What could this EA Builder do What couldn’t this EA Builder do How to use this EA Builder to build your EA What could this Free EA Builder do This EA Builder supports a variety of features as below Able to create buy , sell trades strategy condition Able to create closing trades for buy and sell strategy condition Able to set single lot size Able to set take profit pips and stop loss pips You can compare Ask, Bid, Close, High, Open, Low, Value, Hour, Minute You can compare indicator: Accelerator/Decelereator (AC), Accumulation/Distribution (AD), Movement directional Index (ADX), Aligator, Awesome oscillator (ATR), Bollinger bands, Bears power, Bulls power, Bill Williams Market Facilitation Index (BWMFI), Commodity Channel Index (CCI), Demarket, Envelopes, Force index, Fratals, Moving average, MACD, Money Flow index (MFI), Momentum, On Balance Volume (OBV), Relative Strengh Index (RSI), Parabolic Stop and Reverse (SAR), Standard Deviation, Stochastic, William’s precent range (WPR) You can create multiple condition check through AND and OR operation You can create price check / indicator price check through > (large than) and < (smaller than) and equal operator What couldn’t this EA Builder do However, this EA builder is only limited to certain feature, there are limitation as below This EA builder only support general stop loss and take profits pips. For example, if you have 10 trades, then you have all the same stop loss of 10 pips and take profit of 20 pips, given you set the stop loss and take profit pips to 10 and 20 pips respectively. Single lot size for all trades. You couldn’t change the lot size . It is fixed. The operator is limited to just > (larger than) , < (smaller than) and equal operator. There are more that you will need, for example >= (larger and equal), <= (smaller and equal) Although the multiple condition check could be checked through AND and OR , but there are mode details operation could do through criteria check. Most of the EA Builder couldn’t do this. You could either create the EA yourself through learning MQL4 language or hire an expert programmer. How to use this EA Builder to build your EA Let me show you how to build the EA through this EA builder as an example How to install the downloaded EA in Metatrader 4 Next you are ready to install the downloaded EA in your Metatrader 4. You could follow this step by step to install your EA in the metatrader. ~I hope you learn the knowledge and solve your problem. Follow us for more incoming new tips. Thank you for reading and happy learning.
EA Builder is a piece of PC (Computer) software or a web-based application that would help a trader to build EA Expert Advisor for robot trading in MT4, without any knowledge of MQL4 programming language. For a newbie that would want to try out to build EA, then I advise you can try to use EA Builder to build your first EA. There are several of EA Builder softwares are available in the market, few of them are free, and some are premiums. I will review (coming soon) on the EA Builder in separate posts. In this article, I will describe on EA Builders in details as below What is EA Builder Compare EA Builder with professional EA programmer Is EA Builder secure? Can owner of EA Builder know my trade secret ? What is the benefit of EA Builder What is the limitation of EA Builder What is EA Builder? EA builder is a piece of software codes that is written to help build EA robot file (.mq4) without programming knowledge. There are two types of EA builder in the market PC version of EA Builder (in Windows OS or in Macintosh OS) Web version of EA Builder Either is PC Version of Web version of EA Builder will generate .mq4 file to be used in the MT4. I will teach you in another post in how to use the .MQ4 in MT4 (coming soon). For PC Version of EA Builder, you are needed to download and install the EA Builder software in your PC. It depends on the software provider if it supports in Windows OS or Macintosh OS. For Web Version, you are just needed to open a web browser like Chrome / Safari or Mozilla Firefox to build the EA robot from the Web interface. For most of the EA builder that I used, the criteria are set through user interfaces provided by the EA Build. The problem is how user friendly the user interface is, whether easy to be used or need a list of tutorials to learn before master it. Compare EA Builder with professional EA programmer with learning MQL4 programming When you want to build a EA, there are 3 ways. Hire a professional EA programmer Use a EA builder to help you Learn the MQL4 programming and build EA yourself Question is how which is most suitable for you? It depends on your budget, your patients and your complexity of EA that you want to build. These are my suggestions Hire professional EA Programmer If you need to build the EA in short time, for example few days or in one week, If you have enough budget If you do not have patience to build your own robot If you have a high complexity Robot that you want to build If you have no programming logic and weak in mathematic I suggest you go ahead to hire an EA programmer expert Use a EA Builder If your EA is simple and not too complex If you want to build EA without spend time to learn MQL4 Programming If you are good in logic I suggest you go ahead with EA Builder Learn MQL4 Programming If you have patience to learn MQL4 programming knowledge If you have complex EA robot to build If you are good in logic I suggest you learn MQL4 programming Is EA Builder secure? Can owner of EA Builder know my trade secret ? It depends on the nature of EA builder where it is built – whether it is web version or PC version. For PC version, I would say it is pretty safe to use it and your trade secret will not be copied. On the other hand, if is web version of EA builder, there is a possibility that a copy of your EA robot will be copied in the server. Therefore, it is important to choose an reliable EA builder service provider. What is the benefit of EA Builder The main advantages of using EA builder is to fasten the process of EA (Expert Advisor) Robot building. You can build EA / Robot without any knowledge of MQL4. By choosing the correct criteria, trade settings, you can build EA in few clicks. In prior to that you must know your trade criteria then only could use the EA builder. I am covering the method how to build a robot through EA builder this in this topic(coming soon). What is the limitation of EA Builder There are still limitations on building robot through EA builder. There are as below: EA builder features depends on the service providers. Most of the EA builder service providers are just could compare basic logics/ indicators/ price. EA builder couldn’t create complicated robot criteria that needs deeper calculations Next, I’ll talk about how to create your EA / Expert Advisor through the free EA builder Free EA Builer Review
Before you start any programming, you should know the origin of MQL4. What You’ll Learn In This Post What is MQL4 What MQL4 can do or cannot do What are the MQL4 applications that can build MQL4 or known as MetaQuotes Languages 4 is a script based command written by MetaQuotes Software corporation. Below are the feature of MQL4: It is to help forex trader to create own robot to manage the trade, which includes create trade, modifying trade, and as well as closing the trade. MQL4 embeds all the features that you can used in MT4, such as indicators (moving average, RSI (relative strength indicator), MACD) It can also helps to automatically update MT4 objects such as (fibonacci, trend line and more) It inherits all the behaviors and limitations from MT4: Account lot size limitation, buy stop and sell stop limitation from the price, and buy limit and sell limit limitation from the price. MQL4 is just a set of English words to form a series of commands. Imagine that, you learn a set of hand gesture commands to command your dogs to stand up. In MQL4, MQL4 are the special commands that are written in English, a set of MT4 commands to order MT4 to work accordingly. Sound simple right ? You just need to learn the commands to give order to MT4. MQL5 is a accessor of MQL4. Nevertheless many of the Forex broker is still using MQL4 and it is popular among the forex broker due to stability. MQL4 has a similar concept of C++ programming which is using object oriented. It is easy to be used and written as all the syntax and functions are well defined and documented in the MQL4 documentation. Having says that if you are a C++ programmer, then this will be a piece of cake for you. You can go ahead to program your EA. Nevertheless, for most of the Forex traders, you have no programming background. Before you start program, you might have fierce to learn how to write. But I can guarantee you, MQL4 is not that hard to learn. You do not need to learn all the functions / syntaxs / object oriented in MQL4 feature. From my 10 years programming experience, you just need to know the core of the programming and learn what you need to do. For example, if you want to learn how to analyse the different symbols of the markets, then you should learn the indicators. On the other hand, if you want to learn how to create your on bot for trading, then you should learn the skill to create an EA (Expert advisor). In short, if assume that there is 100% of the knowledge of MQL4, but you just need to learn 50% of it than you are fine to create your own robot. You do not need to learn all the technical terms. Just to be keep in mind of it. Learn what you need. Same set of MQL4 commands can be built for 3 main purposes: Expert Advisor or EA or Robot Expert Advisor is a sets of commands that will check on your trading criteria on each of the price changes. In MQL4, the price changes is called Tick changes. On each tick changes, then your trading criteria will be checked if it is matched and perform actions. So, your task is to rovide a set of criteria on the EA in order to perform actions on your trade, i.e. open a new trades. Indicator For trader who want to write indicators to draw own lines and objects on the chart to ease the analysis work. Then indicator is the feature you should look into. Take an example of moving average, if you want to create own line like moving average with your own mathematic algorithm, then you should write your own indicator. Then indicator could be shown in the chart. Script Script is a one time used command execution. Unlike EA / Expert advisor, the checking will not be repeated on each price changes. Script will only be executed once on appended to the chart. In the scenario where you want to check all of the symbol for each of the day and generate report, then you should use script to help you execute the tasks. Or if you have a script to help you close all of the active trade in your list without any hassle to close it one by one, especially during the critical time, then you should use script. So these are the introduction of the MQL4 for a MQL4 newbie. Have a look in other post to learn and understand more on MQL4. I have described this in video as well