EFS Guru,
These questions are for you.
1. I would like to calculate the slope (angle) of an imaginary line that (for example) connect the close of two bars (not necessarily adjacent), or - another example - a line that is formed by two points on a given study (say MACD), each point representing another candle (or bar).
I guess the appropriate trig function to use would be tangent where we divide the y component (diff in the values between the two bars) by the x value (number of bars).
In any case - since each type of bar (this or that symbol) or line (MACD Signal would return different values than - for example - Moving Average study) - how is this normalization handled?
Guru, do you have some coding examples please.
Another question: I wrote a script (not using the wizard) which is supposed to display an up or down arrow (image) when it decides it should. When I re-load it, it does the job but it does not refresh after each bar.
When I used the verb DrawTextRelative, there was no problem (now this code is commented out).
Thanks,
These questions are for you.
1. I would like to calculate the slope (angle) of an imaginary line that (for example) connect the close of two bars (not necessarily adjacent), or - another example - a line that is formed by two points on a given study (say MACD), each point representing another candle (or bar).
I guess the appropriate trig function to use would be tangent where we divide the y component (diff in the values between the two bars) by the x value (number of bars).
In any case - since each type of bar (this or that symbol) or line (MACD Signal would return different values than - for example - Moving Average study) - how is this normalization handled?
Guru, do you have some coding examples please.
Another question: I wrote a script (not using the wizard) which is supposed to display an up or down arrow (image) when it decides it should. When I re-load it, it does the job but it does not refresh after each bar.
When I used the verb DrawTextRelative, there was no problem (now this code is commented out).
Thanks,
Comment