Results 1 to 5 of 5
  1. #1
    soori1234
    Guest

    Default Similar VTL functions needed

    Hi.. I am converting MQL Script to VTL script. I am facing problem in finding the similar VTL functions. Can anyone tell me similar VTL functions for below MQL functions

    1. IndicatorCounted( );

    2. Bars

    3. int TradePeriod = 20
    iHighest(Symbol( ), Period(), MODE_HIGH, TradePeriod,1)

    Thank You..

  2. #2
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Post

    Dear Sir,



    IndicatorCounted( )
    Ignore It, there is no need to use this in VTL

    Bars
    Bars

    3. int TradePeriod = 20
    iHighest(Symbol( ), Period(), MODE_HIGH, TradePeriod,1)

    pass the array of values (high array in your case)to ArrayMaximum and its will return the highest value that between two indexes (1st index - 20th index) in your case

  3. #3
    soori1234
    Guest

    Default

    Hi Sir,
    For function
    3. int TradePeriod = 20
    iHighest(Symbol( ), Period(), MODE_HIGH, TradePeriod,1)
    I have used below code. But it is not giving any result
    Dim TradePeriod
    TradePeriod = 20

    Dim HighAry()

    CopyClose 0, 1, Bars (0), HighAry

    MsgBox = ArrayMaximum (HighAry(), 1 , TradePeriod)

    Can you resolve this issue?
    Thak You..

  4. #4
    soori1234
    Guest

    Default

    Hi
    This is the complete row in MQL Script. Can you tell me the equivalent VTL

    int TradePeriod = 20
    double rhigh = iHigh(Symbol(),Period(),iHighest(Symbol(), Period(), MODE_HIGH, TradePeriod,i+1)); i = 1 to n...

  5. #5
    Administrator Hassan-HS's Avatar
    Join Date
    Jun 2013
    Posts
    795

    Post Client VTL Functions

    Hello Soori,

    You can use this function....



    Code:
    Public Sub main()
    ''''TODO: Script program start method
    Dim HighAry()
    TradePeriod=20
    CopyHigh 0, 1, Bars (0), HighAry
    
    MsgBox Highest (HighAry, 1 ,Clng(TradePeriod))
    End Sub
    
    
    
    Public function Highest(Ary,Start,Count)
    Dim High
    If Start < Lbound(Ary) Or Count > UBound(Ary) Or Count+Start > UBound(Ary) then
    	MsgBox " Please Pass A Valid Parameters "
    end if
    
    High=Ary(Start)
    For i = Start to Count 
    	If High < Ary(i) then
    		High = Ary(i)
    	End IF
    Next
    Highest= High
    
    End function

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MQL to VTL conversion -- Similar Functions needed
    By mayankj990@gmail.com in forum VertexFX API/VTL Forum
    Replies: 8
    Last Post: 06-18-2014, 04:31 PM
  2. Please help to return value from functions in client script
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 8
    Last Post: 01-09-2014, 09:40 AM
  3. Similar VTL Function Needed
    By AmitSharma in forum VertexFX API/VTL Forum
    Replies: 14
    Last Post: 01-03-2014, 07:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •