NexusFi: Find Your Edge


Home Menu

 





Highest High or Lowest Low past 3 days


Discussion in EasyLanguage Programming

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




 
 

Highest High or Lowest Low past 3 days

 
 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

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
 
 
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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
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