
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
aristid:
My initial thought was to use (DayOfWeek[0] < DayOfWeek[1]) to find the first day of the week.
My problem is that I cannot use this on backdata, only realtime.
thanks for your reply, I understand.
My initial thought was to use (DayOfWeek[0] < DayOfWeek[1]) to find the first day of the week.
My problem is that I cannot use this on backdata, only realtime.
There is something I'm not getting with MQL4.
Any suggestions, I'd appreciate.
thanks again.
Try this, it may give you a start.
I think that it should work in real time as well
you seems to be using donchian channel.use that on one week TF and you will see when price close above or below the channel!
GumRai,
thank you very much,
it certainly looks excellent!
I will have to look into OnCalculate to better understand.
thanks again!
aristides.
(MT4 screenshot:)
GumRai,
thank you very much,
it certainly looks excellent!
I will have to look into OnCalculate to better understand.
thanks again!
aristides.
(MT4 screenshot:)
You're welcome :)
Don't let all the const arrays after OnCalculate distract you. None of those arrays are used in the code. Just concentrate on the logic, you were almost there when you said
"My initial thought was to use (DayOfWeek[0] < DayOfWeek[1]) to find the first day of the week."
Try this, it may give you a start.
I think that it should work in real time as well
Could anyone tell me how I can change the indicator by Keith Watford to previous weekly high low ?
Why do you need to change anything? Look at the last lines for the previous week.
Why do you need to change anything? Look at the last lines for the previous week.
You want the previous week's H/L drawn on the current week. That isn't what your code does. It will have to be completely rewritten.
- Update the W1 chart. (One function call at the start)
Download
history in MQL4 EA - MQL4 and MetaTrader 4 -
MQL4 programming forum
- Find the W1 shift for the bar index. (One function call.)
- Get the H/L of the previous W1 bar and store. (Two assignments.)
17 lines become 4.