Time[0]-((Time[0]%86400)+86400)
This assumes that there are no gaps in the chart, like there are over the weekend. Don't assume.iHighest(NULL,0,MODE_HIGH,x,1)
This returns the highest bar from [x-1 .. 1] That is not from [yesterday .. today)- Write self documenting code.
#define HR2400 86400 datetime today = Time[0] - Time[0] % HR2400; int iYestLast = iBarShift(NULL,0, today) - 1; datetime yesterday = Time[iYestLast] - Time[iYestLast] % HR2400; int iYestBeg = iBarShift(NULL,0, yesterday); int len = iYestBeg - iYestLast + 1; high=iHighest(NULL,0,MODE_HIGH, len, iYestLast); low=iLowest( NULL,0,MODE_LOW, len, iYestLast); timei=Time[low]; timeii=Time[high];
WHRoeder:
Thank you good sir. Will give this a try.
- This assumes that there are no gaps in the chart, like there are over the weekend. Don't assume.
- This returns the highest bar from [x-1 .. 1] That is not from [yesterday .. today)
- Write self documenting code.
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
Hey guys,
I need some help please. I am trying to look for the time when the previous day high and low was formed. Below are my equations; they do give the correct prices, however they do not return the correct integers of the candles that formed the high/ low. Please help!
Thank you!