
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 haven't dealt with the Expert Advisor yet, but I use a similar code to calculate equity
I suggest equating the variable to the balance during initialization as the second option
In this case there will be no need to check equity before running the EA,
Because its equity is equal to the balance before the start of the Expert Advisor!
Vyacheslav.
For now, the tester can only empirically assess risk on single pairs.
An analytical estimate of risk for this tactic has not yet been derived.
A very good strategy,
...
the other issue is that withdrawals are made after a year or two
In other words, if you are not in such a hurry to withdraw, and the deposit size is immense, it makes no difference which way you open - sooner or later you will be in the black.
To avoid such situations it would be better to add a simple thehanalysis and to avoid being overly concerned choose a period of a day.
Thank you for your answer, respected Mr. Reshetov. I've already realized myself that these lines are for safety precautions, something like {try...catch} in other languages. Especially, in the test I've really never entered Closeby function.
I seem to have created something for the test. Although I still can't rule out errors, I thought I'd show you something I've been working on. I plan to do it on Finlist (I feel more comfortable there), but since Yuri is on this forum I'll probably start here.
In general, what you will see here will help you understand how EA's signals are generated.
So far I have added a version 1.1 of the EA algorithm. Yuri keeps giving me new versions and I have to dig them like a snail. It seems to be the same as version 1.1 but sellprofit has >0.001 instead of 0.01.
The test is carried out according to my plan, so don't be sorry. It means that my depo for now is $1000 and therefore I have a limited number of pairs in use. So far I only use one EUR group. I limit the test to 24 hours. My program is flexible and of course I may set duration of 2 or 10 days. But for the time being I don't care about that, what is important is a general understanding of the algorithm. Especially since it still takes a long time to calculate. Test day is half an hour calculation, it's because of view table (see below). It's very long, but I'm actually outputting all variable assignments to the table and stuff. I even envy the MQL test - how fast they make everything run. Of course, everything is done in a more professional way, but you won't see everything there. But for me it is one grain at a time - but I have a clear view.
Some explanations. My quotes are specially prepared - it means that they have holes and so on. Such processing takes time as long as I don't want to load fresh data and I have the range of historical quotes from 01/01/05 to 16/09/06. So the test is within those limits and that's enough for me for now. Yes, the quotes are forexclub, minute and taken from forextester.
I provide 3 tables where you can see all the developments:
1) _history - it is similar to "Account history" in mql, but only open and closed orders are located together, the sign of separation is field [flag]. Everything is clear there. Field id_operation: if "1", it's BUY/.
2) _resources: total balance, equity and profit by open orders at the current moment of time for all involved currency pairs. Everything should be clear here too, except the [ID] field - this is my internal date identifier. I can explain in more detail, if you have any questions, but in general, what date it corresponds to can be seen in the third table _view, where everything is detailed, and in _resources the total of each minute is displayed.
3) _view - everything is very detailed, for each currency pair there is a different history of transaction development. The [Actual_price] field is the Close of a minute quote. Bid, Ask - I get +-spread (spread is taken from Alpari, but because everything is in tables, I can correct it, but I don't see much sense, anyway everything is approx.) And data reading is very simple - the first version of the EA, and the row number will be a pointer, and in what place was the assignment in the variable (for example, the field [money_54] corresponds to 54th line of the EA, where money is recalculated. If "0", it means, there was no calculation in this place, because there were no corresponding conditions) . Check comment field, operations are documented there and correspond to history in table _history. Yes, one possible misunderstanding. The Itog_profit field is the total profit for the current moment of the open orders for the given currency pair. The sellprofit or buyprofit field may be different because it only contains data of the last open sell or buy order. So in the loop <for> for the list of open orders. The rest should be clear, unless you find my mistakes.
I have just started to look at it myself. I was pleased with the test at first. I poked four times at the first available day (I'm not even looking at the chart yet) using 2 symbols EURUSD+ EURCHF, made one day calculation and had good results - from 15 to 150 pips. But then I got to the day when total for the day ended with -80 pips. Once again I am interrupting the test and this is not correct. Apparently if the test continues there will be a different result. But for now I'm looking at it this way.
This version of the test is a kind of scalping and Yuri correctly says that his EA is quite different and the deposit should not be small because the technological process of the EA operation is violated when the deposit is small, averaging does not work as expected due to lack of funds and the fight for "survivability" may result not very positive.
Once again I will say that I admire Yuri's Expert Advisor as much as I do. Very interesting and original. But see for yourself - it is both beautiful and dangerous, at least version 1.
Sincerely, Fed
Yes, once again: Depo $1000, Bl=1000, BeginPrice - current at datetime calculation. The purpose of the test is to understand how signals are generated.
First test - 15/03/05 10:00 till 16/03/05 10:00
It was a "news" day, but since we are watching generation of signals (who cares), it's all the same for now.
First for 2 pairs EURUSD and EURCHF
Now 2 pairs EURUSD and EURCHF, depo 1000, bl 1000, c 15/03/05 00:00 to 16/03/05 00:00. I.e. slightly changed time, BeginPrice=current.
Well, for now, I will stop filling mql with my creations. Maybe it's not interesting, maybe at this stage someone will find my error. And I can show the change of calculation depending on Bl and BeginPrice <> current
Sincerely, Fed
A very good strategy,
...
the other issue is that withdrawals are made after a year or two
If you are not in such a hurry to withdraw, and the deposit size is immense, it does not make much difference which way you open - sooner or later you will be in the black.
To avoid that it may happen, it would be good to add simple tehanalysis and choose a day period to avoid overdoing it.
Thank you for your answer, respected Mr. Reshetov. I myself have already understood that these strings are for safety precaution, something like {try...catch} in other languages. Especially, in the test I really never entered the Closeby function
Hello!
Just kidding.
As Mathemat said "on the surface analysis" well, very nice! Not a single negative value. But what I do not understand (maybe I misunderstood): I do not turn off the gambler and do not close the terminal. Will the alert be displayed under such conditions or will the EA trade by itself as it should? What will happen if I disconnect from the Internet for a short time and then restore the connection? Without any disconnection from my side?
For me the question is very important because of my absence from the computer for at least 18 hours a day (sleep, work, etc.) and if in that time disconnection occurs, or I can not enter new data. ..... well, not really good.
Also, if I understood correctly: if you switch on the cam or terminal, you just need to enter the current values and everything will go as usual, i.e. reconnect the EA?
Also, if the alert is displayed, but we do not do anything, does the EA continue trading according to the old settings or does it wait for the new ones to be entered?
If possible, please give these points more details!!!!
Thanks for another reason to rack my brains a bit! (in a good way).
Sincerely !!!!
In general, you can do without allergies and switch to semi-handheld, especially if there is no possibility to monitor the Expert Advisors. The principle is to start a new game (i.e., a new magik and beginPrice for all EAs) when the equity level exceeds the previous one.
I.e. when there is an opportunity, look at the equity. If it has exceeded the previous level, then: