How to use the robot
Choose your platform below (or at the top of the algo builder). It takes about five minutes the first time.
1. Add the code
- Click Download above to get the file MyRobot.mq5.
- Open MetaTrader 5 and press F4 to open MetaEditor, where code is edited.
- In MetaEditor choose File → Open Data Folder, open MQL5 → Experts and copy the file there.
- Double-click the file in MetaEditor and press Compile (F7). It should say 0 errors.
2. Turn on algo trading
- Back in MetaTrader 5, open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh.
- Open a chart for the market and time frame you want and drag the robot onto it.
- In the window that opens, go to Common, tick Allow Algo Trading, check the Inputs and press OK.
- Switch on Algo Trading in the toolbar – the button should be green. Messages from the robot appear under Experts in the Toolbox (Ctrl+T).
3. Test it in the strategy tester
- Open the Strategy Tester (Ctrl+R).
- Choose the robot, market, time frame and a period of at least one or two years.
- Choose Every tick based on real ticks if available – it is the most realistic.
- Press Start and look at the Backtest and Graph tabs.
1. Add the code
- Click Download to get MyRobot.mq4.
- In MetaTrader 4 choose File → Open Data Folder, open MQL4 → Experts and copy the file there.
- Press F4, double-click the file in MetaEditor and press Compile (F7).
2. Turn on algo trading
- Open the Navigator, right-click Expert Advisors and choose Refresh.
- Drag the robot onto a chart, tick Allow live trading under Common and press OK.
- Switch on AutoTrading in the toolbar. A smiley in the top right corner of the chart means the robot is active.
3. Test it
- Open the Strategy Tester (Ctrl+R), choose the robot, market and period, choose Every tick and press Start.
1. Add the code
- Click Copy the code above.
- Open cTrader, go to Algo and the cBots tab.
- Click New, give the robot the same name as in the algo builder, choose C# and From scratch, and click Create.
- Delete the template, paste your code and press Build (Ctrl+B).
2. Start the robot
- Click Add instance, choose market and time frame, check the parameters and press Start. Messages appear under Log.
3. Test it
- Choose the instance and the Backtesting tab, choose a period and Tick data, and press play.
1. Add the code
- Click Copy the code above.
- Open a chart on TradingView and click Pine Editor at the bottom.
- Choose Open → New strategy, delete the contents, paste the code, click Save and then Add to chart.
2. Read the result
- Open the Strategy Tester tab to see the equity curve, number of trades, win rate and drawdown.
- Click the gear icon on the strategy to change settings without touching the code.
- Add commission and slippage under Properties to make the test more realistic.
Before you use real money
- Test over a long period. At least one or two years of data, and preferably several markets.
- Include costs. Use realistic spread and commission in the test.
- Run it on a demo account for at least a few weeks and compare with the test.
- Start small. Use low risk per trade, for example 0.5%.
- Keep an eye on it. A robot can make mistakes around gaps, news or connection drops. Check it daily.
- Have a plan to stop. Decide in advance how large a loss makes you switch it off.
Learn to build it yourself
The free course Algorithmic trading covers testing, improving and building robots step by step.
Frequently asked questions
Is the code safe to use?
The code is generated in your browser from the choices you make and is easy to read. It only does what you chose. But a robot that is technically correct can still lose money, so always test it in the strategy tester and on a demo account first.
Will the robot make money?
No one can promise that. The strategies are well-known, simple strategies used for learning, and many of them lose money in many markets and periods. The algo builder is a tool for learning and testing – not a money machine.
Which platforms does the code work on?
MetaTrader 5 (MQL5), MetaTrader 4 (MQL4), cTrader (C#) and TradingView (Pine Script v6). Skilling offers all four platforms.
How accurate is the quick test?
It is a rough first impression. It uses one closing rate per day from Norges Bank, does not see intraday moves and holds one position at a time. Use the strategy tester in your platform for a thorough test.
Why does the robot not open any trades?
The usual reasons are that algo trading is switched off in the platform, that the filters stop the signals, that the calculated size is below the minimum, or that there simply has not been a signal yet. Check the log – the robot writes a message when it skips a trade.
Why are the code comments in English?
Because English is the standard in MQL, C# and Pine Script, and it makes it easy to get help in forums and from the platforms’ documentation.
Disclaimer
The algo builder and the code it creates are made for learning and testing. The code is provided “as is”, without any warranty that it is error-free or fit for a particular purpose. Norz Trading is not liable for losses resulting from use of the code. This is general information, not personal investment advice. Past results and backtests are no guarantee of future returns. Risk warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 65% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.
A Scandinavian broker with low spreads and the platforms you already know – Skilling Trader, cTrader, MetaTrader and TradingView.
- Spreads from 0.1 pips1,000+ instruments
- Four platformsSkilling Trader, cTrader, MetaTrader, TradingView
- Lloyd's account insuranceUp to €1 million per account
- Free demo accountPractise with real prices, no risk

65% of retail investor accounts lose money when trading CFDs with this provider.