Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Adaptive Zones O_B & O_S Oscillator for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
oscillator, amibroker, adaptive

Adaptive Zones OB/OS OSCILLATOR
Automatically Adjusts the overbought and oversold levels based on past performance.
Interpreted and coded by Anthony Faragasso. Can be used with PrePackaged indicators like RSI,CCI,STOCHK,STOCHD,MFI,ULTIMATE. For ROC add the Close. ex.ROC;

Similar Indicators / Formulas

Debu Market Efficiency Ratio
Submitted by agent301 over 11 years ago
MACD (new timing)
Submitted by tigernifty over 11 years ago
3 Days Track
Submitted by janet0211 almost 14 years ago
KILL THE OPERATOR MACD
Submitted by prasadmuni over 11 years ago
%R ++
Submitted by reb almost 14 years ago
DMI Spread
Submitted by pipstar almost 14 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Adaptave Zones O_B  & O_S Oscillator");
/*Adaptive Zones OB/OS OSCILLATOR*/
/*Automatically Adjusts the overbought and oversold levels based on past performance*/
/*Interpreted and coded by Anthony Faragasso*/
/*Can be used with PrePackaged indicators,RSI,CCI,STOCHK,STOCHD,MFI,ULTIMATE,*/
/*For ROC add the Close. ex.ROC(C,pds);*/

MaxGraph=10;
/*Input */
Lookback=60;
PerCent=95;
Pds =14;

/****Dimitri Code***********/
/*14-Day RSI of MACD()*/ 
//t=14; Replaced with pds= statement
Var=MACD(); 
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0); 
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0); 
Ut=Wilders(Up,Pds); 
Dt=Wilders(Dn,Pds);
RSIt=100*(Ut/(Ut+Dt)); 
/************End Code*************************/

/*******Variables******************/

A1=RSIt; B2=RSI(pds); C3=CCI(pds); D4=StochK(pds); E5=StochD(pds);
F6=MFI(pds); G7=Ultimate(pds); H8=ROC(C,pds);


Osc=C3; /*insert variable by Identifier*/ 

/*Value of Osc*/
Value1 = Osc;

/*Highest AND Lowest Values of Osc during Lookback Period*/
Value2 = HHV(Value1,Lookback);
Value3 = LLV(Value1,Lookback);

/*Range of Osc during Lookback Period*/
Value4 = Value2 - Value3;

/*Define PerCent of Range to determine OB AND OS levels*/
Value5 = Value4 * (PerCent / 100);

/*Calculate OB AND OS levels*/
Value6 = Value3 + Value5;
Value7 = Value2 - Value5;

baseline=IIf( Osc < 100 AND Osc > 10 ,50 ,IIf( Osc < 0 ,0,0));

Header=WriteIf(Osc==A1," RSI Of MACD",WriteIf(Osc==b2," RSI",WriteIf(Osc==C3," CCI",WriteIf(Osc==D4,"STOCHK",WriteIf(Osc==E5,"STOCHD",WriteIf(Osc==F6," MONEY FLOW INDEX",WriteIf(Osc==G7," ULTIMATE",WriteIf(Osc==H8," ROC(CLOSE)",""))))))));

Plot(Value1, Header,6,1+4); /*BLUE*/
Plot(Value6," O/B",4,1+4);  /*RED -TOP(SELL)*/
Plot(Value7," O/S",5,1+4);  /*GREEN-BOT(BUY)*/
Plot(Baseline," Baseline",7,1+4); /* yellow*/
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back