Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 222
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
Hello.
The EA was tested with the same settings the day before yesterday and yesterday. The code is the same, all parameters are the same, but the result is different.
The Expert Advisor opens trades at the set time without any additional conditions. We can see that the opening prices of trades differ significantly.
I have downloaded the same quotes archive both times from MetaQuotes Software Corp.
How do I find two top/bottom fractals in a row? The picture below.
I tried to write an indicator, but I didn't think it through.
Maybe someone has seen such an indicator ready?
Are you sure that int GetFractal(string sy="0", int tf=0, int nf=0) functioncatches fractals correctly ? (there are EMPTY_VALUE values there )
Why such an inadequate overshoot?
1) it works on the appearance of a candle and not on a tick
2) to try two fractal arrays simultaneously instead of repeating a lot of times.
3) If the upper fractal is present, +1 to the value of the first variable, if the lower one, -1. ( Variants of results: - 1, 0, +1)
4) on the next fractal: if there is an upper fractal, then +1 to the value of the second variable; if there is a lower fractal, then -1. ( Results are as follows: - 1, 0, +1)
5) Look for the sum of the first and second variables:
a) less than 0 ( we have two lower fractals) YEAH!
b) greater than 0 ( we have two upper fractals) YEAH!!!
c) is equal to zero and one variable is equal to zero ( we have two lower and two upper fractals) YEAH!!!
6) reassign the value of the second variable to the first one and start the cycle from point 4)
Help, I did not understand how I did it, but I accidentally clicked something and a window disappeared with an overview of my open orders, how do I get it back?
Ctrl-T
Ctrl-T
Thank you.)))
Hello.
The EA was tested with the same settings the day before yesterday and yesterday. The code is the same, all parameters are the same, but the result is different.
The Expert Advisor opens trades at the set time without any additional conditions. We can see that the opening prices of trades differ significantly.
I have downloaded the same quotes archive both times from MetaQuotes Software Corp.
Are you sure that int GetFractal(string sy="0", int tf=0, int nf=0) functioncatches fractals correctly? (there are EMPTY_VALUE values there )
Why such inadequate overkill?
1) work from the appearance of a candle, not from a tick
2) Do one search on two fractal arrays at once, instead of multiple searches.
3) If the upper fractal is present, then +1 to the value of the first variable, if the lower one, then -1.
4) Next fractal: if there is an upper fractal, then +1 to the second variable, if there is a lower fractal, then -1.
5) Look for the sum of the first and second variables:
a) less than 0 ( we have two lower fractals) YEAH!
b) greater than 0 ( we have two upper fractals) YEAH!!!
c) is equal to zero and one variable is equal to zero ( we have two lower and two upper fractals) YEAH!!!
6) reassign the value of the second variable to the first one and start a loop from point 4)
You have the current spread selected in the tester - hence the difference, because, when you run the test, the spread is used that which was at the time the test was run. Set the spread to a constant number.
The difference between trades opened on the same day, at the same time on different test days - varies.
For example,
Yes and too high values for spread.
Instead of sarcasm, you'd better write a proper and optimized function yourself. You always show only negativity and mockery. Do not play the smartass: if you have something to say, write the code, if you don't have an answer, don't say anything. Overkill is going on there by the way...
I had time - I came up with an algorithm for the task, described it in detail (maybe a little incorrect for some people - people are different in terms of comprehensibility).
sarcasm? I don't know, I was just trying to help.
code write someone? optimize more? (yes, I can, but is it worth it?)
(PS artmedia70, no offence, I respect your attitude and opinion in general - honestly, but the other day you yourself gave me code from iCustom-y to put it mildly not very optimised).
Something like this should work if you insert it into the check for a new bar.
The code would be more optimal if you narrow down kilkict=iBars(sy,tf) after some number of fractals, so that you don't have to constantly look through all the bars.
I had time - I came up with an algorithm for the task, described (in detail, maybe a little incorrect for some people - people are different in terms of approachability).
sarcasm? I don't know, just to help.
write the code to someone? optimise more? (yes i can, but is it worth it? )
(p.s. artmedia70, no offence, I respect your attitude and opinion in general - honestly, but the other day you yourself gave the code from iCustom-y to put it mildly not very optimised).
Something like this should work if you insert it into the check for a new bar.
The more optimal code would be if we narrow down kilkict=iBars(sy,tf) after some number of fractals, so we don't have to constantly look through all the bars.
Yes, as they used to joke in KVVAIU, a real officer must inspire fear, both with his behaviour and his physical appearance.
Is it possible to make it "more optimal"?
I have had time - I have come up with an algorithm for the task, described it (in detail, maybe a bit incorrect for some people - people are different in terms of profitability).
sarcasm? I don't know, just to help.
write the code to someone? optimise more? (yes i can, but is it worth it? )
(p.s. artmedia70, no offence, I respect your attitude and opinion in general - honestly, but the other day you yourself gave the code from iCustom-y to put it mildly not very optimised).
Something like this should work if you insert it into the check for a new bar.
The code would be more optimal if kilkict=iBars(sy,tf) were narrowed down after a certain number of fractals, so as not to constantly go through all the bars.