[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 2
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
How about two?
Dear Sirs, I've been puzzled with a solution to a problem related to requotes.
Situation: Expert Advisor opens orders from the market with hard stops and takeovers in pips, works on a closed bar, M15. A signal to open the order is received and the Expert Advisor tries to open the order several times but it fails. On the next bar the signal repeats and the Expert Advisor opens the deal, but the rate has left the point where the first signal was given. It turns out that the stop and take will be set from the rate at which the deal was opened, rather than from the rate at which the first signal to open. I have written such a construction that when setting a stop and take, the Expert Advisor would take the price at which the first signal was received.
I want to explain why I want to use the first signal: stop and take sizes were selected in the tester and are sort of optimal, if you set stops/stops from the second signal, it will turn out that they are not optimal, because the rate of actual deal opening is different from the rate at the first signal.
Trades in orders total 1, i.e. we never reach the oldest one. Second, it trawls orders from the most recent to the oldest, and older ones may be closed using stop or take before the trawler reaches it. In general, what is wrong, do you have error logs?
TS does not work at all, several times I noticed that "as designed" it does not close positions at all.No error logs, but how do I get them?
And as for closing orders, could you please write more details, as the EA is multi-currency, but with a limit of 1 trade on a currency at a time.
Igor Kim's features, simply and conveniently.
Dear Sirs, I've been puzzled with a solution to a problem related to requotes.
Situation: Expert Advisor opens orders from the market with hard stops and takeovers in pips, works on a closed bar, M15. A signal to open the order is received and the Expert Advisor tries to open the order several times but it fails. On the next bar the signal repeats and the Expert Advisor opens the deal, but the rate has left the point where the first signal was given. It turns out that the stop and take will be set from the rate at which the deal was opened, rather than from the rate at which the first signal to open. I have written such a construction that when setting a stop and take, the Expert Advisor would take the price at which the first signal was received.
I want to explain why I want to use the first signal: stop and take sizes were selected in the tester and are sort of optimal, if you set stops/stops from the second signal, it will turn out that they are not optimal, because the rate of actual deal opening is different from the rate at the first signal.
It turns out that the optimality is determined only by tp and sl levels, while the deal price may be any? This doesn't seem logical.
Optimality is determined not only by a stop and take, it is mainly determined by the parameters of the signal to open the deal, I have not given these signals so as not to overload my question, signal parameters in fact do not relate to the problem in question. The deal price may be any, if the signal to open the deal is saved.
I would be grateful if you could give your opinion on the essence of my question, i.e. whether the code for calculation of levels from which a stop and take will be calculated is written correctly?
I don't have the code handy, but I did something similar for myself, but not like that: I remembered the time of the bar at which there was a signal, and when an order was placed using this signal, I reset the signal time to zero, so on and so forth:
Well, if the question is about fighting only requotes, then look in Igor Kim's thread, almost all functions for placing orders have a parameter for how many times to try to place the orderOptimality is determined not only by a stop and take, it is mainly determined by the parameters of the signal to open a deal, I have not given these signals so as not to overload my question, signal parameters in fact do not relate to the problem in question. The deal price may be any, if the signal to open the deal is saved.
I will be grateful if you tell opinion on essence of my question, i.e. whether the code, for calculation of levels from which stop and take will be calculated correctly is written?
The writing is correct but imagine the situation: the "real" price of the deal turned out to be, for example, above the memorized TP - what will you do then? (And this situation is quite real - requotes are just frequent in the fast market, when the price jumps)
Thank you for your opinion.
If the price turns out to be higher than the memorized TP then the trade will open with the minimum takeaway level, such processing is inherent in the EA.
PS By the way, I will have to try to put a position opening ban if the new price went away from the memorized price at more than a certain distance, thanks for the thought, I wish I could check it in the tester, only in trade.