constant slope of an indicator

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #162190 quote
    gnellas77
    Participant
    Average

    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:

    Periods = 10
    Bol   = BollingerBandWidth[20](close)-BollingerBandWidth[20](close)[1]
    Cond    = summation[Periods]((Bol >= 0) AND (Bol <= 0.01)) = Periods
    
    SCREENER[Cond]

    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…

    thank you.

    #162310 quote
    Nicolas
    Keymaster
    Master

    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.

    gnellas77 thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

constant slope of an indicator


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
gnellas77 @gnellas77 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
5 years ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/21/2021
Status: Active
Attachments: No files
Logo Logo
Loading...