Public Function MovingAverageEnvelope(chart_ID As Long, applyTo As ENUM_APPLIED_PRICE, period As Integer, Ma As ENUM_MA_METHOD, Shift As Double) As String
Moving Average Envelopes consist of moving averages calculated from the underling price, shifted up and down by a fixed percentage.
Moving Average Envelopes (or trading bands) can be imposed over an actual price or another indicator.
When prices raise above the upper band or fall below the lower band, a change in direction may occur when the price penetrates the band after a small reversal from the opposite direction.
||Chart identifier, 0 is the current chart ,value of type Long
||Applied price ,value of type ENUM_APPLIED_PRICE.
||The calculation period, on which the indicator will be calculated, value of type Integer.
||Moving average method , can be one of ENUM_MA_METHOD.
|| ,value of type Double.
Returns the handles of a technical indicator, in case of failure returns a empty string.
Public Sub main()
AlertMessage (MovingAverageEnvelope(0,PRICE_CLOSE,14,0,1.0)) 'Draws the indicator on chart & shows an Alert Message with 'the indicator name.
Back to VTL Client Script Index