[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 103

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
No, she doesn't owe anyone anything. There is a difference between a demo-real and a tester. For example, the tester will never show an error when opening orders, if all OrderSend() parameters are correct. But a trade server, on the contrary, it will.
This is why we should modify the programs after the tester and then run them on the demo, so that they can adequately handle exceptional situations, which do not occur in the tester.
This is very useful information for me))
Use Time[x] bar time.
It won't work here, because in the next line on the same bar this first formed figure will be initiated as the second one too... And I need to separate them... separate
to then compare the lows - if long and the highs - if short...
If it's not difficult to write a template, I'm not thinking straight yet)
Thank you for your consideration.
It won't work here, because in the next line on the same bar this first formed figure will be initiated as the second one too... And I need to separate them... separate
for subsequent comparison of lows - if long and highs - if short...
Not so. If you have the first signal bar of AO, then from it and look for the others deep into the history. When you open a position, remember the time of the bar opening and do not open it again. As soon as the next AO bar is formed, start looking for a pattern again.
Can you elaborate - I don't need to search deep into the history...
It is enough for me to determine in the present if a peak came - that it is Fig.1, and if after some bars as in the figure another peak came, then to compare them and make a decision...
The question is that both spikes of the first and the second figure are the same and I cannot (even using flags to distinguish one figure from another)... I am dull what-what...
P.S. The spikes don't necessarily follow one after the other, they may be through several equal bars, etc. They may be different - the main thing is that the principle of their construction is the same.
The main thing is to separate one from the other for further comparison.
Use Time[x] bar time.
In general, it is possible to interrupt the EA at a certain point in the code before the next bar is formed after some commands are executed.
In general, it is possible to interrupt the EA in a certain place in the code before the next bar is formed after some commands are executed.
eddy:
how to properly replace this with iLowest function?
minimum=Low[iLowest (NULL, 0, MODE_LOW, KPeriod, 0)] - is this correct?
Yes, it does. You store the current value of Time[0] in a static variable and compare with every new tick. If it hasn't changed, you exit with return(0). If it has changed, we are dealing with a new bar. Remember the time of the new bar, i.e. Time[0] and start your own calculations.
I have known it a long time ago... :-)) More from a textbook... Thank you...
I'm comparing now, I think I'm on the right track, but so far it's not working as it should...
You have correctly suggested me the use of Time[x] - trying to implement...