hi there, i want to extend a previous question of mine,
i want to screen stocks that their bollinger bandwidth indicator has a constant slope for the last 10 days lets say. Actually it would look like an almost straight horizontal line with small fluctuations. the following algorithm i received it is valid but returns the bollinger bandwidth indicator as an almost straight line but for some stocks it returns it with an upward slope:
in order to have an almost horizontal line of the bollinger bandwidth indicator for the last 10 days i thought to use the dy/dx formula that gives the slope of a line. for the y-values i use the bollinger bandwidth values and for the x-values i thought to use past days with the help of “day” or “days” command. Assuming that Bol is the dy how can i write the dx formula (in order for the Bol to be divided by 1, Bol[2] to be divided by 2 and so on…
a “flat” line is purely visual. In your indicator you are measuring the variation in points, which can be very different from an intrusment to another!
You should use the BB% indicator which is the percentage of the price minus the lower band divived by the bands difference, so it is somehow ‘universal’ for all instruments.