thothapis:
Code your own version of iHighest and iLowest that you apply to the section of the MA buffer that you want . . .
Hey friends, I am a newbie to study coding.
This day I find a interesting indicator of draw high/low lines,"HighLowBands.mq4".
the view is like this:
Now my question is :
As the document said, iHighest/ilowest is only can be apply to price(high low open close) & VOLUME & time
How can I apply it to a move avarage line
thothapis:
But I don't know how to write the algorithm "iHighest /iLowest ",can you help me finish this function ?
Sure, how far have you got ? show what you have so far . . .
But I don't know how to write the algorithm "iHighest /iLowest ",can you help me finish this function ?
RaptorUK:
Sure, how far have you got ? show what you have so far . . .
Sure, how far have you got ? show what you have so far . . .
for test,I modify a code to ge follow result:
get the highest of MA 30 at the period 30 bar:
Buffer1[i]=iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,iHighest(NULL,0,iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,i),30,i));
but it is not show correct result.
what 's wrong?
thothapis:
I have no idea about how to code it?
Can you kindly help me ?
I have no idea about how to code it?
Can you kindly help me ?
- No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
Buffer1[iPos] = ima(... iPos) Buffer2[iPos] = buffer1[ iHighestOnArray(Buffer1, Len, iPos) ]; ///// int iHighestOnArray(double B[], int len, int iPos){ int iLimit = MathMinI(iPos + len, ArraySize(B)) - 1; iMax = iLimit; while (iPos < iLimit){ if (B[iMax] < B[iPos]) iMax = iPos; iPos++; } return(iMax); } int MathMinI(int a, int b){ if (a < b) return(a); return(b); }
As a newbie,what I want is to study something.
please do not say "slave" somewhat.
thank you WHRoeder.
I will try it
// i=Bars-LookBackPeriod+1; // if(counted_bars>LookBackPeriod-1) i=Bars-counted_bars-1; // while(i>=0) int counted_bars = IndicatorCounted(); if (counted_bars < LookBackPeriod) counted_bars = LookBackPeriod; for(int iPos = Bars - 1 - counted_bars; iPos >= 0; iPos--){ :

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
Hey friends, I am a newbie to study coding.
This day I find a interesting indicator of draw high/low lines,"HighLowBands.mq4".
the view is like this:
Now my question is :
As the document said, iHighest/ilowest is only can be apply to price(high low open close) & VOLUME & time
How can I apply it to a move avarage line so I can get a pic like this (draw use other software ):
Can somebody kindly help me,please?