[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alert condition changes indicator graph?????????????



PureBytes Links

Trading Reference Links

When I add the alert to this indicator  it completely changes the graph of 
the indicator.   Can someone spot  what I did wrong.

Thanks
Randy

inputs:
Length( 2 ),  Phase(0) ;
variables:
BullPower( 0 ) ;

{ Find Category of  Bull Power }
if Close < Open then
if Close[1] < Open  then
BullPower = 
MaxList( High - Close[1], Close -  Low )
else
BullPower = 
MaxList( High - Open,  Close - Low)
else if Close > Open then
if Close[1] > Open  then
BullPower = High - Low
else
BullPower =  
MaxList( Open - Close[1], High - Low )
else if ( High -  Close ) > ( Close - Low ) then
if Close[1] < Open then
BullPower = MaxList( High -  Close[1],
Close - Low  )
else
BullPower = High - Open 
else if High - Close <  Close - Low then
if Close[1] > Open then
BullPower = High  - Low 
else
BullPower = MaxList( Open -  Close[1],
High - Low ) 
else if Close[1] > O  then
BullPower = MaxList( High - Open, 
Close - Low )
else  if Close[1] < O then
BullPower = MaxList( Open 
-  Close[1], High - Low )
else
BullPower = High - Low  ;


Plot1( JRC.JMA.2K( BullPower, Length , Phase), "BullPower")  ;

{ Alert criteria }

if  JRC.JMA.2K( BullPower,  Length, Phase ) > JRC.JMA.2K( BullPower, Length, 
Phase )[1] and
JRC.JMA.2K( BullPower, Length, Phase )[1] <= JRC.JMA.2K( BullPower, Length,  
Phase )[2] then
Alert( "Indicator turning up" ) 
else  if JRC.JMA.2K( BullPower, Length, Phase )  < JRC.JMA.2K( BullPower,  
Length, Phase )[1] and
JRC.JMA.2K( BullPower, Length, Phase )[1]  >= JRC.JMA.2K( BullPower, Length, 
Phase )[2] then
Alert(  "Indicator turning down" ) ;