[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 545
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
There are time constraints for init() function to work
Please help me to understand the problem of looking for divergence on the oscillators correctly. In this case let it be MACD. I have sketched out the following algorithm:
1) Count bars from the beginning and look for peaks on the oscillator:
2) Create arrays containing peak times:
and enter into them the MACD[i] value if the condition is fulfilled. The last new peak must have the index [n] and the penultimate one [n+1];
3) Let us consider a further solution under situation (1):
Actually, the problem with point 2: how to organize such an array like in a timeseries so that the values would shift at every new peak?
Please help!
Decided to poke around in your code a bit...
I'm very grateful to you for analyzing my code. Thank you for taking the time to do it.
I am just beginning to learn programming, so these comments are very important and will be helpful in the future.
Now to the point:
Really, the full search of orders is performed in this form, and further analysis is performed using open orders (everything is clear here)
This part of the code is also changed but forum participants write that the market environment is not always available for the init() function.
Some variables may not be defined or I got something wrong?
I don't understand the logic of this post - (I'm explaining my view of this operator)
while(true) ...
I have an error handling block.
If the error is correct, we try again to check the conditions and open the order.
And while operator works when its value is true, i.e. it turns out that it doesn't accept false.
Thank you guys for your help.
Please help!
Read here:https://www.mql5.com/ru/articles/1357 It's simple and straightforward
Read here:https://www.mql5.com/ru/articles/1357 It's simple and straightforward
Just don't forget that the market environment is not always available in init()
...I am very grateful to you for analyzing my code. Thank you for taking the time to do it.
And the while statement works when its value is true, i.e. it turns out that it does not take false.
Question for Expert Advisors. The OrderSend() in place of slippage is 3. Is it for example for 4-digit quotes? For 5-digit quotes can I leave 3 or do I need 30?
For 5-digit ones you need 30.
I insert such a construction in init() of each EA, then it makes no difference for 4 or 5 digits DT, I recommend it: