Amibroker AFL code for NR1, NR4, NR7 Exploration

MarketSecrets - Learn To Trade Like a Pro

Amibroker AFL code for NR1, NR4, NR7 Exploration:

You can use this AFL for Implementing Option Strategies in Amibroker.

Script:

 

/*
NR1, NR4, NR7 Exploration for Amibroker
For Chart Plotting see “Advisory NRx price chart display”

Modified from NR4 Historical Volatility System

*/
NR1_Scan = ParamToggle(“Scan NR1?”, “No|Yes”, 1);
NR4_Scan = ParamToggle(“Scan NR4?”, “No|Yes”, 1);
NR7_Scan = ParamToggle(“Scan NR7?”, “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);

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 (NR7 OR NR4 OR NR1);
Buy = Filter;
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);
AddColumn( Volatility_Ratio, “Vol Ratio”,1.4, colorDefault,colorDefault, 80 );

 

Download File

error: Content is protected !!