High > the Highest close of the last 3 days.

Optuma Forums Optuma Scripting High > the Highest close of the last 3 days.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #57893
    Brad
    • Topics: 9
    • Replies: 16
    • Posts: 25

    Hello,

    I have been attempting to create a Script that as a filter only allows stocks to pass that have the current High > the Highest close of the last 3 days.

    None of my 3 lower Scripts below are valid.

    HIGH() > HIGHESTHIGH(BARS=3) – my starting point

    HIGH() > HIGHESCLOSE(BARS=3)

    HIGH() > HIGHESTHIGH(CLOSE())(BARS=3)

    HIGH() > HIGHESTHIGH(BARS=3)(CLOSE()

    What do I need to change to obtain a valid Script?.

    Thanks, Brad

    #57895
    Matthew
    • Topics: 5
    • Replies: 521
    • Posts: 526

    Hi Brad,

    The following should work:

    This script does include the current bar in the 3 day look back. If you don’t want to include it change the last part of line 2 to INCBAR=False);

    Ex3

    Black Line = Highest Close in the last 3 bars (including current bar). Green shaded zone shows bars where the high is higher than the Black line.

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

Pin It on Pinterest