+1 888 340 6572

Miscellaneous > Bar Between D or ID

Article/Author: Gaston Sanchez for Omega Research Inc., 1996

Download: BARS_BETWEEN.ELA

File Includes: Indicator - Bar Between D or ID

Category: Indicator > Miscellaneous

Description:

Plots the Number of bars between two User Specified Dates (and times if one is using Intra-Day Data)

Usage:

Use data format YYYMMDD (2002 year=102). If you are using Daily data simply leave the BegTime and EndTime Inputs at the default values of zero.



Inputs:

BegDate - begin date
BegTime - begin time
EndDate - end date
EndTime - end time

EasyLanguage Code:
VARS:  BEGBAR(0), COUNT(0);


INPUTS: BEGDATE(0), BEGTIME(0), ENDDATE(0), ENDTIME(0);

IF DATE=BEGDATE AND (TIME=BEGTIME OR BEGTIME = 0) THEN BEGIN
BEGBAR=BARNUMBER;
PLOT1(1,"BEGDATE");
END;

IF BEGBAR<>0 AND BEGBAR<=BARNUMBER THEN BEGIN
COUNT = COUNT[1]+1;
PLOT2(COUNT,"BAR#");
END;

IF DATE=ENDDATE AND (TIME=ENDTIME OR ENDTIME = 0) THEN BEGIN
PLOT3(COUNT,"ENDDATE");
BEGBAR=0;
END;

IF CHECKALERT THEN BEGIN
IF DATE=ENDDATE AND TIME=ENDTIME THEN
ALERT=TRUE;
END;