NexusFi: Find Your Edge


Home Menu

 





Previous Hour High and Low times in easylanguage


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
onava
London/England, Zurich/Switzerland
 
Posts: 20 since Apr 2012
Thanks Given: 2
Thanks Received: 1

Hi,

does anybody know how to code how to get the time of the previous hour Highs and lows and store the time in a variable.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
CFTC Rewrites the Rulebook -- Kalshi Cracks $1B Non-Spor …
Prediction Markets & Event Contracts
The Backwardation Signal: How the CL Futures Curve Tells …
Commodities
Thursday May 28: GDP + Core PCE + Jobless Claims All at …
Traders Hideout
Prop Firms Are Banning Gold Trading as Record Prices Mak …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 NW27 
Newcastle, Australia
 
Experience: Intermediate
Platform: Multicharts 8 - Full Version
Broker: IB
Trading: SPI,FTSE100, 6E, 6A
Posts: 285 since Oct 2010
Thanks Given: 108
Thanks Received: 188

What is the time frame of the bars? Hourly? If so then it is just High[1] or Low[1]

When you say previous hours H/L's do you mean the last sixty minutes ie it is now 9:17, do you mean the Highest High between now and 8:17 or do you mean between 8:00 and 9:00?


Reply With Quote
  #3 (permalink)
 
Lampert's Avatar
 Lampert 
Calgary, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: IB, IQFeed
Trading: GC
Posts: 76 since Nov 2011
Thanks Given: 73
Thanks Received: 142


Assuming that you want the previous hour like 8:00 to 9:00, here is the code and a screenshot.

Len



 
Code
Variables:
	Minutes          (0),
	ThisHourHigh     (High),
	ThisHourLow      (Low),
	ThisHourTimeH    (0),
	ThisHourTimeL    (0),
	PrevHourHigh     (High),
	PrevHourLow      (Low),
	PrevHourTimeH    (0),
	PrevHourTimeL    (0);

Minutes = MinutesFromDateTime ( ELTimeToDateTime ( Time ) ) ;

If Minutes = 0 then begin
	PrevHourHigh = ThisHourHigh ;
	PrevHourTimeH = ThisHourTimeH ;
	PrevHourLow = ThisHourLow ;
	PrevHourTimeL = ThisHourTimeL ;
	ThisHourHigh = High ;
	ThisHourTimeH = Time ;
	ThisHourLow = Low ;
	ThisHourTimeL = Time ;
end ;

If High > ThisHourHigh then begin
	ThisHourHigh = High ;
	ThisHourTimeH = Time ;
end ;

If Low < ThisHourLow then begin
	ThisHourLow = Low ;
	ThisHourTimeL = Time ;
end ;

Plot1 ( PrevHourHigh , "PrevHourHigh" ) ;
Plot2 ( PrevHourLow, "PrevHourLow" ) ;


Reply With Quote
  #4 (permalink)
onava
London/England, Zurich/Switzerland
 
Posts: 20 since Apr 2012
Thanks Given: 2
Thanks Received: 1

Will try it out.. Looks good though. Thanks


Reply With Quote




Last Updated on April 26, 2012


© 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