Page 1 of 5 123 ... LastLast
Results 1 to 15 of 73
  1. #1

    Post How can I call mysql Stored procedure from VTL Script

    Hi every one,
    1) I had develop a plugin in java but i need it to integrate it with vertex. Now all i need is to how can i call a mysql Stored procedure from VTL script?
    2) Sample code about how to read the values of some item(gold) into my variable continuously? like run a loop that take a value and send these values to mysql Stored procedure??

    Please share some simple code, as i am new user on this forum and to VTL too.

    Thanks,

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

    Default

    Hi and welcome,

    I will check your inquiries and I will update you.

    Pleased stand by

  3. #3

    Default

    Quote Originally Posted by Hassan-HS View Post
    Hi and welcome,

    I will check your inquiries and I will update you.

    Pleased stand by

    Thanks for helping me out I am here waiting for your reply with some sample code.

  4. #4

    Default

    Thanks for your reply. I hare waiting for you with some sample code.

  5. #5

    Default

    I want to create a dashboard like the image i attached VTL script.
    How can i make this form in VTL? Please anybody can give me some beginning guidelines.


    Name:  Dahsboard.JPG
Views: 104
Size:  49.5 KB

  6. #6

    Default

    Quote Originally Posted by Hassan-HS View Post
    Hi and welcome,

    I will check your inquiries and I will update you.

    Pleased stand by

    Thanks for your reply I am here waiting fro you with some sample code.

  7. #7
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear Sir,


    Thanks for contacting us.

    The following code is a sample for connecting DB using VTL

    Code:
     Public Sub main()
    
    
      
    Dim Connection
    Dim Recordset
    Dim SQL
    
    
    'declare the SQL statement that will query the database
    SQL = "SELECT * FROM Test"
    'create an instance of the ADO connection and recordset objects
    Set Connection = CreateObject("ADODB.Connection")
    Set Recordset = CreateObject("ADODB.Recordset")
    'open the connection to the database
    Connection.Open "DSN=Examples_dsn"
    'Open the recordset object executing the SQL statement and return records 
    Recordset.Open SQL,Connection
    'first of all determine whether there are any records 
    If Recordset.EOF Then 
        AlertMessage "No records returned."
    Else 
    'if there are records then loop through the fields 
    	Do While NOT Recordset.Eof   
    	 AlertMessage Recordset("row")
    	 AlertMessage Recordset("row2")
    	 Recordset.MoveNext     
    	Loop
    End If
    'close the connection and recordset objects freeing up resources
    Recordset.Close
    Set Recordset=nothing
    Connection.Close
    Set Connection=nothing
    End Sub
    To create form by VTL you can use CreateVTLForm method , and to create control you can use CreateVTLControl

    for more information about the VTL GUI Check our documentation.

    Check the following sample to learn how you can get any Symbol Info.
    Code:
    Dim exeResult
     Dim rst
     Dim symbolName
     
     Public Sub main()
        symbolName="EUR/USD"
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_STOP_OFFSET,rst) ,"SYMBOL_STOP_OFFSET",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_ASK,rst) , "SYMBOL_ASK",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_BID,rst) , "SYMBOL_BID",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_High,rst) , "SYMBOL_High",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_LOW,rst) , "SYMBOL_LOW",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_VOLUME_MIN,rst) ,"SYMBOL_VOLUME_MIN",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_VOLUME_MAX,rst) ,"SYMBOL_VOLUME_MAX",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_COMMISSION,rst) ,"SYMBOL_COMMISSION",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_LIMIT_OFFSET,rst) ,"SYMBOL_LIMIT_OFFSET",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_MARGIN_INITIAL,rst) ,"SYMBOL_MARGIN_INITIAL",cstr(symbolName)
        ShowResult SymbolInfoDouble( cstr(symbolName),SYMBOL_CONTRACT_SIZE,rst) ,"SYMBOL_CONTRACT_SIZE",cstr(symbolName)
        AlertMessage cstr(exeResult)
     End Sub
     
     Public Sub ShowResult(isTrue,enumDescription,symName)
        if isTrue then
           exeResult=exeResult & CSTR(enumDescription) & " for "  & CSTR(symName) & " is : " & rst
         else
           exeResult=exeResult & "Error during Get " & CSTR(enumDescription) & " due to error code " & ErrorDescription(GetLastError())
        end if
           exeResult=exeResult & vbNewLine
              rst=""
    End Sub
     

  8. #8

    Default

    Hi,
    I am unable run you second code.. i got these error while run it on server side vtl..

    getlasterror is not declared it may be inaccessible due to its protection level.

    Can you please share me some startup guide. like helloworld program and some syntax related important points. because i am new to this IDE. and totally no idea about how to run that GUI code at client side VTL..

    Thanks,
    Rizwan Ali.

  9. #9

    Default

    please tell me how can i run this sample code for client side script. Also share some startup guide with me for VTL development.

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

    Default

    Hello

    VertexFX Trading Language (VTL)


    This is the soul of the scripting language in VertexFX. It is a procedural programming language that was developed specifically to serve traders, strategy makers and Technical Analysts (TA). VTL is a powerful and versatile programming language for traders. The language provides the framework required to build sophisticated trading programs as Expert Advisers (EA), Auto Traders, Robots, Alerts and Custom Indicators.


    It is supported by a user friendly Editor for its both Server Side VTL where script is hosted at the VertexFX Server and Client Side VTL where Script is running at the client terminal itself. A free community forum is available to deliver enough development support for VTL.


    VTL offers great advanced features that represent the future of trading and start the new generation of online trading systems, VertexFX has penetrated the trading world by its advanced scripting language VTL.


    VTL has many competitive features, VTL has two modes:


    1- VTL Server: Where Script is hosted at VertexFX Server. Programmers can program scripts in a .NET-like syntax with all its capability include Object Oriented Programming functionality. Usually Auto traders, Expert Advisers and Robots can be built using VTL server where no need to keep your Client Terminal running.


    2-VTL Client: Where Script is running regularly at Client terminal and can be programmed using VTL Editor using a VB6-like language. Usually Custom Indicators, Alerts and Expert Advisors (again) are built using VTL Client where a GUI interface is expected as output.


    As for the startup guide you can Read this course

  11. #11

    Default

    Hassan you just copy and paste the above reply from a URL i already have go through. Please answer my question rather than wasting your time. Even the course I already learn about it. I am software engineer have enough experience to understand these thing. What I need was to start the development but not know how to debug, and resolved the error I am facing as I asked you in my last post "getlasterror is not declared it may be inaccessible due to its protection level."
    Even the sample code you give me about the form is not run. In both case server side and client side script. Is there any tutorial from where I can learn the ABC about this platform how to use it properly. Any developer guide not like that http://www.hybrid-solutions.com/VTL%20Course.pdf

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

    Default

    Hello


    As you read in the course that I sent you, there is two types of the VTL ( VTL Server, VTL Client) with different syntax & technologies & methods. that mean you can't run a client VTL code on the VTL server.


    I sent you a client code because you cannot access your database which is located on your PC probably (not on a server with static IP) using server script which is located on our servers.

    keep cool and sorry for any inconvenience but we supposed that you did not read any thing before

  13. #13

    Default

    Hi Hassan,

    Ok lest me explain how I want to use vertex. As I show you an image that is a software GUI I develop for trading in stocks. As you see in the image some of the inputs files and last trade price,bid ,ask and other market data goes in to mysql stored procedure and in the result it generate buy or sell signals as return result set. On the bases of these signals I have to do trade through your system. Now please suggests me from where I can start? as you know I am new to this verfex type of thing
    On more thing I need to develop that type of GUI your help will be very appreciated.
    Regards,
    rizwanali89

  14. #14

    Default

    One more suggestion for your forum, when I replay to this thread its not appear immaterially. In fact it show after 12-24 hours if I am not wrong.

  15. #15
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Hello

    I got your point, I believe that you can done your project using our

    1-VertexFX Client API

    By adding our ActiveX DLL to your project, you can fetch All data you want to build your own plugin, fill this form to get it with a sample code and visit client API documentation for more info about it.

    2-VertexFX VTL (Client)

    The following code is a VTL client script that build a simple form.

    Note: VTL GUI methods is still a beta version code.

    [CODE]

    Public Sub main()


    dim formId
    formId = "1"
    CreateVTLForm Cstr(formId), false ,"Test"
    CreateVTLControl Cstr(formId),"lblA" ,GUI_LABEL
    SetGUIObject Cstr(formId) , "lblA",GUI_PROPERTY_CAPTION, "Lable "
    SetGUIObject Cstr(formId) , "lblA",GUI_PROPERTY_TOP,200
    CreateVTLControl Cstr(formId),"TextBox" ,GUI_TEXT_BOX
    SetGUIObject Cstr(formId) , "TextBox",GUI_PROPERTY_ENABLED , true
    SetGUIObject Cstr(formId) , "TextBox",GUI_PROPERTY_HEIGHT , 300
    SetGUIObject Cstr(formId) , "TextBox",GUI_PROPERTY_WIDTH ,1500
    SetGUIObject Cstr(formId) , "TextBox",GUI_PROPERTY_TOP, 400
    SetGUIObject Cstr(formId) , "TextBox",GUI_PROPERTY_LEFT, 800
    CreateVTLControl Cstr(formId),"Button" ,GUI_BUTTON
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_CAPTION, "click "
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_ENABLED , true
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_HEIGHT , 300
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_WIDTH ,1500
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_TOP, 400
    SetGUIObject Cstr(formId) , "Button",GUI_PROPERTY_LEFT, 2500
    End Sub


    [/CODE

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to define a function in VTL Script
    By magicmao2014 in forum VertexFX API/VTL Forum
    Replies: 4
    Last Post: 06-01-2014, 08:56 AM
  2. VTL Script CloseAllWithBenifit
    By imranhashmi92 in forum VertexFX API/VTL Forum
    Replies: 1
    Last Post: 05-15-2014, 03:00 PM
  3. help needed in VTL script
    By tarun in forum VertexFX API/VTL Forum
    Replies: 1
    Last Post: 03-06-2014, 06:44 AM
  4. How to call MarketInfo (MQL) in VTL?
    By diannt in forum VertexFX API/VTL Forum
    Replies: 45
    Last Post: 01-09-2014, 02:35 PM

Tags for this Thread

Posting Permissions

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