Code to show percentage of close from high

Forums ProRealTime English forum ProScreener support Code to show percentage of close from high

Viewing 2 posts - 1 through 2 (of 2 total)
  • #153018

    I have a screener that’s running well and I am looking to introduce a new line of code to give a percentage of how far the close is from the high of the day.

    The screener already has five conditions. one that the stock must have: close > open.

    My thinking is that the code will be the criteria to sort the filtered stocks.

    So far this is what I have:

    My syntax is wrong and I can’t figure out where I’m going wrong. Basically if the close is the high, I want to return “Bull” to signify that, otherwise I’d like to see the percentage the close is away from the day’s high.

    Any thoughts on where I’m going wrong? This is the first time I’ve tried an IF THEN ELSE statement.

    #153023

    RETURN is a reserved keyword of ProBuilder (for indicators).

    a screener can only return conditions with the keyword SCREENER.

    I can’t understand exactly what you want to be returned, but I suggest that you try replacing lines 4-6 with:

     

Viewing 2 posts - 1 through 2 (of 2 total)

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