Script help!

Optuma Forums Optuma Scripting Script help!

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #70575
    Zac
    • Topics: 5
    • Replies: 1
    • Posts: 6

    hi all,

    Having some difficulty getting the below scripts to work:

    Indicator 1 – CLOSE is lower than LOW of previous 5 days

    V1 = CLOSE(Day(PERIODAMOUNT=1)) ;
    V2 = LOWESTLOW(Day(PERIODAMOUNT=1), BARS=3, INCBAR=True, INSIDEBAR=False);
    V1 < V2

    Indicator 2 – CLOSE is highe than yesterday’s HIGH
    V1 = CLOSE(Day(PERIODAMOUNT=1));
    V2 = HIGHESTHIGH(Day(PERIODAMOUNT=1), BARS=1, INSIDEBAR=False, INCBAR=True);
    V1>V2

    Its just not showing up any signals where this condition is true for some reason!

    #70590
    Matthew
    • Topics: 5
    • Replies: 666
    • Posts: 671

    Hi,

    With your first script, you have the current bar being included in the LowestLow calculation, meaning the Close can never be lower than the V2 line.  If you swap INCBAR=True to INCBAR=False you will find results being returned.

    For the second script, it can be simplified by using the following:

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

Pin It on Pinterest