Close at the high of the day/week/month script

Optuma Forums Optuma Scripting Close at the high of the day/week/month script

This topic contains 3 replies, has 3 voices, and was last updated by Darren Darren 5 days, 9 hours ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #48547

    Hugh
    • Topics: 1
    • Replies: 1
    • Posts: 2

    Hi guys,

    I’m looking to scan for stocks that are closing their candle at the high (or within 15%) of the high of the day/week/month. Can you please help me with this code so I can start using it for scans? 

    Cheers, Hugh

    #48603
    Peter
    Peter
    • Topics: 1
    • Replies: 46
    • Posts: 47

    Hi Hugh

    To scan for Close that crosses the high of the last week, month you can use the following script, and change the BACKTYPE variable to Days, Weeks or Months.

    Close() CrossesAbove HIGHESTHIGH(BACKTYPE=Weeks, BARS=1)

    To check for a crossover that’s within 15% of the highest high you can use

    Close() CrossesAbove (HIGHESTHIGH(BACKTYPE=Weeks, BARS=1) *(1-0.15))

    Which will bring the high down 15% and check for a crossover of that value.

    Regards
    Peter

    #48607

    Hugh
    • Topics: 1
    • Replies: 1
    • Posts: 2

    Close of high/15% – no relation to previous week

    Hey Peter,

    Thanks for getting back to me – really appreciate it. Thanks for your suggestion – but i am after a scan that finds the close high or within 15% of the day/week/month. No crossover from the last week candle. Ultimately i just want to perform a scan at the end of the week that shows me stocks that have closed at the high of the week at or within 15% of the high – with no concern about what the price action has been in the prior weeks.

     

    If you could help me with this – that would be fantastic!

     

    Cheers

     

    #48611
    Darren
    Darren
    • Topics: 28
    • Replies: 145
    • Posts: 173

    Hi Hugh,

    Just replace the CrossesAbove in the formula with > for greater than.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close