New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

PMO Min or MAX??

edited November 2016 in Scanning
I use MIN and MAX statements regularly in my formula. Today am trying to nail a formula to experiment with MIN or MAX for PMO LINE? I have no idea how to do it. I've tried variations but nothing works... Examples: "AND [PMO Line(35,20,10) MAX(40, ??) > 5]" where I've put all kinds of statements and integers where you see the "??". I've tried variations with just PMO but even then I have no idea what to put in place of my "??". How would I write, for example, "PMO Line MAX less in past 40 days of less than 8" ? Thanks in advance.

Best Answer

  • markdmarkd mod
    edited November 2016 Accepted Answer
    You want the max of PMO Line for the last 40 days to be less than 8.

    To get the max of anything, you would use the generic form of the max function, and then plug in the parameters.

    So the general form is

    max(nPeriods, expression)

    (see the Chart School article on functions: https://stockcharts.com/docs/doku.php?id=scans:functions

    So for nPeriods you want 40, and for expression you want PMO Line(35,20,10)

    So if you put 40 and PMO Line(35,20,10) inside the max( ) parentheses, you get

    max(40, PMO Line(35,20,10))

    Notice how there are TWO parentheses at the end: one for max( ) and one for PMO Line( ).

    Now you want that expression to be less than 8, so:

    and [max(40, PMO Line(35,20,10)) < 8]

    Hope that helps.

Answers

Sign In or Register to comment.