Source Code for cBot backtested using 4 broker and 5yrs of data

Created at 12 Aug 2019, 21:15
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
lec0456's avatar

lec0456

Joined 14.11.2012

Source Code for cBot backtested using 4 broker and 5yrs of data
12 Aug 2019, 21:15


I am offereing the source code(over 6000 lines of code) for a cBot that targets a maximum of 3% profit daily and has a maximum drawdown of less than 24% over 5 yrs.

The chart above shows the results for the Bot with a starting balance of $1000USD, including Net profit, %gain over the previous version,  MaxDraw down(MxDD), Average Daily Pips, total trading days in the period, and the source code build number. The little green light is just a flag to highlight if the MxDD is greater than 30%.

It manages trade volume by using a risk level parameter from (10-1). At the highest setting it targets 3%, at a 5 risk level, it would target half the max profit or 1.5% and the MxDd would drop by half to less than 13%. The Bot is optimized and tested on the EUR/USD only.

This Bot includes source code for custom indicators including Price Channel, Market Hours, Daily divider, SMA Difference, SMA Slope Sum, and SMA Peak Difference.

The Bot includes code to write to SQL Server or MSAccess Databases, and create an external log file. I will include an SQL script to create the back end SQL database. I use an SSAS cube to analyze results and generate reports but that would be an add-on, if interested. I would include the ability to query a Microsoft Data Mining Structure for ML/Quant trading with the add-on.

The Bot includes 10 trading strategies that use a technique to reverse direction under certain conditions. This includes a New York Session trade, Tokyo Session Trade, Pull Back Trade, Fibonacci Trade, Bollinger Pct B Trade, etc. It provides position management code that will close a position early, set the SL or adjust the TP.

It uses a modified dynamic martingale strategy to protect an open position using an average position price to close in profit. It can also modify multi position SLs depending on market conditions.

If you decide to live trade this Bot, I would recommend trading at least 3 currency pairs at a 4 risk level and a maxDD Stop of 15%.

I will include 40 hours of consultation with the Bot. Obviously, I can't guarantee any future results. What you would be getting is the foundation code that could be adapted to build any Bot you wish, you will see how various trading techniques are implemented in an algorithm, along with an example of a Bot that can successfully backtest a full 5 years without crashing. The source code represents thousands of hours of work over 7 yrs.

Here is an example of the equity chart for the 2nd half of 2018 (prd 10 above).

If you are interested contact me at lecespedes@hotmail.com


@lec0456
Replies

prlozc
18 Jul 2021, 01:25

Over 6000 lines of code!!


@prlozc