I might be interested ;)
So you want to determine from trading history the better stop levels for the trading "expert"?
A list with the currency and settings used?
I have plenty of OO experience...
@ugo58: Yeah definitely could help with better stop levels. The applications for MAE is quite endless for trading analysis.
We've seen so many systems in Signals etc, which leaves trades open for extended draw-down hoping it comes back into profit. These strategies do-not show the amount of risk || draw-down associated with the strategy. This'll help put an end to that.
We talk allot about the Coin-Toss analysis on the forums: Examples:
The problem is Avg_Loss doesn't provide a good measure of risk. The Avg_DrawDown per Deal (in mql5_words) is what I'm trying to capture.
A list of "currency and settings used" is one I haven't really taught of. Could you expand upon what you have in mind?
I have some questions:
-1) It seems mql5 doesn't like the it when you place files directly into the Tester Folder. Something like C:\MetaTrader 5\Tester\Agent\MQL5\Files. So therefore I had to place the files in the C:\MetaTrader 5\MQL5\Files and then tell the Expert_Advisor the filename is "Report.htm". Is this really how it Needs to be done?
2) If number one is the case, how is it possible to save files during testing into the C:\MetaTrader 5\MQL5\Files folder?
3) Will the tester generally delete any files within the Tester\Files folder when upon Start_Up?
4) If all the above is True, I do-not really like what I'm seeing. Any Ideas about the easiest ways to get non-programmers to place a Report_File into the File* folders? With UAC enable, I think the paths gets confusing, am I wrong here?
5) metaQuotes provides another option with NamePipes, of-course thats the next thing I'm gonna research. Anyone have a better experience with that? Any Limitations vs the File()?
6) metaQuotes provides a healthy number of fileOpen classes however allot of the examples I've seen do-not utilize the Standard Classes ... any ideas why?
Already.... Little baby step here.
For someone following this thread and learning OOP like me, Attached is my Little "Hello_World" like program in mql5 OOP. There isn't much there but I think I got to print the Handles Both as Object and Data. Objects sure are funny, they stack_up these Methods which wasn't quite obvious they had, yet I still cannot just Print them directly. I feel less powerful but still excited :)
Is there anything which I'm doing really wrong?
At this time, I'll like to Switch Gears and research "Self Documenting Codes", "Version Tracking", "Unit_Testing". Man, I still don't have any Idea how I want to deal with "Error Handling" Sigh. There are some Articles I have in mind. If you guys can recommend other things please do.
Well, I did not ment to analyse the parameters but to keep a way to differ the trading logic used. But this may some steps to far ahead.
To keep it easy one could take care that only one trading strategey takes place at a certain time and filter according to start and end time.
(I am developing an multicurrency EA with adaptive strategies therefore I see the world more complicated ;)
Did you read this article?
Woah... That article sure looks great . Thanks Man. I'm sure your complexity will pay off in the end.
As I would like to continously adapt the MAE, MFE on a running expert I think the code to calculate the values should be based on a common structure.
Check this article, too.
So the code could be indepent wherever the deals are read from.
For this kind of calculation it might sufficent to record only the exits. If you have an in/out than split the record into an "in" and "out" record.
So you could use the struct of this article as a basis model for the deals (fill the same structure from the html-parser and write to csv):
//--- take over Deal properties from the history and offer a method to read from and dump to a CSV file
string symbol; // Symbol
string comment; // Comment
ENUM_DEAL_TYPE type; // Deal type, SELL or BUY
double price; // entry price
double profit; // Profit/Loss
double volume; // Volume
double swap; // Swap
double commission; // Commission
datetime entrytime; // entry time of the deal
datetime exittime; // exit time of the deal, on exit fill both values below
double mae_price; // Maximum Adverse Excursion price, filled on out
double mfe_price; // Maximum Favorable Excursion price