+1 888 340 6572

Miscellaneous > Market Mood

Article/Author: Origin: Omega-list. Coded by: Mark Brown

Download: Mood.ela

File Includes: Indicator - Market Mood

Category: Indicator > Miscellaneous

Description: Market Mood - a fun indicator to define the market "mood", i.e. to detect the uptrend or downtrend.

Usage:

Note. To use the indicator you will need data containing information on the DnTick и UpTick.




Inputs:

Flen - Number of bars to calculate

EasyLanguage Code:
INPUTS: FLEN(100);

VARS: AX(0),FHI(0),FLO(0),MIDD(0),STEM(0),RL(0),LL(0),BLH(0),BRH(0),TLH(0),
TRH(0),LA(0),RA(0);
IF CURRENTBAR = 1 THEN BEGIN
FHI = HIGHEST(H,FLEN);FLO=LOWEST(L,FLEN);
AX = FHI-FLO;
STEM = TL_NEW(DATE,TIME,FHI-.6*AX,DATE,TIME,FHI-.4*AX);
RL = TL_NEW(DATE,TIME,FHI-.4*AX,DATE,TIME,FHI-.2*AX);
LL = TL_NEW(DATE,TIME,FHI-.2*AX,DATE,TIME,FHI-.1*AX);
BLH = TL_NEW(DATE,TIME,FHI-.2*AX,DATE,TIME,FHI-.1*AX);
BRH = TL_NEW(DATE,TIME,FHI-.1*AX,DATE,TIME,FHI-.4*AX);
TLH = TL_NEW(DATE,TIME,FHI-.6*AX,DATE,TIME,FHI-.2*AX);
TRH = TL_NEW(DATE,TIME,FHI-.7*AX,DATE,TIME,FHI-.6*AX);
LA = TL_NEW(DATE,TIME,FHI-.7*AX,DATE,TIME,FHI-.6*AX);
RA = TL_NEW(DATE,TIME,FHI-.3*AX,DATE,TIME,FHI-.2*AX);
TL_SETEXTLEFT(STEM, FALSE);TL_SETEXTRIGHT(STEM, FALSE);
TL_SETEXTLEFT(RL, FALSE);TL_SETEXTRIGHT(RL, FALSE);
TL_SETEXTLEFT(LL, FALSE);TL_SETEXTRIGHT(LL, FALSE);
TL_SETEXTLEFT(BLH, FALSE);TL_SETEXTRIGHT(BLH, FALSE);
TL_SETEXTLEFT(BRH, FALSE);TL_SETEXTRIGHT(BRH, FALSE);
TL_SETEXTLEFT(TLH, FALSE);TL_SETEXTRIGHT(TLH, FALSE);
TL_SETEXTLEFT(TRH, FALSE);TL_SETEXTRIGHT(TRH, FALSE);
TL_SETEXTLEFT(LA, FALSE);TL_SETEXTRIGHT(LA, FALSE);
TL_SETEXTLEFT(RA, FALSE);TL_SETEXTRIGHT(RA, FALSE);
IF FALSE THEN PLOT1(0,"DUH");
END;
IF CURRENTBAR > 1 THEN BEGIN
FHI = HIGHEST(H,FLEN);FLO=LOWEST(L,FLEN); AX = FHI-FLO; MIDD =
FLEN/2; TL_SETEND(STEM,DATE[MIDD],TIME[MIDD],FHI-.4*AX);
TL_SETBEGIN(STEM, DATE[MIDD], TIME[MIDD], FHI-.6*AX);
TL_SETEND(RL,DATE[MIDD],TIME[MIDD],FHI-.6*AX); TL_SETBEGIN(RL,
DATE[MIDD-MIDD/2], TIME[MIDD-MIDD/2], FLO);
TL_SETEND(LL,DATE[MIDD],TIME[MIDD],FHI-.6*AX); TL_SETBEGIN(LL,
DATE[MIDD+MIDD/2], TIME[MIDD+MIDD/2], FLO);
TL_SETEND(BLH,DATE[MIDD+MIDD/6],TIME[MIDD+MIDD/6],FHI-.2*AX);
TL_SETBEGIN(BLH, DATE[MIDD], TIME[MIDD], FHI-.4*AX);
TL_SETEND(BRH,DATE[MIDD-MIDD/6],TIME[MIDD-MIDD/6],FHI-.2*AX);
TL_SETBEGIN(BRH, DATE[MIDD], TIME[MIDD], FHI-.4*AX);
TL_SETEND(TLH,DATE[MIDD],TIME[MIDD],FHI); TL_SETBEGIN(TLH,
DATE[MIDD+MIDD/6], TIME[MIDD+MIDD/6], FHI-.2*AX);
TL_SETEND(TRH,DATE[MIDD],TIME[MIDD],FHI); TL_SETBEGIN(TRH,
DATE[MIDD-MIDD/6], TIME[MIDD-MIDD/6], FHI-.2*AX);
IF CLOSE > CLOSE[10] THEN BEGIN
TL_SETEND(LA,DATE[FLEN],TIME[FLEN],FHI-.2*AX);
TL_SETBEGIN(LA, DATE[MIDD], TIME[MIDD], FHI-.5*AX);
TL_SETEND(RA,DATE[1],TIME[1],FHI-.2*AX);
TL_SETBEGIN(RA, DATE[MIDD], TIME[MIDD], FHI-.5*AX);
END ELSE BEGIN
TL_SETEND(LA,DATE[FLEN],TIME[FLEN],FHI-.8*AX);
TL_SETBEGIN(LA, DATE[MIDD], TIME[MIDD], FHI-.5*AX);
TL_SETEND(RA,DATE[1],TIME[1],FHI-.8*AX);
TL_SETBEGIN(RA, DATE[MIDD], TIME[MIDD], FHI-.5*AX);
END;
END;