-
-
Save marketcalls/03a19737048fec1b717ed972ad5f5144 to your computer and use it in GitHub Desktop.
VPOC in Amibroker 6.13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a demo showing | |
// re-implementation of VAP overlay using | |
// PriceVolDistribution and low-level graphics | |
bi = BarIndex(); | |
fvb = FirstVisibleValue( bi ); | |
lvb = LastVisibleValue( bi ); | |
mx = PriceVolDistribution( H, L, V, 100, False, fvb, lvb ); | |
GfxSetCoordsMode( 1 ); | |
GfxSelectPen( colorRed ); | |
bins = MxGetSize( mx, 0 ); | |
for( i = 0; i < bins; i++ ) | |
{ | |
price = mx[ i ][ 0 ]; // price level | |
relvolume = mx[ i ][ 1 ]; // relative volume 0..1 | |
relbar = relvolume * (lvb-fvb+1); | |
GfxMoveTo( fvb, price ); | |
GfxLineTo( fvb + relbar, price ); | |
} | |
Plot( C, "Price", colorDefault, styleBar ); | |
if( ParamToggle("BuildinVAP", "No|Yes") ) PlotVAPOverlay( 100, 100, colorGreen, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment