+1 888 340 6572

Mark

Article/Author: Omega research Inc., 1997

Download: mark.ela

File Includes:
Signal - Sp%R
Function - AddTime

Category: Strategy > Mark

Description: This strategy based on SwingLow and Percent R.

Inputs:

Signal Sp%R ELA Code:
VALUE1=SWINGLOWBAR(2,PERCENTR(5),1,5);

VALUE2=SWINGLOWBAR(1,PERCENTR(5),1,5);

IF TIME < 1530 THEN BEGIN
IF VALUE1 > -1 AND PERCENTR(5)[VALUE1] <= 10 THEN BEGIN
IF CLOSE-LOWEST(LOW,4)<100 POINTS THEN BEGIN
IF LOW[VALUE2]<LOW[VALUE1] THEN BEGIN
IF VALUE2>0 AND LOW>LOW[VALUE2] THEN BUY AT MARKET;
END;
END;
END;
END;
EXITLONG("LOW") AT LOWEST(LOW,4)-5 POINTS STOP;
IF BARSSINCEENTRY>0 THEN EXITLONG("100LIM") AT ENTRYPRICE + 100 POINTS LIMIT;
IF BARSSINCEENTRY>0 AND TIME>=ADDTIME(ENTRYTIME,60) THEN EXITLONG("TIME") AT MARKET;

VALUE3=SWINGHIGHBAR(2,PERCENTR(5),1,5);
VALUE4=SWINGHIGHBAR(1,PERCENTR(5),1,5);

IF TIME < 1530 THEN BEGIN
IF VALUE3 > -1 AND PERCENTR(5)[VALUE3] >= 90 THEN BEGIN
IF HIGHEST(HIGH,4)-CLOSE<100 POINTS THEN BEGIN
IF HIGH[VALUE4]>HIGH[VALUE3] THEN BEGIN
IF VALUE4>0 AND HIGH<HIGH[VALUE4] THEN SELL AT MARKET;
END;
END;
END;
END;
EXITSHORT("HIGH") AT HIGHEST(HIGH,4)+5 POINTS STOP;
IF BARSSINCEENTRY>0 THEN EXITSHORT("100SH") AT ENTRYPRICE - 100 POINTS LIMIT;
IF BARSSINCEENTRY>0 AND TIME>=ADDTIME(ENTRYTIME,60) THEN EXITSHORT("TIMESH") AT MARKET;

PRINT(DATE,VALUE1,VALUE2);


Function AddTime ELA Code:
{ USER FUNCTION: ADDTIME

INPUTS : XTIME - TIME IN 24 HOUR FORMAT.
MINUTES - AMOUNT TO ADD/SUBTRACT TO XTIME.

SAMPLE USAGE :
IF (TIME[0] > ADDTIME (SESS1STARTTIME, +30))
THEN ...

RETURNS: ADJUSTED TIME IN 24 HOUR FORMAT.
PROPERTIES
[ ] AUTO DETECT
[*] SIMPLE
[ ] SERIES

PROVIDED BY PRODUCT SUPPORT DEPT.
OF OMEGA RESEARCH, INC.
}

INPUTS : XTIME (NUMERICSIMPLE),
MINUTES (NUMERICSIMPLE) ;

ADDTIME = MINUTESTOTIME (TIMETOMINUTES (XTIME) + MINUTES) ;