+1 888 340 6572

Miscellaneous > NONPRICEUNIVERSALCD

Article/Author: Omega Research Inc., 1996

Download: NONPRICEUNIVERSALCD.ELA

File Includes: Indicator - NonPriceUniversalCD

Category: Indicator > Miscellaneous

Description:

This indicator plots a different study depending on the number typed in the TYPE input. CD Stands for Commodity Channel Index through Directional Movement Index.

Usage:

The TYPE and Description of the Indicator can be found at the bottom of your PRINT-LOG. If nothing show up, look into the PRINT-LOG for proper use of the Inputs




Inputs:

Type:
1 - Commodity Channel Index
2 - Commodity Selection Index
3 - Cummulation
4 - Directional Movement Index
5 - Negative Directional Movement Index
6 - Positive Directional Movement Index
Price - the data series to use
Length - the trailing number of bars to use
Other - see below
Miscell - see below

EasyLanguage Code:
INPUT:TYPE(0),PRICE(CLOSE),LENGTH(10),OTHER(0),MISCELL(10);


VALUE3 = PRICE;

IF TYPE = 1 THEN BEGIN
VALUE1 = CCI(LENGTH);
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN
PRINT(TYPE:2:0," COMMODITY CHANNEL INDEX");
END;
IF TYPE = 2 THEN BEGIN
VALUE1 = CSI(OTHER,MISCELL,LENGTH) ;
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN BEGIN
PRINT(TYPE:2:0," COMMODITY SELECTION INDEX * * USE OTHER FOR MARGIN * *");
PRINT(TYPE:2:0," * * USE MISCELL FOR COMMISSION * *");
END;
END;
IF TYPE = 3 THEN BEGIN
VALUE1 = CUM(PRICE);
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN
PRINT(TYPE:2:0," CUMMULATION");
END;
IF TYPE = 4 THEN BEGIN
VALUE1 = DMI(LENGTH);
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN
PRINT(TYPE:2:0," DIRECTIONAL MOVEMENT INDEX");
END;
IF TYPE = 5 THEN BEGIN
VALUE1 = DMIMINUS(LENGTH);
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN
PRINT(TYPE:2:0," NEGATIVE DIRECTIONAL MOVEMENT INDEX");
END;
IF TYPE = 6 THEN BEGIN
VALUE1 = DMIPLUS(LENGTH);
IF DATE = LASTCALCDATE AND TIME = LASTCALCTIME THEN
PRINT(TYPE:2:0," POSITIVE DIRECTIONAL MOVEMENT INDEX");
END;

IF TYPE > 0 AND TYPE < 7 THEN
PLOT1(VALUE1,"NPUNIVCD");