Can some one modify this code to run as a scan giving results as
follows:

Highest percentage difference between r1 and close and also r2 and
close- arranged higest difference first.

Thanks in advance






/*Tushar Chande's Range Projection */



/* AFL Code by Prakash Shenoi */

//



//

Av=MA(abs(C-Ref(C,-1)),10);

r1=(C+Av);

r2=(C+(2*Av));

s1=(C-Av);

s2=(C-(2*Av));

Plot (Close,"",45,128);

Plot (r1,"",36,16+8);

Plot (r2,"",15,16+8);

Plot (s1,"",0,16+8);

Plot (s2,"",34,16+8);

GraphXSpace=5;

Title=Name ()+ " "+"\n"+ "RES =" + WriteVal  (r1,1.2) + ", "+ WriteVal 
(r2,1.2) + "

  "+

"SUPP= "+ WriteVal (s1,1.2)+ ", " + WriteVal(s2,1.2) ;

// Paste the code below to your price chart somewhere and green ribbon
means both

// both MACD and ADX trending up so if the red ribbon shows up the MACD
and the ADX

// are both trending down.



_SECTION_BEGIN("trending ribbon");

uptrend=PDI()>MDI()AND Signal()<MACD();

downtrend=MDI()>PDI()AND Signal()>MACD();





Plot( 5, /* defines the height of the ribbon in percent of pane width
*/"ribbon",

IIf( uptrend, colorBrightGreen    , IIf( downtrend, colorBlue, 0 )), /*
choose color */

styleOwnScale|styleArea|styleNoLabel, -0.1, 150 );



_SECTION_END();

_SECTION_BEGIN("Price");

SetChartOptions(0,chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} O- %g, Hi %g, Lo
%g, C- %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C,
SelectedValue( ROC( C, 1 )) ));




Reply via email to