PDA

View Full Version : Server side script is not running



nhasan
10-01-2013, 11:42 AM
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

b_morar
10-01-2013, 02:02 PM
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.







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

nhasan
10-02-2013, 08:39 AM
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

Hassan-HS
10-02-2013, 10:19 AM
Dear Hasan

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

nhasan
10-02-2013, 10:24 AM
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?

b_morar
10-02-2013, 01:12 PM
Dir Sir,

No , it's not possible, you can open a suggested feature ticket through this link (http://www.hybrid-solutions.com/support/index.php?/hs/Tickets/Submit).