InvestorsHub Logo
Followers 520
Posts 40228
Boards Moderated 21
Alias Born 09/16/2007

Re: None

Saturday, 04/19/2008 4:18:18 PM

Saturday, April 19, 2008 4:18:18 PM

Post# of 45
Experimental ADX Scanner

// Global Variables
NL = 14; // Scan Adjustment for N Day ADX scan
NS = 3;
AThresh = 61;

// ADX Signal
Test1 = Cross(PDI(NL), MDI(NL)); // ADX Cross
Test2 = (ADX(NL) < AThresh) AND (ADX(NS) < AThresh); // ADX <(Magic Number)
Test3 = (ADX(NS) > LLV(ADX(NL),NL+NS)); // Short ADX is significant (control).
Test4 = Cross(MDI(NL), PDI(NL));; // Sell if NL and NS cross downward.
ADBSignal = Test1 AND Test2 AND Test3; // Buy Signal
ADSSignal = Test4; // Sell Signal

// STO Signal
StoSignal = (LLV(StochK(NL+NS,NS), NL+NS)) < (LLV(StochK(NL+NS,NL), NL+NS));

// %R Signal
function PercentR( periods )
{
return -100 * ( HHV( H, periods ) - C )/( HHV( H, periods ) - LLV( L, periods ) );
}
PerRSignal = (PercentR( Param("Periods", 14, 2, 100 ) ) < 10);

// Volume Signal
period = Param("Period", 5, 1);
prev5daysAvg = MA(Ref(Volume, -1), period);
V2 = (ROC(Volume,3) >= 0);
VolumeTrigger = V2 AND (Volume >= prev5daysAvg) AND (Volume >= 50000);

// AccDist Signal
ADSignal = (AccDist() >= Ref(AccDist(), -1));

// Setup Buy/Sell Signals
BCond = PerRSignal AND StoSignal AND ADBSignal AND VolumeTrigger ;
SCond = ADSSignal;

Buy = BCond;
Sell = SCond;



Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.