Adding the lot size bar that looks like the one used in live trading is certainly a good improvement on the implementation from the last article. I know that the implementation in this article is mainly for testing out or backtesting ideas, so a static lot size can be reasonably, but I personally would prefer using a lot size that is based on the account's percentage. That way, the 0.1 lot on the "increase/decrease" button would mean 0.1% of account balance instead. I just feel like this would make me see the impact of the strategy on my account, disciplinarily speaking. It can also help with calculating risk on any trade I want rather than putting lot sizes that I have little idea on how it would impact the account balance.
Anyways the code is there for me to tinker with, I am just commenting this idea for those that would also want to consider it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Check out the new article: Developing a Manual Backtesting Expert Advisor: Additional Features.
We enhance the manual backtesting EA with real-time lot adjustment, an order module for buy/sell stops and limits, and a Trade Manager to modify TP/SL and close positions individually. The article explains control setup with CButton/CBmpButton/CEdit, logic in OnTick, and workarounds for Strategy Tester input constraints. Readers can reuse these components to speed up testing workflows and implement robust trade management.
In the previous article, I wrote about Chart Replay Pro, a manual backtesting Expert Advisor that I developed to manually test strategies in order to see if they work as well as obtain feasible parameters before automating them. Since publishing that article, more than a hundred people have downloaded the Expert Advisor and reviews have been positive, signifying that Chart Replay Pro, despite being a simple Expert Advisor, is quite a powerful and useful tool to any trader worth their salt.
As much as I liked its simplicity, the fact that it didn’t have much control in terms of precise trade adjustments like in live trading bugged me. I partially expressed this thought in the previous article as I ended it by stating, “Future improvements I plan: on-the-fly lot changes and individual-position close buttons.” Well, welcome to the future. In this article, I cover three additions: (1) a Lot Adjustment system that works without closing and restarting the EA in the Strategy Tester, (2) a Trade Manager for individual positions (instead of closing all trades), and (3) an Order System for buy/sell stop and buy/sell limit orders. This will add the control over trades and trade adjustments I yearned for. I shall also address the challenges I faced when bringing these new features to life so that you, the reader, don’t have to go through such roadblocks if you were to develop such a system.
Author: Stephen Gathumbi Ndiba