deVries
https://www.mql5.com/en/code/7107
or https://www.mql5.com/en/code/10401
thank you,
i have earlier saw these pages, but i do not know realy how to can i modify the below code.
double val=Low[iLowest(NULL,0,MODE_LOW,10,10)];
I made earlier the below code, but it does not give me what i asked in the topic:
int i,pos=Bars-ExtCountedBars-1; if(pos<MA_Period) pos=MA_Period; for(i=1;i<MA_Period;i++,pos--) ExtMapBuffer[pos]=Low[iLowest(NULL,0,MODE_LOW,pos,0)];
iLowest
Sample:
// calculating the lowest value on the 10 consequtive bars in the range // from the 10th to the 19th index inclusive on the current chart double val=Low[iLowest(NULL,0,MODE_LOW,10,10)];
int i,pos=Bars-ExtCountedBars-1; if(pos<MA_Period) pos=MA_Period; for(i=1;i<MA_Period;i++,pos--) ExtMapBuffer[pos]=Low[iLowest(NULL,0,MODE_LOW,pos,0)];Try
ExtCountedBars=IndicatorCounted(); if(ExtCountedBars<MA_Period) ExtCountedBars=MA_Period; for(iPos=Bars-ExtCountedBars-1; iPos >= 0; iPos--){ int iLL = Lowest(NULL,0,MODE_LOW,MA_Period,iPos); double pLL = Low[iLL]; ExtMapBuffer[iPos]=pLL; }Then understand the reason why the first doesn't work.
WHRoeder:
TryThen understand the reason why the first doesn't work.
TryThen understand the reason why the first doesn't work.
thanks,
i have used this code and it works.
while(pos>=0) { ExtMapBuffer[pos]=Low[iLowest(NULL,0,MODE_LOW,MA_Period,pos)]; pos--; }
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
Hi friends,
can you help me to modifiy this code with ilowest or ihighest instead of Mathmin or Mathmax.
exactly i want to code something like this:
L2[pos]=ilowest(.....)
H2[pos]=ihighest(....)
etc.
My goal is to develope this code for a custom Period of bars. for example L2[pos]= lowest low price of last n bars.