NexusFi: Find Your Edge

Home Menu


Second highest high

Discussion in ThinkOrSwim

      Top Posters
    1. looks_one badiboy with 1 posts (0 thanks)
    2. looks_two mark91345 with 1 posts (0 thanks)
    3. looks_3 kjhosken with 1 posts (0 thanks)
    4. looks_4 mborne77 with 1 posts (0 thanks)
    1. trending_up 596 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments

Search this Thread
  #1 (permalink)
Los Angeles, CA
Posts: 1 since Mar 2023
Thanks Given: 0
Thanks Received: 0

I am trying to find the second-highest high, every 42 days (every couple months).

If I use plot x = highest(high,42), that gives me the "first-highest" high, but that's not what I want.
Can anyone help?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC Advanced Simulated Trading.
Better Renko Gaps
The Elite Circle
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NexusFi Journal Challenge - June 2024
Feedback and Announcements
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Vinny E-Mini & Algobox Review TRADE ROOM
83 thanks
GFIs1 1 DAX trade per day journal
45 thanks
Risk/reward above 1.0
21 thanks
What Do You Replace Positive Thing With
18 thanks
Big Mike in Ecuador
14 thanks
  #2 (permalink)
Posts: 7 since Oct 2020
Thanks Given: 4
Thanks Received: 2

Is the 42 days always taken back from the current day? What happens in the previous 42 days set? Is there a second high for each set of 42 days looking back from current day?

Reply With Quote
  #3 (permalink)
Charleston, SC USA
Posts: 3 since Mar 2023
Thanks Given: 3
Thanks Received: 0

I assume you dont want to do it manually by looking at the charts and drawing a line at the 2nd high?, ur lookin for a way to set the 2nd high automatically, correct?

Reply With Quote
  #4 (permalink)
Seattle, WA/USA
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35

I'm pretty rusty on thinkscript, but this may at least give you seomthing to work on:

def h42 = highest(high,42);
plot 2h42 = fold i = 0 to 42 with price = Double.NaN while IsNaN(price) do if getValue(high, i, 42) < h42 then getValue(high, i, 42) else Double.NaN;

Follow me on Twitter Reply With Quote

Last Updated on April 9, 2023

© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts