This is read-only version of AFL library entry. Ability to add user formulas
and comment is only available from members-only area.
Details:
Formula name:
Dinapoli Perferred Stochastic
Author/Uploader:
TohMz - (email hidden)
Date/Time added:
2008-06-02 11:25:15
Origin:
Keywords:
stochastic
Level:
basic
Flags:
indicator
DISCLAIMER: Most formulas present in AFL on-line library are submitted
by the users and are provided here on an "as is" and "as available" basis.
AmiBroker.com
makes no representations or warranties of any kind to the contents or the operation
of material presented here. We do not maintain nor provide technical support
for 3rd party formulas. Description:
Based on "Joe DiNapoli - The Practical Application of Fibonacci Analysis to Investment Markets" - APPENDIX E
Formula description AND
Derived from given eSignal formula suggested by LaNard
Formula:
/***********************************************************************************************************
Dinapoli Perferred Stochastic
Based on "Joe DiNapoli - The Practical Application of Fibonacci Analysis to
Investment Markets"
APPENDIX E
Derived from given eSignal formula suggested by LaNard on 2008-05-31 in the
comment:
refer "DiNapolis 3x Displaced Moving Averages" at
http://www.amibroker.com/library/detail.php?id=1090
Script Created by TohMz
***********************************************************************************************************/
SetChartOptions(0,0,chartGrid20|chartGrid50|chartGrid80);
function StochRaw(nLength, nSmoothing)
{
Hh = HHV(High, nLength);
Ll = LLV(Low, nLength);
Hh = HHV(High, nLength);
Ll = LLV(Low, nLength);
return ((Close - ll) / (hh - ll)) * 100;
}
function PreferStochK(nLength, nSmoothing)
{
percentK =StochRaw(nLength, nSmoothing);
MAVt[0]=0;
for(i=1; i<BarCount; i++)
MAVt[i] = MAVt[i-1] + (percentK[i] - MAVt[i-1]) / nSmoothing;
return MAVt;
}
function PreferStochD(nLength, nSmoothing, nSmoothings)
{
percentK = PreferStochK(nLength, nSmoothing);
MAVt[0] = 0;
for(i=1; i<BarCount; i++)
MAVt[i] = MAVt[i-1] + (percentK[i] - MAVt[i-1]) / nSmoothings;
return MAVt;
}
Period = Param("Period", 8, 3, 100);
Ksmooth = Param("%K Smooth", 3, 3, 100);
Dsmooth = Param("%D Smooth", 3, 3, 100);
Upper = Param("%Upper Level", 75, 0, 100);
Lower = Param("%Lower Level", 25, 0, 100);
Plot( PreferStochK(Period, Ksmooth), "percentK", colorBlue);
Plot( PreferStochD(Period, Ksmooth, Dsmooth), "percentD", colorRed);
Plot(Upper, "", colorBlack, styleDashed);
Plot(Lower, "", colorBlack, styleDashed);
Comments:
LaNard
2008-06-02 13:43:47
THANK VERY VERY MUCH......Keep up the good work
LaNard
2008-06-04 16:57:54
Hi again,
This formula is derived off of Joe DiNapoli's work whom Mr. Fibmaster (Neal Hughes) gives credit. I've been working with his Fibonacci methods which led me to Mr. DiNapoli's indicators. Can you assist me with this formula. Thank you again for your help towards profitable trading.
var vRSI14 = new RSIStudy(14, "Close");
var vEMA3_of_vRSI14 = new MAStudy(3, 0, vRSI14, RSIStudy.RSI, MAStudy.EXPONENTIAL);
var vEMA3_of_vEMA3_of_vRSI14 = new MAStudy(3, 0, vEMA3_of_vRSI14, MAStudy.MA, MAStudy.EXPONENTIAL);
var vEMA3_of_vEMA3_of_vEMA3_of_vRSI14 = new MAStudy(3, 0, vEMA3_of_vEMA3_of_vRSI14, MAStudy.MA, MAStudy.EXPONENTIAL);
var vSMA5_of_vEMA3_of_vEMA3_of_vEMA3_of_vRSI14 = new MAStudy(5, 3, vEMA3_of_vEMA3_of_vEMA3_of_vRSI14, MAStudy.MA, MAStudy.SIMPLE);
var vLastAlert = -1;
//}}EFSWizard_Declarations 60572
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(false);
setStudyTitle("TRSI");
setCursorLabelName("SRSI", 0);
setCursorLabelName("SMA ", 1);
setCursorLabelName("DMA ", 2);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarStyle(PS_SOLID, 2);
setDefaultBarFgColor(Color.RGB(139,138,139), 0);
setDefaultBarFgColor(Color.blue, 1);
setDefaultBarFgColor(Color.red, 2);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setDefaultBarThickness(1, 2);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
setPlotType(PLOTTYPE_LINE, 2);
//}}EFSWizard_PreMain 54387
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
Not well-verse in esignal formula, "Dinapoli Perferred Stochastic" is done by guessing. Need more info from you. Therefore it best that you communicate through TohMz@yahoo.com.sg with me.pls attached your proposed indicator when you email me. Thank you.