double val; //--- calculating the highest value on the 20 consecutive bars in the range //--- from the 4th to the 23rd index inclusive on the current chart int val_index=iHighest(NULL,0,MODE_HIGH,20,4); if(val_index!=-1) val=High[val_index]; else PrintFormat("Error in call iHighest. Error code=%d",GetLastError());
Omar AlKassar:
Your reply has nothing to do with getting the price value in between 52 weeks high and 52 weeks low.
I use the following code to find the HH and LL of price range ...
double HH = NormalizeDouble(iHigh(Symbol(), 10080, iHighest(Symbol(),10080,MODE_HIGH,52,1)),Digits); double LL = NormalizeDouble(iLow(Symbol(), 10080, iLowest(Symbol(),10080, MODE_LOW,52,1)), Digits);
then,
double HP = NormalizeDouble((HH+LL)/2,Digits);
I wish this will work for you ...
Osama Shaban:
Thanks, I will test it out.
I use the following code to find the HH and LL of price range ...
then,
I wish this will work for you ...
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'm trying to get the half price value between 52 weeks high and 52 weeks low.
But it's not coming out right, does anyone know what's wrong with this code?