
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
fxsaber,
Thanks for your fast reply.
Your suggestion solved the total number of trades discrepency, I tried to call Stop() using the define VIRTUAL_CLOSEALL_BYEND on top of the code.
I also add a IsNewBar test to have less trades.
But according to me the balance, should be the (initial deposit - profit) and profit should be (initial deposit - tradeloss + tradeprofit), as we can see in the backtester results for the real TS.
So the balance is correct, but the profit can't be (balance - equity) as it is defined in Orders.mqh
I don't understand neither why AccountInfoDouble(ACCOUNT_PROFIT) return 0 for the real TS.
Am I wrong?
fxsaber,
Thanks for your fast reply.
Your suggestion solved the total number of trades discrepency, I tried to call Stop() using the define VIRTUAL_CLOSEALL_BYEND on top of the code.
I also add a IsNewBar test to have less trades.
But according to me the balance, should be the (initial deposit - profit) and profit should be (initial deposit - tradeloss + tradeprofit), as we can see in the backtester results for the real TS.
So the balance is correct, but the profit can't be (balance - equity) as it is defined in Orders.mqh
I don't understand neither why AccountInfoDouble(ACCOUNT_PROFIT) return 0 for the real TS.
Am I wrong?
So not a very elegant way of solving the issue, still have to investigate for the Virtual TS :
But according to me the balance, should be the (initial deposit - profit) and profit should be (initial deposit - tradeloss + tradeprofit), as we can see in the backtester results for the real TS.
So the balance is correct, but the profit can't be (balance - equity) as it is defined in Orders.mqh
I don't understand neither why AccountInfoDouble(ACCOUNT_PROFIT) return 0 for the real TS.
Am I wrong?
ACCOUNT_PROFIT is equal to the sum of the profits of all current open positions.
So not a very elegant way of solving the issue, still have to investigate for the Virtual TS :
fxsaber,
Once again thanks for your support and your reactivity.
I update a little bit the code agin, and I tried to separate the use of TS environnement.
I understand the result when we are using real or virtual environnement. Results are as expected.
I don't understand the results when we try to use both environnement at the same time.
Would it be possible to extract as a CSV file the list of orders?
Best regards,
och
I don't understand the results when we try to use both environnement at the same time.
The library has many use cases. You are looking at an example of a general view.
Would it be possible to extract as a CSV file the list of orders?
In the example below, you can change the trading environment in the input parameters: real or virtual.
The lines at the bottom create an HTML report. If you enable the DLL, then this report will automatically appear in the browser at the end of testing.
Dear fxsaber,
Thank you for your kindness.This tool is very useful.
Is version MT4 of this program available?Is version MT4 of this program available?
Forum on trading, automated trading systems and testing trading strategies
Libraries: Virtual
fxsaber, 2019.04.29 19:30
Last version.
Never take files from a zip archive in the codebase.
Never take files from a zip archive in the codebase.
I download zip archive in the codebase and compile source. It is work correctly.
All zip archives contain old versions of the libraries. To get a new one, you need to download each file manually.