I think maybe you could use iBarShift together with iTime
I published a code which draws lines on the high and low with user input for the period to select. by default it's on D1 but can be changed to weekly bar time. It's simple code if you use iTime together with iBarShift
Chioma Obunadike:
Hello everyone,
Hi , i don't understand the point of this calculation , you want the time in seconds 1 week ago for example minus the ratio of the weekly timeframe seconds to the current timeframe seconds , in seconds ?
datetime weekl_start = iTime(_Symbol, PERIOD_W1, j) - (j * (PeriodSeconds(PERIOD_W1) / PeriodSeconds(PERIOD_CURRENT)));
Conor Mcnamara #:
I think maybe you could use iBarShift together with iTime
I think maybe you could use iBarShift together with iTime
I published a code which draws lines on the high and low with user input for the period to select. by default it's on D1 but can be changed to weekly bar time. It's simple code if you use iTime together with iBarShift
perfect. Thanks Conor Mcnamara


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
Hello everyone,
I recently wrote this indicator to return buffers of the previous weekly high and low, but for some reason, it keeps being off.
Some bars on the lower timeframe do not have buffers that correspond to the weekly high/ low.
I tried to correct this by using this
PeriodSeconds()
but it still gets them wrong. Can anyone please direct me on any indicator that has this functionality or what I am doing wrong?
I attached the part of the code. Thanks!