[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RT_previous day



PureBytes Links

Trading Reference Links

Hello RT's,

speaking of yesterdays references and plotting them into today.  i have
this code written so that you can only have it plot when the price is
near either yesterdays high or yesterdays low.   otherwise it stays
nicely out of the way.  the chart attached shows the sp in the upper
part and the same indicator applied to the tick below, which oscillates
above and below a zero line.


=========code starts below this line=========

input:tyme(1),ptyme(0935),Near(1);
var:nextyme(0);

VALUE3=(HighYesterday+near);
VALUE1=HighYesterday;
VALUE5=(HighYesterday-near);
VALUE7=(HighYesterday-LowYesterday);
VALUE4=(LowYesterday+near);
VALUE2=LowYesterday;
VALUE6=(LowYesterday-near);
VALUE8=(CloseYesterday);

IF (TrueHigh >= VALUE5 and TrueLow <= VALUE3)THEN PLOT1(VALUE1,"YH");
IF (TrueHigh >= VALUE6 and TrueLow <= VALUE4)THEN PLOT2(VALUE2,"YL");
{
PLOT3(VALUE8,"CY");
}
IF CheckAlert Then Begin
  IF (TrueHigh >= VALUE1 and TrueLow <= VALUE1)
  or (TrueHigh >= VALUE2 and TrueLow <= VALUE2)
  or (TrueHigh >= VALUE3 and TrueLow <= VALUE3)
  or (TrueHigh >= VALUE4 and TrueLow <= VALUE4)
  or (TrueHigh >= VALUE5 and TrueLow <= VALUE5)
  or (TrueHigh >= VALUE6 and TrueLow <= VALUE6)
  Then Alert = TRUE;End;

if d>d[1]then nextyme=timetominutes(Sess1FirstBarTime)+tyme;
if timetominutes(t)>=nextyme then begin 
nextyme=nextyme+tyme;

if d=currentdate then begin

VALUE44=(truehigh+truelow)/2;

if (TrueHigh >= VALUE1 and TrueLow <= VALUE3)then 
PRINT(date:6:0, Time:5:0, "  HighYesterday + ", value1:4:4, "  Above + ", TrueLow:4:4,  "  C.N.#",commoditynumber:6:0);
if (TrueHigh >= VALUE1 and TrueLow <= VALUE1)then
PRINT(date:6:0, Time:5:0, "  HighYesterday = ", value1:4:4, "  Price = ", value44:4:4,  "  C.N.#",commoditynumber:6:0);
if (TrueHigh >= VALUE5 and TrueLow <= VALUE1)then
PRINT(date:6:0, Time:5:0, "  HighYesterday - ", value1:4:4, "  Below - ", TrueHigh:4:4,  "  C.N.#",commoditynumber:6:0);
if (TrueHigh >= VALUE2 and TrueLow <= VALUE4)then
PRINT(date:6:0, Time:5:0, "  LowYesterday + ", value2:4:4, "  Above + ", TrueLow:4:4,  "  C.N.#",commoditynumber:6:0);
if (TrueHigh >= VALUE2 and TrueLow <= VALUE2)then
PRINT(date:6:0, Time:5:0, "  LowYesterday = ", value2:4:4, "  Price = ", value44:4:4,  "  C.N.#",commoditynumber:6:0);
if (TrueHigh >= VALUE6 and TrueLow <= VALUE2)then
PRINT(date:6:0, Time:5:0, "  LowYesterday - ", value2:4:4, "  Below - ", TrueHigh:4:4,  "  C.N.#",commoditynumber:6:0);

end;end;

if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT("-------Range Begin-------");end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT(date:6:0, Time:5:0, "  HighYesterday=", value1:3:4,  "  C.N.  ",commoditynumber:6:0);end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT(date:6:0, Time:5:0, "  RangeYesterday=", value7:3:4,  "  C.N.  ",commoditynumber:6:0);end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT(date:6:0, Time:5:0, "  LowYesterday=", value2:3:4,  "  C.N.  ",commoditynumber:6:0);end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT("-------Range End-------");end;end;
if d=currentdate then begin
IF t=ptyme and t[1]<ptyme then begin 
PRINT( );end;end;


========code ends here=========


.oİş°¨¨°şİ[ MARK BROWN ]İş°¨¨°şİo.

Attachment Converted: "c:\eudora\attach\yhl.gif"

Attachment Converted: "c:\eudora\attach\Mbyhlrg.ela"