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

Stochastic (Generic) for Amibroker for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
oscillator, trading system, amibroker, optimize

Create Stochastics line and histogram charts with variable parameters.

Similar Indicators / Formulas

MACD
Submitted by sal over 13 years ago
Trend Trigger Factor
Submitted by M4RC68 almost 14 years ago
Modified dahl oscillator
Submitted by realkaka almost 14 years ago
Combination MACD RMO ICHIMOKU
Submitted by dovanquang0404 almost 11 years ago
Nj demand and supply
Submitted by njethva over 11 years ago
CCT CMO trading system
Submitted by overdrunk over 13 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Stochastic (Generic)");

//Create Stochastics line and histogram charts with variable parameters according to the following formula;

//100 * (C - Y) / (X - Y) 
//Where: 
//C = Close 
//X = the Highest High value ( HHV ) over some period of time ( Len1 OR in this case 70 bars ) 
//Y = the Lowest Low value ( LLV ) over some period of time ( Len1 OR in this case 70 bars )

//Set the parameters
Len1 = Param("Slow",70,1,100,1); 
Len2 = Param("Fast",45,1,100,1); 
Len3 = Param("trigger",9,1,50,1); 

//Do the Math
HH = HHV(C, Len1); 
LL = LLV(C, Len1); 

FastK = 100 * (C - LL) / (HH - LL); 
SlowK = EMA(FastK, Len2); 
SlowD = EMA(SlowK, Len3); 

Diff = SlowK - SlowD; 

//Display your work
Plot(SlowK, "SlowK "+Len1, colorBlue, styleThick | styleOwnScale, 0, 100); 
Plot(SlowD, "  SlowD "+Len2, colorWhite, styleThick | styleOwnScale, 0, 100); 
Plot(Diff, "  SlowK - SlowD "+Len3, IIf(Diff > Ref(Diff, -1), colorBrightGreen, colorRed), styleArea | styleOwnScale, -10, 10);

_SECTION_END();

//Create statements for use in the Automatic Analyzer

//Optimize parameters
Len1 = Optimize( "Slow",20, 1, 100, 2 ); 
Len2 = Optimize("Fast", 40, 1, 100, 2 ); 
Len3 = Optimize( "Trigger", 3, 1, 50, 2 );

//Create Buy/Sell statements
Buy = Cross(SlowK, slowD);
Sell = Cross(SlowK, SlowD);

0 comments

Leave Comment

Please login here to leave a comment.

Back