Skip to main content

Williams %R Exploration for Amibroker (AFL)

kaiji over 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 1)
  • Tags:
    oscillator, amibroker, exploration

This exploration may help identify stocks that one might like to enter a position into.

By Mubashar Virk

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("William's R");
function PercentR( periods )
{
 return 100 * ( HHV( H, periods ) - C )/( HHV( H, periods ) - LLV( L, periods )); 
}

Plot( PercentR( Param("Periods", 10, 2, 100 ) ),
		_DEFAULT_NAME(),
		ParamColor("Color", ColorCycle ) );
_SECTION_END();

P  =  ((H + L + C) / 3);
R1  =  ((2 * P) - L);
S1  =  ((2 * P)  - H);
R2  =  ((P - S1) + R1);
S2  =  (P - (R1 - S1));

Filter = PercentR( Param("Periods", 10, 2, 100 ) ) > 80;

AddColumn( V, "Volume",1 );
AddColumn( C, "Close" );
AddColumn( Ref (C, -1), "Last Close");
AddColumn( C - Ref( C, -1), "Change");
AddColumn( ROC( C, 1 ), "ROC" ); 
AddColumn (RSI(), "RSI",1.2);
AddColumn( r2, "R 2", 1.2);
AddColumn( r1, "R 1", 1.2);
AddColumn( P, "Pivot", 1.2);
AddColumn( S1, "S 1", 1.2);
AddColumn( S2, "S 2", 1.2);

1 comments

over 7 years ago

Sorry, but this doesnt look like Williams %R which oscillates between -80 – 20. This one just has the RSI and ROC.

Leave Comment

Please login here to leave a comment.