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
We cannot use time as x in f(x) = kx + b calculation because charts are non-linear in respect to time. For example, daily charts have weekends and holidays omitted, so the neighboring bars could be 1 day apart or 3 days apart.
Works miracles :-). If someone needs, here's the code, which calculates vertical difference between main and auxiliary lines of the OBJ_CHANNEL:
Nicely done - a calculation I had on my to-do list!
Thanks for sharing the code!
Helped me a lot!
Thanks!
Hi,
You're broked your neck with this code. Just use the "ObjectGetValueByTime" command.
Ex:
//For the first line
Alert(ObjectGetValueByTime(0,BorderChannel,Time[0],0));
//For the second line
Alert(ObjectGetValueByTime(0,BorderChannel,Time[0],1));
Chris
Thanks, Chris!
I guess this function had not yet been added to MetaTrader 4 when I was creating this workaround.