Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Jun 2013
    Posts
    144

    Default Server side script is not running

    Dear Team

    I am running a server side script named earlyTopProrate on me demo account USER12929

    It should open a position a the beginning of each day after 4:00 hour server time

    But it's not running while client terminal remain closed

    When I open client terminal in my PC it shows the script is running(green light) but no position opens, if I stop the script and run it again then a new position open by the script.

    It seems that the script is not running from server side, it runs only when client terminal remain open.

    Please check the issue

    Thanks

  2. #2
    b_morar
    Guest

    Post The Scripts still running even if the client terminal is closed.

    Dir Sir,

    It seems that your script is not free of errors.

    Please run the following server side script as following steps, it should open a position after server time pass a certain time.

    1-Determine your time using "Time" variable.

    2-Close VertexFX Client Terminal.


    Note: All times according to server time.




    Code:
    dim Time As Date
    dim Flag = true
    
    Public Sub main()
    Time=Cdate("1/10/2013 04:38:00 PM")
    
    if Time > now  then
        GUI.MSGDialog("Please wait...")
    Else
        GUI.MSGDialog("Please set the Time to be grater than now")
        ClientCode.EndScript()
    end if
    End Sub
    
    
    Public Sub OnTick(SymbolName)
     if SymbolName <> "SILVER" then
     exit sub
     end if
     if now > Time and flag  then
    Flag = false
    ClientCode.NewMarketOrder(-1,ClientCode.GetSymbolByName("SILVER").ID,0.1)
    ClientCode.EndScript()
    end if
    End Sub

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Posts
    144

    Default

    Thanks for your reply
    But it's not just opening a position, there are a lot of functions in my server side script that seems not working while the client terminal remain closed.
    Is there any way to check whether the script is running or not?
    For example, can we show any message from the server side script in any window without opening it in client terminal that ensure that the script is running?
    Or can we write messages/signals in a log file that can be checked to ensure signals are properly generated by the server?
    Thanks

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

    Post VTL Server Scripts Whether

    Dear Hasan

    The only way to know if the script is working or not is by the client terminal.

  5. #5
    Senior Member
    Join Date
    Jun 2013
    Posts
    144

    Default

    Yes, I'll check it from client terminal
    But I want to write signals/alerts/messages in a log file that is generated by the script while client terminal is closed
    So that I can check that log file to ensure that the script was running without dependency on client terminal.
    Is it possible?

  6. #6
    b_morar
    Guest

    Default

    Dir Sir,

    No , it's not possible, you can open a suggested feature ticket through this link.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Useing MACD indicator in Server Script
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 9
    Last Post: 09-12-2013, 08:00 AM

Posting Permissions

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