NexusFi: Find Your Edge


Home Menu

 





Highest High or Lowest Low past 3 days


Discussion in EasyLanguage Programming

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




 
Search this Thread

Highest High or Lowest Low past 3 days

  #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?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


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 Twitter Reply With Quote
Thanked by:




Last Updated on July 27, 2014


© 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