Hi All,
I got the code from amibroker forum. Nice clean code...though I have one little doubt it might looks into future.
Anyway my requirements are
1) can somebody discard the rows where all 4 columns are No. refer to first image.
2) can somebody highlight the exploration row by some color where all 4 are Yes. refer to image 2
code is here:
Thanx in advance...
I got the code from amibroker forum. Nice clean code...though I have one little doubt it might looks into future.
Anyway my requirements are
1) can somebody discard the rows where all 4 columns are No. refer to first image.
2) can somebody highlight the exploration row by some color where all 4 are Yes. refer to image 2
code is here:
HTML:
/*
NR1, NR4, NR7 Exploration for Amibroker
For Chart Plotting see "Advisory NRx price chart display"
Modified from NR4 Historical Volatility System
By TohMz
*/
NR1_Scan = ParamToggle("Scan NR1?", "No|Yes", 1);
NR4_Scan = ParamToggle("Scan NR4?", "No|Yes", 1);
NR7_Scan = ParamToggle("Scan NR7?", "No|Yes", 1);
NR21_Scan = ParamToggle("Scan NR21?", "No|Yes", 1);
MinVR = Param("Min Volatility_Ratio", 0.5, 0.1, 1, 0.1);
NR1 = Inside() OR (Ref(H, -1)==H AND Ref(L, -1)<L) OR (Ref(H, -1)>H AND Ref(L,
-1)==L);
NR4 = (H - L) < Ref(LLV(H-L,3),-1);
NR7 = (H - L) < Ref(LLV(H-L,6),-1);
NR21 = (H - L) < Ref(LLV(H-L,21),-1);
Volatility_Ratio = StDev(log(C/Ref(C,-1)),5)/StDev(log(C/Ref(C,-1)),99);
/**********************************
The Explorer
- Run the Analysis
***********************************/
Filter = Volatility_Ratio>=MinVR AND (NR21 OR NR7 OR NR4 OR NR1) /*AND (NR21 AND NR7 AND NR4 AND NR1)*/;
Buy = Filter;
//SetOption("NoDefaultColumns", True);
AddTextColumn(Name(), "Symbol", 1.2);
AddColumn(DateTime(), "Date", formatDateTime, 15);
AddColumn(TimeNum() ,"Time",1, colorWhite, 75);
if (NR1_Scan) AddTextColumn(WriteIf(NR1, "Yes", "No"), "NR1", 1.0,
colorDefault,colorDefault, 80);
if (NR4_Scan) AddTextColumn(WriteIf(NR4, "Yes", "No"), "NR4", 1.0,
colorDefault,colorDefault, 80);
if (NR7_Scan) AddTextColumn(WriteIf(NR7, "Yes", "No"), "NR7", 1.0,
colorDefault,colorDefault, 80);
if (NR21_Scan) AddTextColumn(WriteIf(NR21, "Yes", "No"), "NR21", 1.0,
colorDefault,colorDefault, 80);
AddColumn( Volatility_Ratio, "Vol Ratio",1.4, colorDefault,colorDefault, 80 );
//SetSortColumns( -3 );