Discussion of article "Optimizing a strategy using balance graph and comparing results with "Balance + max Sharpe Ratio" criterion"
Hey for some reason my file won't include the balanceregression. Any way to troubleshoot this? I have it saved in my files and under include.
1. Read the error description and check your paths.
2. If you have any mistake, please provide reproducible results: at least you need a complete code and at least you need proof of the presence of files in the specified folders.
have a general question : why when we are populating arrays of trade results, we only consider trades with positive balance impacts? i.e. why arr_profits is only filled with trades of (commission + swap + profit) > 0.0 ?
aren't the dips in the balance curve (which are the results if loss of trades ) also affecting the LR line and hence the GetProfitStability?
I got some errors when I tried to compile BalanceRegression.mph:
The two commented out lines generated the following error - after digging around a bit, I found that the alglib library was updated.
The updated lines compile and the code runs, but I've never used CMatrixDouble before, so I'm not 100% sure that the fix is correct.
operator[] constant variable cannot be passed as reference
CMatrixDouble xy(arr_size,2); for(int i=0;i<arr_size;i++) { //xy[i].Set(0,i+1); //xy[i].Set(1, arr_profits[i]); xy.Set(i, 0, i+1); xy.Set(i, 1, arr_profits[i]);
Also, the commented out line, in the same file, returned undefined variable - again, I think it was due to the alglib update:
//double TrendMSE=linear_report.m_rmserror; double TrendMSE=linear_report.m_RMSError;

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Optimizing a strategy using balance graph and comparing results with "Balance + max Sharpe Ratio" criterion has been published:
In this article, we consider yet another custom trading strategy optimization criterion based on the balance graph analysis. The linear regression is calculated using the function from the ALGLIB library.
MACD Sample balance regression.mq5, EURUSD, H4, no forward test
The following parameters are selected for optimization:
Pic. 19. Tester, Inputs tab
I will conduct the same three tests for MACD Sample balance regression EA:
Author: Vladimir Karputov