Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 06-15-2010, 07:45 PM   #1

Dinerotrader's Avatar

Join Date: May 2009
Location: Colorado
Posts: 729
Ignore this user

Thanks: 1,610
Thanked 703 Times in 396 Posts

Question Prior Day High/Low Indicator Needed - OEC

I use OEC and am in need of an indicator that just tracks the prior day's high and low. Does anyone have such an indicator in EL that would compile in OEC?

There is an indicator for the current day High/low but not the prior day (see pic below for what the current day settings look like).

Attached Thumbnails
Prior Day High/Low Indicator Needed - OEC-6-15-2010-01.png  
Dinerotrader is offline  
Reply With Quote
Old 06-16-2010, 10:26 AM   #2

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: Prior Day High/Low Indicator Needed - OEC

dah.... i totally had one but I never used it so literally last week I deleted it... i'll try looking for the code but don't hold your breath!
daedalus is offline  
Reply With Quote
Old 06-16-2010, 10:41 AM   #3

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Were you looking to from RTH hours or from globex open?
trader273 is offline  
Reply With Quote
Old 06-16-2010, 10:44 AM   #4

Dinerotrader's Avatar

Join Date: May 2009
Location: Colorado
Posts: 729
Ignore this user

Thanks: 1,610
Thanked 703 Times in 396 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Quote:
Originally Posted by trader273 »
Were you looking to from RTH hours or from globex open?
I only trade during RTH so I need the RTH high/low from the prior day on the current day RTH time period.
Dinerotrader is offline  
Reply With Quote
Old 06-16-2010, 10:45 AM   #5

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Quote:
Inputs:
_Time_Open(1800),
Color_PDH(Red),Color_PDL( Green);

vars:PDH(0),PDL(0),YestHi (0),YestLo(0),start(false );


if time < _Time_open then Start = true;
If Time >= _Time_open and Start = true then begin
PDH = High;
PDL = Low;
YestHi = PDH[1];
YestLo = PDL[1];
Start = false;
end;

If High > PDH then PDH = High;
If Low < PDL then PDL = Low;


plot1(yesthi,"PH",color_p dh);
plot2(yestlo,"PL",color_p dl);
This will plot from globex open to globex close

Last edited by trader273; 06-16-2010 at 10:50 AM.
trader273 is offline  
Reply With Quote
Old 06-16-2010, 10:47 AM   #6

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Ah, i pasted the wrong one. Let me find the correct one. That one ^ works for globex open to globex close, but not RTH.
trader273 is offline  
Reply With Quote
Old 06-17-2010, 08:45 AM   #7

Trendup_'s Avatar

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

Thanks: 73
Thanked 42 Times in 33 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Quote:
Originally Posted by Dinerotrader »
I use OEC and am in need of an indicator that just tracks the prior day's high and low. Does anyone have such an indicator in EL that would compile in OEC?
Just set the time and line colors.

Attached Thumbnails
Prior Day High/Low Indicator Needed - OEC-hl.png  
Attached Files
File Type: zip OHLCyesterday.zip (429 Bytes, 13 views)
Trendup_ is offline  
Reply With Quote
The Following 2 Users Say Thank You to Trendup_ For This Useful Post:
daedalus (06-17-2010), Dinerotrader (06-17-2010)
Old 06-17-2010, 03:48 PM   #8

Dinerotrader's Avatar

Join Date: May 2009
Location: Colorado
Posts: 729
Ignore this user

Thanks: 1,610
Thanked 703 Times in 396 Posts

Re: Prior Day High/Low Indicator Needed - OEC

Quote:
Originally Posted by Trendup_ »
Just set the time and line colors.
This looks pretty good except I can't tell it when the close is. I only want to have it draw the high and low for the pit hours of oil, not open to next day open. Is there a way I can add a close time into the code. I pasted the code below. Thanks.

Inputs:Time_Start(0630);

variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ),
var7( 0 ),
var8( 0 ) ;

if Date <> Date[1] then begin

var0 = var0 + 1 ;
var1 = var2 ;
var3 = var4 ;
var5 = var6 ;
var7 = Close[1] ;
var2 = Open ;
var4 = High ;
var6 = Low ;
end
else
begin
if High > var4 then
var4 = High ;
if Low < var6 then
var6 = Low ;
end ;
condition1 = var0 >= 2 and BarType < 3 ;
if condition1 then

begin
Plot1( var1, "YestOpen" ) ;
Plot2( var3, "YestHigh" ) ;
Plot3( var5, "YestLow" ) ;
Plot4( var7, "YestClose" ) ;
end ;
Dinerotrader is offline  
Reply With Quote

Reply

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


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