Beruflich Dokumente
Kultur Dokumente
0 -5-05-2016
Revision Details
V-2.0 AFL - fully re written for clarity, Minor bugs removed
V-2.1 support AND resistance line added
V-2.2 Commentary for support AND resistance line breaks Added.
V-2.3 Revision detail- High Volume Lines added
V-2.4 Toggle switch for plotting S/R, High Volume AND Trend lines added
V-2.5 Bar coloring option included - VSA based OR Trend Based
V-3.0 Trend detection Method changed to "Random Walk"
V-3.1 exploration Added
V-3.2 Bug in Exploration fixed
V-4.0 Revamped the formulas for all signals - Especially the No Demand Bar Defn.
Reduced unnecessary signals
Low volume Test signals formula improved
New signal discription for daily signals added like "Move indicates
Strength or weakness".
Effort up or down failure also added
Up and Down Arrows included to indicate change of sentiment.
//===================Version V.4.0.0 ======================
*/
//=========================================================================|
// VPA Basic Module |
//=========================================================================|
_SECTION_BEGIN( "VPA Basic Module" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
gxs = Param( "GRAPH spaceing", 10, 5, 50, 5 );
GraphXSpace = gxs;
SetChartBkColor( ParamColor( "Outer panel", colorBlack ) ); // color of outer
border
SetChartBkGradientFill( ParamColor( "Inner panel upper", colorBlack ),
ParamColor( "Inner panel lower", colorBlack ) );
//=========================================================================|
// Trend Analysis Module |
//=========================================================================|
_SECTION_BEGIN( "Trend Analysis" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
minperiodsRWIst = Param( "Short term Min Periods", 2, 1, 9, 1 );
maxperiodsRWIst = Param( "Short term Max Periods", 8, 1, 9, 1 );
_SECTION_END();
//|
===================================================================================
=========|
//| TITLE
|
//|
===================================================================================
=========|
if( Status( "action" ) == actionIndicator )
(
Title = EncodeColor( colorWhite ) + "Volume Price Analysis V.4.0" + " - " +
Name() + " - " + EncodeColor( colorRed ) + Interval( 2 ) +
EncodeColor( colorWhite ) +
" - " + Date() + " - " + EncodeColor( colorYellow ) +
StrFormat( "\nOp %g, Hi %g, Lo %g, Cl %g ", O, H, L, C ) +
"Volume= " + WriteVal( V ) + "--" + EncodeColor( colorYellow ) +
_SECTION_END();
//=================================================================================
===|
// Plotting Module
|
//=================================================================================
===|
_SECTION_BEGIN( "Plotting" );
//Bar coloring formula 1 _ Preferred - Based on VSA Strength
Vscolor = IIf( lowVolTest, colorTurquoise, IIf( lowVolTest2, colorPink, IIf( bc,
colorDarkRed , IIf( upThrustBar, colorYellow , IIf( bullbar, colorLime ,
IIf( bearbar, colorRed, IIf( noDemandBarUT OR noDemandBarDt,
colorWhite , IIf( noSupplyBar, colorCustom12, IIf( upbar, colorGreen, IIf( downbar,
colorOrange, colorBlue ) ) ) ) ) ) ) ) ) );
//Bar coloring formula 2 _ Based on Trend
Trcolor = IIf( trendShortTerm > 0 AND trendMediumTerm > 0 AND trendLongTerm > 0,
colorLime, IIf( trendShortTerm > 0 AND trendMediumTerm > 0 AND trendLongTerm < 0,
colorGreen,
IIf( trendShortTerm > 0 AND trendMediumTerm < 0 AND trendLongTerm <
0, colorPaleGreen, IIf( trendShortTerm < 0 AND trendMediumTerm < 0 AND
trendLongTerm < 0, colorRed, IIf( trendShortTerm<0 AND trendMediumTerm>0 AND
trendLongTerm > 0, colorPaleGreen,
IIf( trendShortTerm < 0 AND trendMediumTerm<0 AND
trendLongTerm>0, colorOrange, colorBlue ) ) ) ) ) );
//Bar coloring formula 3 _ Marar Histogram
Vlp = Param( "Volume lookback period", 150, 20, 300, 10 );
Vrg = MA( V, Vlp ); // average volume
rg = ( H - L );
arg = Wilders( rg, 30 );
Vh = V > Ref( V, -1 ) AND Ref( V, -1 ) > Ref( V, -2 );
Cloc = C - L;
x = ( H - L ) / Cloc;
x1 = IIf( Cloc = 0, arg, x );
Vb = V > Vrg OR V > Ref( V, -1 );
ucls = x1 < 2;
dcls = x1 > 2;
mcls = x1<2.2 AND x1>1.8 ;
Vlcls = x1 > 4;
Vhcls = x1 < 1.35;
upbar = C > Ref( C, -1 );
dnbar = C < Ref( C, -1 );
CloseUp = C > Ref( C, -1 );
Closedn = C < Ref( C, -1 );
VolUp = V > Ref( V, -1 );
VolDn = V < Ref( V, -1 );
bb1 = upbar AND CloseUp AND ucls AND L > Ref( L, -1 );
bb2 = upbar AND VolUp;
bb3 = dnbar AND CloseDn AND VolDn;
bb4 = dnbar AND CloseDn AND C > Ref( L, -1 );
db1 = dnbar AND CloseDn AND dcls;
db2 = dnbar AND VolUp ;
db3 = upbar AND CloseDn AND VolUp;
db4 = upbar AND CloseDn AND C < Ref( L, -1 ) AND dcls;
db5 = upbar AND CloseUp AND ucls AND L < Ref( L, -1 );
db6 = upbar AND CloseUp AND dcls;
bb = ( bb1 OR bb2 OR bb3 OR bb4 );
db = ( db1 OR db2 OR db3 OR db4 OR db5 OR db6 );
Mcolor = IIf( bb AND tls > 0, colorLime, IIf( db AND tls < 0, colorRed,
colorWhite ) ) ;
//WriteVal(tls);
//---------------------------------------------------------------------------------
---------
SelectedIndicator = ParamList( "Chart Coloring", "VSA Based,Trend Based,Marar Trend
Based", 1 );
switch( SelectedIndicator )
{
case "VSA Based":
PlotOHLC( Open, High, Low, Close, "", VScolor, styleBar | styleThick );
break;
break;
}
_SECTION_END();
//=================================================================================
===|
// Commentry Module
|
//=================================================================================
===|
_SECTION_BEGIN( "Commentary" );
Vpc = upThrustBartrue OR upThrustCond1 OR upThrustCond2 OR upThrustCond3 OR
strengthDown0 OR strengthDown1 OR strengthDown2 OR
strengthDown OR lowVolTest1 OR pseudoUtCond OR lowVolTest2 OR PseudoUpThrust
OR pseudoUtCond OR noDemandBarUt OR stopVolume OR trendChange OR buyCond OR
noSupplyBar;
printf( Name() + " - " + Interval( 2 ) + " - " + Date() + " - " + "\n" +
StrFormat( "High %g \nLow %g \nOpen %g \nClose %g \nVolume %g ", H,
L, O, C, V ) );
WriteIf( Vpc, "====================\nVolume Analysis Commentary:", "" );
//=================================================================================
===================================================================================
========================
_SECTION_BEGIN( "Exploration" );
Lq = V;
Lqok = Lq > 100000;
AddTextColumn(
WriteIf( upThrustBar, "Sign of weakness. ",
WriteIf( upThrustCond1 , "Confirmed weakness. ",
WriteIf( upThrustCond2 AND NOT upThrustCond1 , "Confirms
weakness.",
WriteIf( upThrustCond3 , "Confirms weakness",
WriteIf( strengthDown1, "strength
returning. ",
WriteIf( strengthDown0 AND NOT
strengthDown, "strength returning. ",
WriteIf( strengthDown AND
NOT strengthDown1, "strength returning. ",
WriteIf( lowVolTest
, "Test for supply. ",
AddTextColumn(
WriteIf( upThrustBar, " An Upthrust Bar. ",
WriteIf( upThrustCond1, " A downbar after an Upthrust. ",
WriteIf( upThrustCond2 AND NOT upThrustCond1, " A High Volume
downbar after an Upthrust.",
WriteIf( upThrustCond3, "This upthrust at very High
Voume.",
WriteIf( strengthDown1, "Strength seen
returning after a down trend. ",
WriteIf( strengthDown0 AND NOT
strengthDown, "Strength seen returning after a down trend. ",
WriteIf( strengthDown AND
NOT strengthDown1, "Strength seen returning after a long down trend. ",
WriteIf( lowVolTest
, "Test for supply. ",
WriteIf( lowVolTest2, "An Upbar after sucessful Test, Confirms strength ",
WriteIf( topRevBar, "Top Reversal Bar. Caution. The probability of end of the
current upmove is High",
WriteIf( pseudoUtCond, "A Down Bar closing down after a Pseudo Upthrust. ",
WriteIf( trendChange, "High volume Downbar after an upmove on high volume. ",