Script Explained

Script:                RTTc OBV MA cross

Back to Catalogue

Purpose :            Chart version of two related Entry Scripts: OBV Moving Averages crossing above/ below.
It draws two different icons -
when the fast MA of OBV has risen above the slow MA
when the fast MA of OBV has dropped below the slow MA.

These markers are drawn just underneath that day's Closing price, and a horizontal line of the appropriate colour (above or below, respectively) extends towards the right-hand side for as long as the line-up of the selected MAs remains unchanged.

Setting the global chart parameters to "calculate visible points only" will save computing time. The script calculates and draws only for the days visible in the current window. (sroll down to "Parameters")

If you later zoom out to expand the plot, right-click inside the window on either line, select the script's Properties, and click "OK". That will redraw the plot for the larger time frame.

One additional benefit of this hybrid script lies in reduced computing time: An entry script, added as an indicator to a chart, must run the full calculation for every day ("tick") that is visible on the chart.
If a Moving Average is calculated over, say, 50 days, and the chart shows 200 days, each entry script must calculate 200 times 50 sets of data. My hybrid will calculate only 200 plus 50 data sets, thus reducing the computation time by well over 95%.

Please note that plotted scripts work on any time scale. Substitute "tick" (week, hour, month...) for "day" where appropriate.

Back to Catalogue

References:        OBV: On Balance Volume
Moving Averages

Back to Catalogue

Parameters:       Fast Period = period, over which the fast MA is calculated
Slow Period = period, over which the slow MA is calculated
MA type = type of MA to be used (covers both)
Above = colour of horizontal line while fast MA is ABOVE slow MA
Below = colour of horizontal line while fast MA is BELOW slow MA

allowing three different types of Moving Averages: Exponential, Simple, Weighted.

Global (File) Parameter Setting for Chart to draw plotted scripts faster:

Back to Catalogue

Example

The above example shows also the two entry scripts: "F" on top for Falling below, "R" along the bottom for Rising above. OBV has been added with the same MA's for illustration purposes.

Back to Catalogue

A combined Entry Script is also available, which delivers both crossings in a single run.
Please note that most of my RTT entry scripts allow you to filter for Turnover: If the total value of daily trades did not reach a set limit ($500K in this example), the stock is not reported. (skip by scanning with $0)

Click on "Description" to sort the risers from the stocks that dropped.

Back to Catalogue