Skip to main content

Price Volume Oscillator for Amibroker (AFL)

rebel10 about 13 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    oscillator, amibroker

This price volume indicator helps decide whether volume action is supporting price action or not. Volume is considered positive if price rises on a day and negative if prices fall. Then volume proportionate to the price change (ROC) is summed up for a certain period (default 20 days). The Oscillator is the ratio of net positive volume (proportionate to price change) over total absolute volume (proportionate to price change). Interpretation is similar to other oscillators such as RSI etc.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN( "Price Volume Oscillator" );
Periods = Param( "Periods", 20, 2, 200, 1 );
PROC = IIf( ROC( C, 1 ) > 0, V * ROC( C, 1 ), 0 );
NROC = IIf( ROC( C, 1 ) < 0, V * ROC( C, 1 ), 0 );
ROCresult = 100 *  ( Sum( PROC, Periods ) + Sum( NROC, Periods ) ) / ( Sum( PROC, Periods ) - Sum( NROC, Periods ) );
Plot( ROCresult , "Price*Volume Osc", ParamColor( "Color", colorCycle ), ParamStyle( "Style" )  );
_SECTION_END();

2 comments

1. halfman
about 13 years ago

hi, could you tell me how to set different color between months as showed on your picture above?

2. rebel10
about 13 years ago

It is auto set in latest Amibroker 5.60. But you can go to Tools > Preferences > Axis/Grids — and then change theme to ‘black’ to get this setting. Try it. If you still do not get it, let me know. I will then post the detailed settings in the theme. Hope this was helpful.

Leave Comment

Please login here to leave a comment.