Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 278
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
I cannot make it out with my cyclops and correctly enter its indicator.
Your script returns zero at all settings. It is supposed to return a three, because now the difference between the first and the third bar is 0.005.
Maybe I wasn't clear. I want to put this in the loop.
double ma_etalon=iMA(NULL,0,...,i+1);
double ma_curr;
int shift;
for(shift=2;shift<5;shift++) {
ma_curr=iMA(NULL,0,...,i+shift);
if (ma_etalon-ma_curr<0.005) break; // ах ты чёрт, значение близко
}
if (shift==5) {
// цикл досчитал до конца, то есть все значение довольно далеко
// ... развернись плечо ...
}
Thank you, but something's not right.
Thank you all for your help, it worked )
Thank you all for your help, it worked )
Just wondering, did you need one of these?
Just wondering, was there a need for such a thing?
Yes, and how do you fit this design into the main loop of the indicator?
I told you clearly in trailing you put 0 instead of take
Check this option.
It works!!! :)))).... Thank you so much for putting up with us losers)))))) Thank you very much!)
Good afternoon.
Can you please advise how iCustom can be used to get an indicator value on another timeframe with a shift?
I.e. I am working on M5, I want to get the indicator value from M15, and from the previous candle on M15.
Good afternoon.
Can you advise how iCustom can be used to get an indicator value at another timeframe with a shift?
I am working on M5, I want to get the indicator value from M15, and I want to get the value of the previous candle on M15.
It is enough to carefully read the documentation
Just read the documentation carefully
I edited my question and added code. There is a loop going on. It's not clear what I'll get when it happens in a loop.
I'll answer my own question, in case someone needs it.)