Optex Show Bar Script

Optuma Forums Optuma Scripting Optex Show Bar Script

  • This topic has 2 replies, 2 voices, and was last updated 1 week ago by Tim.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #71007
    Tim
    • Topics: 39
    • Replies: 37
    • Posts: 76

    Hi,

    Using this very simple Optex script but it is not showing expected results as highlighted in the attached screen shot, expecting upturns in the red circles to be highlighted by the Show Bar.

    #71011
    Darren
    • Topics: 74
    • Replies: 967
    • Posts: 1,041

    Thanks Tim.

    It’s because the the TurnsUp signal will always be a day after the bottom, and in your example the day after the turn the V1.Ratio is above V1.25Lower, so the C1 condition is false, hence no signal.

    You can see when we do get a signal that the day after the turn is still within the band:

    Capture
    All you need to do to fix the formula is look at the C1 condition on the previous day, when the low was within the band. Use this as the last line, where [1] is the
    previous day.

    C1[1] and C2

    Changing the Show Bar to a line over all views now captures those signals:

    Capture

    #71015
    Tim
    • Topics: 39
    • Replies: 37
    • Posts: 76

    Hi Darren,

    Thanks. I hadn’t come across this condition before in my scripting, well worth knowing.

    Tim

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

Pin It on Pinterest