int count=0; double closesNoZeroes[50]; for(int x=1;x<50;x++) // GET CLOSES THAT ARE LOWER THAN PREVIOUS CANDLE'S CLOSE if(iClose(_Symbol,0,x)<iClose(_Symbol,0,x+1)) { ClosesBelowPreviousArray[x]=x; closesNoZeroes[count++]=x; } ArrayResize(closesNoZeroes,count); // shrink to true sizeThis is a quick way to do the job. Note that closesNoZeroes is a dynamic array and so maybe resized to fit its contents, that's what is done at the end.
lippmaje:
This is a quick way to do the job. Note that closesNoZeroes is a dynamic array and so maybe resized to fit its contents, that's what is done at the end.
This is a quick way to do the job. Note that closesNoZeroes is a dynamic array and so maybe resized to fit its contents, that's what is done at the end.
THANK YOU SO MUCH!!
closesNoZeroes[count++]
GENIUS
👍
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
Ive tried
Cant find a way to remove zeros from the ClosesBelowPreviousArray array. We need to to keep the actual order in which the candle's close was less than the previous candle's close. So the result we need is
ClosesBelowPreviousArrayNoZeros[1] // the shift where the candle's close was first less than previous
ClosesBelowPreviousArrayNoZeros[2] // the second time where shift where the candle's close was less than previous
ClosesBelowPreviousArrayNoZeros[3] // the third occurence when shift where the candle's close was less than previous
ClosesBelowPreviousArrayNoZeros[4] // the shit of fourth time when the candle's close was less than previous
Any way to order the ClosesBelowPreviousArray[] by removing the zeros? The result would be the Print of the first code however in array form with the indexes from 1 to 10 instead of where the condition happen followed by a ton of zeros and then again another x="where the condition happens" again.
Just making all the zeros into 999999 and then get the ArrayMin, assign this to a clunky sounding variable and then deleting the array min from array and repeating this forever made me post this.