PDA

View Full Version : Error: NewMarketOrder is not decleared



nhasan
07-16-2015, 06:15 AM
Dear Team

I am trying to create new position from VTL server side script.
But it shows an error - NewMarketOrder is not decleared
Here is my test code :

Public Sub main()

Dim TradeSymbolID As VTLGeneral.CSymbol=ClientCode.GetSymbolByName( "EUR/USD" )
Dim Res as Integer = 0
Res = NewMarketOrder ( 1, TradeSymbolID, 0.1 )
GUI.MsgDialog(Res)

End Sub

Hassan-HS
07-16-2015, 08:05 AM
Dear Naem,

You have to add
ClientCode. before use any method



Public Sub main()


Dim TradeSymbolID As VTLGeneral.CSymbol=ClientCode.GetSymbolByName( "EUR/USD" )
Dim Res as Integer = 0
Res = ClientCode.NewMarketOrder (1,TradeSymbolID.ID,0.1)
GUI.MsgDialog(Res)


End Sub

nhasan
07-20-2015, 10:35 AM
Ok, I'll include ClientCode for each function
But I think it should be taken as default namespace for all function call.
BTW, I have another problem
I was working on a Demo account last week, the user name and password was saved and it was opening regularly
But after the weekend when I open the client terminal it says -'Invalid username password' and I have lost the last account and server side script saved on that account
I open another demo account today to continue my VTL job, but when I launch VTL Editor it says 'Invalid Login' and I can't work on VTL scripts.
My user id is USER19271

Edakad
07-20-2015, 12:23 PM
I too face the same situation nd lost 3 scripts. In vtl editor when the script is run on the server for the first time, further modifications are not saved in the local copy of the script. This leads to loss of the script with latest modifications.

Hassan-HS
08-16-2015, 07:29 AM
Dear Developers,

Please make sure that you have a backup of your work on your local machines, because we already delete any old demo account every month.

Thanks.