- Take the AO and add two additional buffers
- For the given bar. Find the beginning of the day index
- Find the highest AO from beginning to current.
- Set the high buffer to that value.
#define HR2400 86400 // 24 * 3600 int TimeOfDay(datetime when){ return( when % HR2400 ); } datetime DateOfDay(datetime when){ return( when - TimeOfDay(when) ); } /////// in the for(ibar to 0) loop (after AO[iBar] calculated): datetime barTime = Time[iBar], bodTime = DateOfDay(barTime); int iBod = iBarShift(NULL,0, bodTime), iHH = ArrayMaximum( AO, iBod - iBar + 1, iBar); double HH = AO[iHH]; while(iBod >= iBar){ AOhigh[iBod] = HH; iBod--; }
Thanks WHRoeder. I'll try with this!
Thx again!
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,
I'm looking for information about how could I create an indicator that draws two horizontal lines with the maximum and minimum of the previous day indicator's data. The indicator is Awesome Oscilator. Also I would like to be like some pivot indicators, that draw all the chart, not just the last day.
Can anyone help me?
Thanks!