- Variables and identifiers
- Stochastic Oscillator - Oscillators - Technical Indicators - Price Charts, Technical and Fundamental Analysis
- Technical Indicators - Price Charts, Technical and Fundamental Analysis
//int i; //if(prev_calculated==0) i=0; //else i=prev_calculated-1; //for (i = 0; i < prev_calculated;i++) int i, limit; if(prev_calculated==0) limit=0; else limit=prev_calculated-1; for (i = limit; i < rates_total;i++)
It's more than just that. OP's issue is that he is working with the buffers as if they are MT4. MT5 is reversed so the entire logic needs to be reversed.
{ int limit = rates_total - 1; if(prev_calculated == 0) limit = 3; for(int i=limit; i<rates_total; ++i) { double ihl = high[i] - low[i]; double jhl = high[i-1] - low[i-1]; double khl = high[i-2] - low[i-2]; double x = (ihl + jhl + khl) / 3.0; BlockBuffer[i] = x; PowerBuffer[i] = x; } return(rates_total); }
It's more than just that. OP's issue is that he is working with the buffers as if they are MT4. MT5 is reversed so the entire logic needs to be reversed.
Surely you are right.
However, this method does not cause problems when communication is interrupted? It always calculates only the last buffer.
int limit = rates_total - 1;
Surely you are right.
However, this method does not cause problems when communication is interrupted? It always calculates only the last buffer.
The last buffer is always the most recent bar in MT5. Indexes run opposite of MT4.
The last buffer is always the most recent bar in MT5. Indexes run opposite of MT4.
Yes, I know it.
But your program is the same as following because in your program (limit = rates_total - 1).
for (int i=ratos_total - 1; i < ratos_total; i++)
It always calculates only last index except for the first calculation.
I think that (limit = prev_calculated - 1) is the best.
It's more than just that. OP's issue is that he is working with the buffers as if they are MT4. MT5 is reversed so the entire logic needs to be reversed.
it work now....
and you GOD DAMN RIGHT,, i got the error bcz i followed the mql4 tuts...
thanks agai for your help...
Thanks very much...
it work now....
and you GOD DAMN RIGHT,, i got the error bcz i followed the mql4 tuts...
thanks agai for your help...
thanks alot for your kindness...
you all are my angel...
KDE is love, KDE is life.
You can make all things dark in winecfg and MetaEditor Tools/Properties/Colors.
Let the darkness flow through you.
KDE is love, KDE is life.
You can make all things dark in winecfg and MetaEditor Tools/Properties/Colors.
Let the darkness flow through you.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use