bull fear & bear fear ----expert formula

pkgmtnl

Well-Known Member
#1
dear fellow friends,
this is the formula for "Bull Fear & Bear Fear"
Its not working correctly,
anybody if correct it and post, i will b thankful

Bull Fear and Bear Fear Expert

HIGHLIGHTS
Name: Bull Fear
Color: Blue
Condition:

n := 12 {Time periods};
BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n);
CLOSE > BullFear


Name: Bear Fear
Color: Red
Condition:

n := 12 {Time periods};
BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n);
CLOSE < BearFear
 
#3
pkgmtnl,
Add two lines to complete the AFL it will work.

//Bull Fear and Bear Fear Expert
_SECTION_BEGIN;
SetChartOptions(0,chartShowArrows|chartShowDates);

n = 12;
BullFear = (HHV(High,n) - LLV(High,n))/2 + LLV(High,n);

BearFear = (HHV(Low,n) - LLV(Low,n))/2 + LLV(Low,n);

Mycolor = IIf( C>BullFear , colorBlue , IIf( C< BearFear , colorOrange , colorGreen ));
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar|styleThick );