Knowledgebase:
StochasticOScillator
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 15 June 2016 01:58 PM

Syntax

Public Function StochasticOScillator(chart_ID As Long, PeriodK As Integer, SlowingK As Integer, PeriodD As Integer, Ma As ENUM_MA_METHOD) As String 

The Stochastic Oscillator is a popular indicator that shows where a security’s price has closed in proportion to its closing price range over a specified period of time.

The Stochastic Oscillator has two components: %K and %D. %K is most often displayed as a solid line and %D is often shown as a dotted line.

The most widely used method for interpreting the Stochastic Oscillator is to buy when either component raisesabove 80 or sell when either component falls below 20.

Another way to interpret the Stochastic Oscillator is to buy when %K raises above %D, and conversely, sell when %K falls below %D.

Parameters

Key Description 
chart_ID Chart identifier, 0 is the current chart ,value of type Long.
PeriodK The first calculation period, on which first moving average indicator will be calculated, value of type Integer.
SlowingK The moving average slowing value , value of type Integer.
PeriodD The second calculation period, on which second moving average indicator will be calculated, value of type Integer.
MA The moving average type ,value of type  ENUM_MA_METHOD.

Return value

Returns the handles of a technical indicator, in case of failure returns an empty string.

Sample

Public Sub main()

AlertMessage (StochasticOScillator(0,10,3,3,0))

'Draws the indicator on chart and shows an Alert Message with the indicator name.

End Sub


See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions