Welcome to the Traders Laboratory Forums.
Open E Cry The unofficial Open E Cry forum.

Reply
Old 03-23-2009, 10:36 AM   #1

brownsfan019's Avatar

Join Date: Jan 2007
Location: USA
Posts: 4,255
Ignore this user

Thanks: 1,912
Thanked 1,789 Times in 895 Posts

Plotting Globex High and Low

Here's the code from this thread that will plot the Globex High and Low in OEC.

Code:
Inputs: Session_Start(930), Session_End(1615); 

vars: G_H(0), G_L(0), Globex(false); 

If Globex and Time >= Session_Start and time < Session_End 
then Globex = false; 

if Globex = false and Time >= Session_End then begin // Should only execute first tick of Globex session 

G_H=High; G_L=Low; 
Globex = True; end; 

If Globex then begin 
If High>G_H then G_H=High; 
if Low< G_L then G_L=low; 
end; 

Plot1(G_H,"G-High"); 
Plot2(G_L,"G-Low");

Note - as the code stands currently, it will include data from Sunday, which means your Mon charts will actually be off if comparing the high/low to what the CME is reporting. Another post made to see if there's a workaround to this by trader273.
Attached Files
File Type: txt Globex High and Low.txt (463 Bytes, 15 views)
brownsfan019 is offline  
Reply With Quote
Old 03-25-2009, 08:32 PM   #2

Trendup_'s Avatar

Join Date: Sep 2008
Location: DownUnder
Posts: 136
Ignore this user

Thanks: 73
Thanked 42 Times in 33 Posts

Re: Plotting Globex High and Low

Hi, can't compile the coding, got the following error (attached).
Any ideas?
Thanks



Quote:
Originally Posted by brownsfan019 »
Here's the code from this thread that will plot the Globex High and Low in OEC.

Code:
Inputs: Session_Start(930), Session_End(1615); 

vars: G_H(0), G_L(0), Globex(false); 

If Globex and Time >= Session_Start and time < Session_End 
then Globex = false; 

if Globex = false and Time >= Session_End then begin // Should only execute first tick of Globex session 

G_H=High; G_L=Low; 
Globex = True; end; 

If Globex then begin 
If High>G_H then G_H=High; 
if Low< G_L then G_L=low; 
end; 

Plot1(G_H,"G-High"); 
Plot2(G_L,"G-Low");

Note - as the code stands currently, it will include data from Sunday, which means your Mon charts will actually be off if comparing the high/low to what the CME is reporting. Another post made to see if there's a workaround to this by trader273.
Attached Thumbnails
Plotting Globex High and Low-errors.jpg  
Trendup_ is offline  
Reply With Quote
Old 03-25-2009, 10:57 PM   #3

Join Date: Jan 2008
Location: San Francisco
Posts: 394
Ignore this user

Thanks: 17
Thanked 338 Times in 156 Posts

Re: Plotting Globex High and Low

Alternative Code:

vars: firstbar(0), length(0);
if date>date[1] then begin
firstbar=currentbar;
end;

length=(currentbar-firstbar);

if time<630 then value1=highest(h,length);
if time<630 then value2=lowest(l,length);


plot1(value1);
plot2(value2);


value3=highest(h,length);
value4=lowest(l,length);

plot3(value3);
plot4(value4);


---------------------------------------

Note, my time is 630 for West Coast time, adjust as necessary.

Plots 1 and 2 Holds Globex Values
Plots 3 and 4 adjust for new Highs and Lows of pit session (holds globex value if not or until violated)
Just delete the plot statements you don't want.



Attached Thumbnails
Plotting Globex High and Low-globex-high-low.png  
Frank is offline  
Reply With Quote
The Following 2 Users Say Thank You to Frank For This Useful Post:
brownsfan019 (03-25-2009), Trendup_ (03-25-2009)
Old 03-26-2009, 06:38 AM   #4

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: Plotting Globex High and Low

Good job Frank. Another small programmers tip using the highest and lowest functions will iterate through all the bars each time you run through the code. The construct you used previously comparing the high now with the highest high previously is a more efficient way of doing things (not a big deal in this instance but a good programming habit to avoid loops if possible). Thats the fun thing about coding, many ways of doing things. Not trying to be critical just a 'top tip' to pass on. You could use your date/time logic with your previous high low logic (or not) if you so desired. Interestingly the code will look a little longer but will run tighter.

On another topic I wonder why one would exclude Sunday Night (or even Monday morning) from out of hours calculations? They still represent a level where the tide turned.

Last edited by BlowFish; 03-26-2009 at 06:46 AM.
BlowFish is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Globex High and Low in Easylanguage trader273 Coding Forum 24 03-23-2009 07:08 AM
Can Someone Tell Me How to Get an Indicator to Stop Plotting shortski Coding Forum 31 02-08-2009 12:49 PM
Overnight Session: Looking at globex high & low Soultrader Technical Analysis 15 12-25-2008 08:08 PM
[Plotting Fib Retracements in Real-time] Soultrader Trading Videos 3 05-06-2007 11:22 AM
Plotting Market Profile on TS dah7 Market Profile 9 03-16-2007 09:49 PM

All times are GMT -4. The time now is 02:15 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.