[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 170
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
Are you sure?
Essentially your suggestion is to exclude from checks and calculations candles which do not fall within the UPPprice/LOWprice range... this is excluded by two lines. If you don't drop out of the loop, it means the price is in the range we need and we do the standard checks. Your code may go faster only to the detriment of the results, because the logic of working with INS is very convoluted to use the value of this variable from the previous iteration is nonsense.
Essentially your suggestion is to exclude from checks and calculations candles which do not fall within the UPPprice/LOWprice range... this is excluded by two lines. If you don't drop out of the loop, it means the price is in the range we need and we do the standard checks. Your code may go faster only to the detriment of the results, because the logic of working with INS is very convoluted to use the value of this variable from the previous iteration is nonsense.
So you're sure! :))))
You cited the code earlier:
If the price is below Low, why should we check if the price is above High? In your version this condition is not excluded. But in my suggestion:
it is excluded.
I do not deny that my code may not be the most optimal.
But how many times faster do you think
if (UPP)
will work than.
?
In fact:
Only I know this for a fact (except when bid inside the current historical bar) and you calculate it...
Yeah.
You have to get so twisted as to turn three clear lines of code into code that is hard to understand.
If you had the idea to split the iLow, iHigh check, you could have split it right away:
And don't make any wisecracksConsider this section of code
INS=True;
The loop went
if (INS) flight is ok
if (LOWprice...) for example, the condition is true, but then it goes wrong because we get INS=False and we go to the next iteration
then if (false) and we're done, because it's another bar, so what the...
As for my code, I'm not checking the price but whether the bar is within +300/300 pips of the current price and if it is, it should be considered. All other optimizations are not so critical because the first two checks for example eliminate 90% of unnecessary bars.
then if (false) and we're screwed, because it's a different bar, you have to ask what the...
and then really swam...
Why do you think Boolean variables will speed up if each condition is followed by one more if (LOWprice > iHigh(NULL,60,i)), i.e. the same eggs but from the side plus one condition and a lot of assignments...
Whoa!
This is where the arguments get heated up.
I'll put it like this for now:
It's very interesting to watch the price movement. It always goes in the direction of least resistance.
You can even predict its future movement. Observe.
Price is like water flowing in a stream.
Thank you all!
Please tell me how to find the bar number with the highest value of the high.
Search_High=MathMax( High[i],High[1])
Can you tell me how to find the number of the bar with the highest chai value?
Search_High=MathMax( High[i],High[1])
You can go to https://docs.mql4.com/ru/array/ArrayMaximum
through the array High.