Knowledgebase:
GoldenDeathCrossOnArray
Posted by Mohammad Rahhal, Last modified by Mohammad Rahhal on 29 October 2015 04:47 PM

Syntax

Public Sub GoldenDeathCrossOnArray(ByVal Ary As Variant, ByVal ShortTerm As Integer, ByVal MediumTerm As Integer, ByVal LongTerm As IntegerByVal MA_Type As Integer, ByRef Result As Variant)

Procedure that calculate Golden Death Cross based on custom array, and the result passed by result parameter as array, each index of the result array represent indicator value corresponds to that index of the source array.


Parameters

Parameter  Description 
Ary The source array, that contain prices
ShortTerm Short Term as integer
MediumTerm Medium Term as integer
LongTerm Long Term  as integer
MA_Type An integer value of type ENUM_MA_METHOD
Result The Result Array


Return value

Returns a double value.


Sample

Public Sub main()

        Dim ary ()

        Dim result()

        Dim ShortTerm

        Dim MediumTerm

        Dim LongTerm

        Dim MA_Type
 

        Period = 14

        MA_Type = 1

        ShortTerm = 7

        MediumTerm = 14

        LongTerm = 20
 

        CopyClose 0, 1, Bars (0), Ary

        GoldenDeathCrossOnArray Ary, CInt(ShortTerm), CInt(MediumTerm), CInt(LongTerm), CInt(MA_Type), Result

        AlertMessage "The indicator value of the record 50 :" & Result(50)

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