How to highlights ATR Change daily in greater than (Atr>0.85)

AddColumn(ROC(C,1),"%Daily",1.2,IIf(C>Ref(C,-1),colorLime,colorRed),colorDefault,70);
//Percentage Fall From Days High

Filter = 1;
C1 = C - H;
CHANGEFAll=100*(C1/H);
AddColumn( Changefall, "%D_Hi_fall",1.2,colorWhite,colorPlum);


//Percentage recovered from Day's Low

Filter = 1;
C1 = C - L;
CHANGERISE=100*(C1/L);
AddColumn( ChangeRise, "%D_Lo_Gain",1.2,colorBlack,colorAqua);

TimeFrameSet(2*in15Minute);//30min

H1 = HHV(High, 50) ;
H2= (H1-Close)< .005*Close;


L1 = LLV(Low, 50) ;
L2 = (Close-L1) < .005*Close ;

TimeFrameRestore() ;
TimeFrameExpand(H2,2*in15Minute);
TimeFrameExpand(L2,2*in15Minute);
Filter =1;

JOJO =
WriteIf(H2, "DC_30min_UP",
WriteIf(L2, "DC_30min_DOWN",
""));
Filter=1;
JOJOCOLOR = IIf(H2, colorLime ,IIf(L2, colorRed,colorDefault));
AddTextColumn(JOJO, "30minDC_Status", 6.2,colorWhite ,JOJOCOLOR,width=90);



ATR_change = (ATR(15)-Ref(ATR(15),-1));
ATR_changeresult = (ATR(15)-Ref(ATR(15),-1))>=0.85;

AddColumn(ATR_change,"ATR_chg(0.85)",1.4,colorBlack,IIf(ATR(15)<100>=0.85,colorYellow,colorDefault));
AddColumn(ATR(15),"ATR_15",1.4);
AddColumn(ROC(ATR(15),1),"%ATR_Moves",1.2);

atr0.85

Don't know why you are referring to ATR(15) when you want to check ATR_change value.
Anyway this is what you want i think.

AddColumn(ATR_change,"ATR_chg(0.85)",1.4,colorBlack,IIf(ATR_change<100 and ATR_change>=0.85,colorYellow,colorDefault));

Or like this

ATRcolor=Iif(ATR_change<100 AND ATR_change>=0.85,colorYellow,colorDefault);

AddColumn(ATR_change,"ATR_chg(0.85)",1.4,colorBlack,ATRcolor);
2 Likes

Thanks You very much friend.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.