hel required to change NR1 NR4 NR7 NR21 Exploration for Amibroker

Bewinner

Well-Known Member
#1
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:

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 );
Thanx in advance...
 
#2
HeLL required to change NR1 NR4 NR7 NR21 Exploration for Amibroker

BW

that condition is itself in the code you posted :)

changes made in the line below
Code:
Filter = Volatility_Ratio>=MinVR AND /*(NR21 OR NR7 OR NR4 OR NR1) AND*/ (NR21 AND NR7 AND NR4 AND NR1);

btw did you want HELL or help on this one :D


Happy :)


PS:

further can also make it select-able add code

Code:
ShowAll = ParamToggle("SHOW with AND // OR", "OR|AND",1);
if (ShowAll==1) Filter = Volatility_Ratio>=MinVR AND (NR21 AND NR7 AND NR4 AND NR1);
else Filter = Volatility_Ratio>=MinVR AND (NR21 OR NR7 OR NR4 OR NR1);
BNF not moving at all me thinks should just close the trade and go for a walk :D
 
Last edited:

Bewinner

Well-Known Member
#3
Re: HeLL required to change NR1 NR4 NR7 NR21 Exploration for Amibroker

BW

that condition is itself in the code you posted :)

changes made in the line below
Code:
Filter = Volatility_Ratio>=MinVR AND /*(NR21 OR NR7 OR NR4 OR NR1) AND*/ (NR21 AND NR7 AND NR4 AND NR1);

btw did you want HELL or help on this one :D


Happy :)


PS:

further can also make it select-able add code

Code:
ShowAll = ParamToggle("SHOW with AND // OR", "OR|AND",1);
if (ShowAll==1) Filter = Volatility_Ratio>=MinVR AND (NR21 AND NR7 AND NR4 AND NR1);
else Filter = Volatility_Ratio>=MinVR AND (NR21 OR NR7 OR NR4 OR NR1);
BNF not moving at all me thinks should just close the trade and go for a walk :D
Happy ji I myself added this part
HTML:
AND (NR21 AND NR7 AND NR4 AND NR1)
in the original code...

BUt as I said I want to keep intact others but to discard all "No" row and
make the all 4 "Yes" column row highlighted in the exploration say with green color.

Thanx for your post and help...if u can stretch it further as per my requirements...

and one more thing I need HELP not HELL..I did not notice that P did not typed
 

Similar threads