6.1 Use the algo builder as a starting point
You have now learned all the parts a robot is made of. In the algo builder you can put them together in a few minutes – and get finished code for MetaTrader 5, MetaTrader 4, cTrader or TradingView.
What the algo builder produces
| Part of the code | You learned it in |
|---|---|
Input parameters / [Parameter] | Module 2 |
| New candle and events | Module 2 |
| Signal from indicators on candles 1 and 2 | Modules 2 and 3 |
CountPositions and magic number / label | Module 3 |
LotSize with risk in % | Module 4 |
Trailing stop and break-even in ManagePositions | Module 4 |
| Trend, time and spread filter | Module 4 |
Order check and Print to the log | Module 4 |
How to go about it
- Choose platform and strategy in the algo builder.
- Read the summary “Your robot” – does it match your rulebook?
- Download or copy the code, and add it to the platform.
- Read the code. Every part is commented. Find each part from the table above.
- Backtest with realistic costs.
- Change one thing at a time, and test again.
Everything can be changed
All the choices you make in the algo builder become settings in the code. So you can turn the trend filter on or change the stop loss directly in the platform – without generating the code again.
Compare with your own
Have you written the MA crossover robot from module 3 yourself? Create the same strategy in the algo builder, and compare. See how risk calculation, filters and error handling are built in – and move what you like into your own code.
Try it yourself
Choose a template in the algo builder and run the quick test. Change one setting and see what happens.
Key takeaways
- The algo builder puts together all the parts you have learned in the course.
- All choices become settings you can change in the platform.
- Read the code, test it, and change one thing at a time.
65% of retail investor accounts lose money when trading CFDs with this provider.