Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

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: Inverted Plotted Volume Overlay Indicator
Author/Uploader: Jorgen Wallgren - jorgen.wallgren [at] gmail.com
Date/Time added: 2009-03-25 04:37:23
Origin: Inspired by the great work of Dennis Brown.
Keywords: Volume overlay
Level: medium
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:

This is an inverted plotted volume, displayed at the upper part of the main chart. Just drag and drop this code into your main chart, adjust the moving average and height to your preference.

Formula:

_SECTION_BEGIN("Inverted Plotted Volume Overlay Indicator");
// I was inspired by Dennis Brown's great looking chart, and here is yet
another result.
// This is an inverted plotted volume, displayed at the upper part of the main
chart.
// Just drag and drop this code into your main chart, adjust the moving average
and height to your preference.
Title = "";
PlotVOL 	= ParamToggle( "Plot Volume","Off|On", 1);
Days 		= Param("Days of MA", 1, 0.25, 5, 0.25); 
Height 	= Param("Height", 25, 1, 100, 1) ;

function VisibleMaxValue(Value)
{ // NOTE: Both my VisibleMaxValue & VisibleMinValue is available at the AFL
Library.
 BI							= BarIndex();
 FirstVisibleBarIndex	= Status("FirstvisiblebarIndex");
 FirstVisibleBar     	= FirstVisibleBarIndex == BI;
 HighestVisibleValue		= HighestSince(FirstVisibleBar, Value);
 LastVisibleBarIndex		= Status("LastvisiblebarIndex");
 BlankBars					= SelectedValue(LastVisibleBarIndex - BI);
 LastVisibleBar     		= LastVisibleBarIndex == BI + BlankBars;
 MaxValue 					= LastValue(ValueWhen(Lastvisiblebar, HighestVisibleValue));
 return MaxValue;
}

if(LastValue(Volume) > 0) // In case you are looking at an Index without
volume.
{
 UpBar 	= Close > Open;
 DownBar	= Close < Open;
 VolColor	= IIf(DownBar, colorRed, IIf(UpBar, colorBrightGreen, colorBlue));

 if(PlotVOL)
 {
 Value 	= Volume;
 MaxValue 	= VisibleMaxValue(Value);
 Scale 	= MaxValue/Height; 
 Height 	= Scale;
 Period	= ((6.5 * 3600) / Interval()) * Days;
 AverageVolume	= MA(Value, Period);
 Plot(-AverageVolume/Scale,"", colorBlue, styleNoLabel | styleNoTitle |
styleOwnScale | styleThick, -100, 0);
 Plot(-Value/Scale,"", VolColor, styleNoLabel | styleNoTitle | styleOwnScale |
styleThick | styleHistogram, -100, 0);
 }
}
_SECTION_END();

Comments:


About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM