The first step to creating an EA is to think of the strategy. Step two is to write the code and step three involves testing and debugging that code. Guest post by FXTM Best practice When coding an EA, there are some principles of best practice that you should keep in mind whilst you go through the steps mentioned above. Design like a programmer Clearly, if you have no background in coding, creating your first expert advisor will require a fair amount of time and hard work. But even if you are not a programmer it is important to work like one. That means being organised and precise in your approach to coding. Your EA will require rules and these need to be well planned out in order to avoid problems in the future. It also means analysing your strategy first hand and being able to anticipate potential areas of inaccuracies with your system logic. Prepare for the unexpected One area of coding that doesn’t require any specialist knowledge is in the planning stage. Financial markets are never completely predictable which means there needs to be some margin of safety applied when you build your strategy. The obvious answer to this is that you should never create a system that is leveraged to it’s full potential. Far better to reduce risk by a certain percentage or even one half. This will allow your code to withstand the volatility when unforeseen events strike. Take it slow As mentioned above, building an EA from scratch requires working like a programmer does and that means writing out the code in stages, one step at a time. In MQL (MetaQuotes Language), you can start with the header first. Then initialise your special function, then start the special function and then de-initialise. Taking this approach means that debugging the code at a later date will cause fewer headaches. Keep it simple Like most things in life, it pays to keep things simple and with system design this is something the experts nearly always espouse. Trading systems can be complex but with each complexity added to a system the harder it becomes to confirm it statistically. In other words, systems with too many levels may not replicate their back-test results in future trading and even if they do, confirming this with statistical analysis will require a lot more work and uncertainty. It is much better to create a simple strategy that conforms to your trading philosophies and can be tested thoroughly. That way you will have much more confidence to follow it in real time. Guest Guest View All Post By Guest Basics & IndustryForex BasicsForex Software share Read Next Fears grip markets over Chinese data Scott Smith 8 years The first step to creating an EA is to think of the strategy. Step two is to write the code and step three involves testing and debugging that code. Guest post by FXTM Best practice When coding an EA, there are some principles of best practice that you should keep in mind whilst you go through the steps mentioned above. Design like a programmer Clearly, if you have no background in coding, creating your first expert advisor will require a fair amount of time and hard work. But even if you are not a programmer it is important to work… Regulated Forex Brokers All Brokers Sponsored Brokers Broker Benefits Min Deposit Score Visit Broker 1 $100T&Cs Apply 0% Commission and No stamp DutyRegulated by US,UK & International StockCopy Successfull Traders 9.8 Visit Site FreeBets Reviews$100Your capital is at risk. 2 T&Cs Apply 9.8 Visit Site FreeBets Reviews$100Your capital is at risk. 3 Recommended Broker $100T&Cs Apply No deposit or withdrawal feesTrade major forex pairs such as EUR/USD with leverage up to 30:1 and tight spreads of 0.9 pips Low $100 minimum deposit to open a trading account 9 Visit Site FreeBets ReviewsYour capital is at risk. 4 T&Cs Apply Visit Site FreeBets ReviewsYour capital is at risk. 5 Recommended Broker $0T&Cs Apply Trade gold, silver, and platinum directly against major currenciesUp to 1:500 leverage for forex trading24/5 customer service by phone and email 9 Visit Site FreeBets ReviewsYour capital is at risk.