CCI Correction

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

CCI Correction

Postby isamegrelo » Wed Aug 15, 2018 1:41 pm

L=130
B=26

CCL = CCI[L]
CCS = CCI[B]

IF CCL > 100 THEN
LASTUP = 1
LASTDW = 0
UP = 0
DW = 0
ENDIF
IF CCL < -100 THEN
LASTDW = -1
LASTUP = 0
UP = 0
DW = 0
ENDIF

IF CCS > 100 THEN
BLASTUP = 1
BLASTDW = 0
UP = 0
ENDIF
IF CCS < -100 THEN
BLASTDW = -1
BLASTUP = 0
DW = 0
ENDIF

IF LASTUP = 1 AND BLASTDW[1] = -1 THEN
IF CCS[1]<0 AND CCS>0 THEN
UP = 1
DW = 0
ELSE
UP = 0
DW = 0
ENDIF
ENDIF

IF LASTDW = -1 AND BLASTUP[1] = 1 THEN
IF CCS[1]>0 AND CCS<0 THEN
DW = -1
UP = 0
ELSE
DW = 0
UP = 0
ENDIF
ENDIF

Return LASTUP coloured (0,255,0) as "LONG", LASTDW coloured (255,0,0) as "SHORT",UP coloured (0,0,0) as "UP", DW coloured (0,0,0) as "DW",0
isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 27 guests