Next Video Okay. Now, it is going to be interesting. We are putting it all together. Hit the F4 key to bring up Meta Editor and fill in some additional lines here. The first one will check if the number of open orders is zero. We only want to open a new position if we don’t have one. The next line will check if it’s going up. And, if those conditions are true, we open a new order. You might have to change this part to zero depending on which broker you use. You might need it to change zero but that will mean you don’t have any take profit value. Okay. Let’s compile the EA. No errors and no warnings. In Meta Trader, hit Ctrl + R to bring up the back testing module. And now, we are going to do a back test. Mark the Visual mode and select the range from January 2013 to December 2013. Make sure you have chosen the right EA and the right symbol here, and hit the Start button. It works. And we have first results here and you see it’s making profit. Congratulations! You have just written your first profitable EA.