Sterling API Developer Thread

Quote from RueLorimier:

Their C# example code does support net frame work 4.
If they are so "excellent", it would be trivial to rewrite it.
Plus, this is the first time I've ever heard of a new release being held-up due to the sample code.
 
Quote from syswizard:

If they are so "excellent", it would be trivial to rewrite it.
Plus, this is the first time I've ever heard of a new release being held-up due to the sample code.

I mean their C# example code shows that they do support net framework 4.
 
Hi, i just started programming on the Sterling Trader API, and i'm have some trouble cancelling an order (i'm using c#).
Could someone please help me with a simple example of how to cancel an order? Thank you.
 
Guys,

Im looking for an experienced Sterling API coder who could copy a strategy I have working in MT4.

I would like the application to be written in C for running on multiple ECN's via Sterling.

This is a working profitable strategy.

Please PM if interested.
 
Quote from viniciusvbf:

Hi, i just started programming on the Sterling Trader API, and i'm have some trouble cancelling an order (i'm using c#).
Could someone please help me with a simple example of how to cancel an order? Thank you.

private SterlingLib.STIOrderMaint stOrdMaint=new SterlingLib.STIOrderMaint();

private CancelSterlingOrder(string ClOrderId){
this.stOrdMaint.CancelOrder("MY_ACCOUNT", 0, ClOrderId, ClOrderId+"_Canceled");
}


Note: The "ClOrderId" is the ClOrderId of the order you want to cancel. This ID is assigned by yourself when it is sent to Sterling API. It must be unique in multiple days .

If you want to test the code with your demo account, you must know:

All orders on demo account will be filled immediately no matter how much the order price is. So basically you will not have the chance to cancel them. But they do provide some test symbols for your debugging, so you can place an order on MSFT and cancel it:


AAPL: Partial Fill (Half)
CIEN: Stays in Sending Mode (New or Replace)
CP: Stays in Cancel Pending mode - does not fill
EK: Partial Fill (Half)
GE: Rejected Order
GOOG: Partial Fill (one-tenth)
JNJ: Does not fill
KO: Too Late To Cancel
MSFT: Does not fill
T: Does not fill
 
Did anyone read the Active X pdf from sterling. They recommend using only VB6.0 over .NET languages due to inefficiencies. There is no way around it until they update their API. Quotes per sec will always be slower than VB6.0 regardless of language. You just have to run VB6.0 in a windows XP virtual environment.

"Sterling allows for the development in languages other than VB 6.0. This however does come with some setbacks.
For example development in .net based languages will cause a delay in data transmission due to the inefficiencies in
communicating between .net and the ActiveX events. We have dealt with this inefficiency by adding the XML
functions to our API. They allow you to receive events more quickly. In addition to .net problems may users will
have problems while trying to integrate with C++ or JAVA. We recommend steering clear from C++ and JAVA if
at all possible. We have found that in VS 2010 you must open VS by right clicking the program and then selecting
Run as administrator, once this is done you will be able to open your project. You also need to make sure that your
project is compiled using .net 3.5 or earlier. We are not currently compatible with 4.0. We have implemented a
solution for the XP 64 bit crashes while using API."
 
Back
Top