Since the function ObjectGetValueByShift returns a different value for each time frame, it would be nice if we could specify which time frame we want to get the value from.
- order close when alert line crossed. help me!
- angled trendlines
- Coding help
It took me several hours to figure out that one, and the reason why my code was not working. Is there an alternative?
skatt: Since the function ObjectGetValueByShift returns a different value for each time frame, it would be nice if we could specify which time frame we want to get the value from.
| It doesn't return a different value for each time frame. You are asking for the values at different times. iTime(NULL,PERIOD_D1,x) != iTime(NULL,PERIOD_M1,x) so of course you get different values from ByShift(x) from different timeframes. If you want the value from another timeframe, get the proper shift datetime BOD = iTime(NULL, PERIOD_D1, 0); int iBOD = iBarShift(NULL,0, BOD); double valueAtBOD = ObjectGetValueByShift(name, iBOD); |
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