Hi
I need to get high low and close value of last 12 hrs what I mean is at broker time 00:00 I want high of last 12 hours
Low of last 12 hours And closing price of last h4 chart
And at 12:00 broker time same for last 12 hours high and low and close of last 4
Hr bar close value
Is it possible to do it?
Thanks
- Bar values
- Code for High, Low 2 last bar week H4
- High[0] Low[0] Close[0] all return the open value of the bar... am I missing something here?
everything is possible in this century
Can you help
Or guide me ?
Thanks
something like this
double lowest12H = 99999; double Highest12H = 0; int i; if (NewBar() && Hour() == 0 || Hour() == 12 && Minute() == 0) { for(i = 1; i <= 3 ; i++) { lowest12H = MathMin (lowest12H, iLow(Symbol(),PERIOD_H4,i)); } Alert ("The Lowest Value Is: ", DoubleToStr(lowest12H,Digits)); for(i = 1; i <= 3 ; i++) { Highest12H = MathMax (Highest12H, iHigh(Symbol(),PERIOD_H4,i)); } Alert ("The Highest Value Is: ", DoubleToStr(Highest12H,Digits)); } bool NewBar() { static datetime LastTime = 0; if (Time[0] != LastTime) { LastTime = Time[0]; return (true); } else return (false); }

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