
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i've got a problem in undestanding the backtesting function of mt4 and i hope you can help me.
Till yet i tried to backtest my EA using the normal backtest function of metatrader4.
But now i have to test a big amount of different property settings.So the problem is, that MT4 is to slow to test all of the property settings in short time.
Then i had the idea to write my own test function in C++, so i did.
So i exported the data from MT and used it for my own BT function.
I used the data for the first tick in each bar.
But i have calculation errors on things like:- StopSell Function
- TakeProfit Function
- and how the Profit is calculated exactly.
in the end the results of my test calculation and the MT4- calculation don't match.
There is maybe something wrong with my code, or MT tries to disturb the results i don't know.
I hope You can help me with this.
thx
Here is my c++ code how i calculate my TP,SL and Profit