Sterling API Developer Thread

New user to the site, and was hoping to learn about Sterling's API. I just wrote this code to get the date from the Sterling server. But isn't returning anything (technically, it is returning "")

Anyone have an idea what I might be doing incorrectly?
Thanks

Private Sub GetTodayDate()
Dim STIApp As SterlingLib.STIApp
With STIApp
TodayDateString = GetServerTime
End With
End Sub
 
Quote from PATSoftware:

New user to the site, and was hoping to learn about Sterling's API. I just wrote this code to get the date from the Sterling server. But isn't returning anything (technically, it is returning "")

Anyone have an idea what I might be doing incorrectly?
Thanks

Private Sub GetTodayDate()
Dim STIApp As SterlingLib.STIApp
With STIApp
TodayDateString = GetServerTime
End With
End Sub

You have to instanciate your StiApp Object before using it. Try this :

Private Sub GetTodayDate()

Dim STIApp As SterlingLib.STIApp
Set STIApp = New STIApp

TodayDateString = STIApp.GetServerTime

End Sub
 
Hi Nightrate,

Can you share the solution for connecting Ninjatrader to Sterling?

thanks,

Walter

Quote from nightrate:

I am pulling my hair out trying to figure this out...

How can NinjaTrader (which uses C#) be connected to Sterling Trader Pro??

(Ideally, life would be great if code could be inserted into a NT strategy to link it to STP... is this possible? If not can someone please provide any help?


(hope to have some hair left after all this is done)
 
Hi just a quick question for your pros out there. I am using vb2010 trying to get a constant update of bid and ask price of a stock. Please advise on the code structure :) Thank you
 
With sterling I'm programming in vb.net. I notice is says that you really should be programming in VB6, as there is some compatibility issue.


anyone have luck w/ this in vb.net

Thanks
 
Quote from WhiteOut56:

With sterling I'm programming in vb.net. I notice is says that you really should be programming in VB6, as there is some compatibility issue.


anyone have luck w/ this in vb.net

Thanks

My understanding is the quotes will be limited to about 1500/sec in .net. I think there's some info on this at the beginning of this thread. FWIW, all my code is in .net, it runs fine.
 
Back
Top