binary “buy/sell” indicator results display: convenience or further processing

Forums ProRealTime English forum ProBuilder support binary “buy/sell” indicator results display: convenience or further processing

Viewing 3 posts - 1 through 3 (of 3 total)
  • #228711

    Dear all,

    as I find this forum really helpful when starting with programming indicators, I´d like to contribute something in return.

    When diving into the logics of an indicator, I quickly found it would be helpful to have a simplified, binary “buy/sell” or “on/off” display of my indicator results, either for convenience in the (visual) cart display or if I wanted to combine the results of different indicators to receive a consolidated result – which may even be used to feed a stock screener based on my defined criteria.

    The result is displayed as a line marked either green (= +1) or white (= 0) or red (= -1). This is visually simple and also may be used as input for a sum of n indicators to receive a final rating, combining different indicators 🙂

    This example is a simple indicator if the EMA slope is steep (positive or negative) or if it is within the noise (to shallow).  The 2 variables need to be defined in the variables menu. The colouring of the plot needs to be adjusted in the settings menu for the indicator colour to paint the areas between zero and indicator line either green or red.

     

    Hope that helps you with your programming – have fun!

    tomse

    1 user thanked author for this post.
    #228724
    JS

    Hi tomse,

    Thanks for sharing.

    Note: in your indicator you do not calculate the slope of the EMA but the percentage difference between the current and the previous value of the EMA.

    (Slope=EMA-EMA[1])

    1 user thanked author for this post.
    #228962

    Hi JS,
    great comment, true !
    I am referring to the slope as a “measure for steepness” in terms of delta(Y) / delta(X) . As the delta of the time period (delta(X)) is 1, it will look like what you wrote above. This value is absolute and will change with the price of the stock.

    But I prefer to have relative values, to make different stocks kind of comparable. So the additional division with EMA[1]. I multiplied it with 100 to receive the % value, which in more common language often referred as “slope”, so I will need to deal with less decimal places 🙂

    Best regards

    1 user thanked author for this post.
    avatar JS
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login