Expert Advisor Settings & Modifications

PLEASE NOTE: Modifying the Expert Advisor (robot) source code is completely OPTIONAL and is only for those who have some coding skills and would like to experiment with different ideas for signal logic. If you are not familiar with coding, then please don't mess with the code. It's not for everyone but I like to make it available for those who would like access to it (assuming it was included in your purchase). I have provided many notes inside the code to help you identify what many of the lines of code are for and what they're doing. Have fun but please make a copy of the EA before messing with the code (save the file as a different name before making changes to the original code). If you happen to mess it up, you can always download a fresh copy from your Account so don't panic if you do happen to screw it up. See #13 below to identify your errors.

1. Open your MetaTrader trading platform and open the MetaEditor by clicking on the icon at the top of the charts.

1. Open MetaEditor

2. The MetaEditor will appear like this when it opens with a list of folders on the left side. If the list of folders does not appear, go to View and click Navigator and they will appear...

2. Blank Editor Opened

3. Click on the Experts folder to open the Expert Advisor files.
4. Double click on the Roulette Trader EA you want to open from the left column. The code will open on the right side. At the top of the code, I've included some notes for your reference. If you ever change the settings, you can refer here to get the original settings back. This includes the Stop & Limit (profit target) and the money management settings. I've also included the signal logic here too so you know what the entry strategy is.

4. Default Settings4

5. Scroll down the EA code just a little and you will see a section labeled MONEY MANAGEMENT SETTINGS. This is where 90% of your money management settings are located. I've included notes after each setting to explain what it is for. The settings you can change are in green font or the blue true/false settings, but I don't recommend changing anything unless I've included a note about what it's for.

5. MM Settings2

Please note that the Stop Loss & Profit Target are in pips, not dollars. Changing these will completely change the trading results so feel free to test different settings here. After making any changes, click COMPILE at the top of the window to save the changes.

6. Many of my trading systems use a distance calculation and this is where the settings are for this. There are 4 possible distance settings and 3 different moving averages to measure price from too so there is a lot of flexibility here.  You can even use these to measure distance between 2 moving averages or distance between price now and price X bars ago. The possibilities are endless so get creative and have fun!

6. Distance Settings3

7. The next items in the source code are these Misc. options. Some of these are great to have and make experimenting with different ideas very convenient. You can disable the longs or Shorts with a simple True/False setting here, and even REVERSE your trade signals here with the "Reverse Strategy" option. If you discover a really horrible trading strategy by accident, just reverse the signals here and see what happens. I've included notes on each item of significance so just read my notes and please don't ask me about the Virtual Stops/Limits. I have never used them in live trading but if you have a dishonest broker that likes to hunt stops, then you might want to try this feature out but always place a hard stop 10-20 pips beyond your virtual stop as a 2nd line of protection.

8. Misc Settings

8. Scroll down a little more and you will come to the code for the 3 Simple Moving Averages. The SMA settings are blacked out. I can't give away my signal strategy, right?  :)

9. Next comes the 2nd part of the Money Management code. This is where you convert the money management from the Consecutive Wins strategy to the Cumulative Wins strategy, and switch between Cycle Targets and Stay at Max lots. Instructions are included after each line of code.

9. Money Management code

10. Next is the Entry Signal Code. You may customize this any way you'd like if you know what you're doing.

10. Entry Signal Code2
12. That's all there is to it! Before making any changes to the code, I highly recommend saving an original copy of your EA that you won't be making changes to so you always have the original in case you mess something up. Again, click COMPILE after making any changes. That will save it and check to see if all your code is correct. If there are errors somewhere, it will not compile and you will not be able to attach it to a chart.

13. If there is an error in your code, you will get an error message like this when you compile. It tells you what the error is and "approximately" where it is occurring. In this example, I removed a semicolon from line 337 but it's telling me the problem is on line 339 so the problem will not always be on the line it says it is.

11. Compiling Error

Copyright 2021 - Roulette Trader - All Rights Reserved