How to code new 4W highs 2 weeks back

Optuma Forums Optuma Scripting How to code new 4W highs 2 weeks back

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66713
    Rahul
    • Topics: 1
    • Replies: 1
    • Posts: 2

    Hello,
    I’m a beginner in coding, can anyone please help me with the below?
    Coding new 4 week highs that happened in the third last weekly bar.

    #66715
    Rahul
    • Topics: 1
    • Replies: 1
    • Posts: 2

    This is the code I use to identify new 4W highs that happened in the previous week:

    highesthigh(BACKTYPE=Weeks, BARS=4, INCBAR=False, SIGNALONLY=True)

    But how do I find new 4W highs that happened in the third last weekly bar including the current weekly bar?

    #66718
    Matthew
    • Topics: 5
    • Replies: 487
    • Posts: 492

    Hi,

    You can use the TIMESINCESIGNAL() function to do this.

    Here is an example:

    This shows where the current highest high value was from 2 bars before the current weekly chart.

    Ex7

    This was designed to run on a Weekly chart or Weekly Timeframe scan.

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

Pin It on Pinterest