NexusFi: Find Your Edge


Home Menu

 





Highest High or Lowest Low past 3 days


Discussion in EasyLanguage Programming

Updated
    1. trending_up 5,318 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 olobay 
Montreal
 
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 364 since Jul 2011

Hi,

Using 24 hour GLOBEX intraday data, how can I get the highest high of the past 5 sessions and the lowest low of the past 5 sessions? Sessions start at 6:00pom ET the day before the close at 5:00pm ET the next day.

Thanks.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
February Derivatives Boom -- Every Futures Asset Class S …
Traders Hideout
Topstep Slashes XFA Payout Caps by Up to 60% -- Flagship …
Funded Trading Evaluation Firms
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639


Hi olobay,

you will have to track the extremes for every session using two variables (one for the high, one for the low). At the beginning of a new session you store the tracking variables in an array (so you need two arrays for that) and reset the tracking variables.
The array has the size of 5 in your example. You'll also need a counter that increments at every new session, starting from 0 and once it's > 4 it has to reset to 0. This will be used to store the tracking variables.

Once you have stored 5 values within your array and starting to overwrite values you can start calculating the highest high and lowest low. For that I'd suggest using a third array. You copy the values of the array containing the highest highs of the last 5 sessions to the new array and sort it in descending order. This gives you the highest high of the last 5 session at position 0 of the new array.
For the lowest low you'd copy the values into the new array and sort it in ascending order. Again giving you the lowest low at position 0.

This is your blueprint and should get you what you want.

Regards,
ABCTG



olobay View Post
Hi,

Using 24 hour GLOBEX intraday data, how can I get the highest high of the past 5 sessions and the lowest low of the past 5 sessions? Sessions start at 6:00pom ET the day before the close at 5:00pm ET the next day.

Thanks.


Follow me on X Reply With Quote
Thanked by:




Last Updated on July 27, 2014


© 2026 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 - Downloads - Top
no new posts