Operations > Automated Trading > Automated Trading Interface (ATI) > DLL Interface >

TradeStation Sample Code

Print this Topic Previous pageReturn to chapter overviewNext page

The TradeStation sample code below illustrates the use of the NinjaTrader NtDirect.dll within an TradeStation Easy Language function script.

 

Sample Code

{ Copyright (c) 2005, NinjaTrader LLC [email protected] }

 

DefineDLLFunc: "NtDirect.dll", int, "Command", lpstr, lpstr, lpstr, lpstr, int, lpstr, double, double, lpstr, lpstr, lpstr, lpstr, lpstr;

 

inputs: Cmd(string), Account(string), Action(string), Quantity(numericsimple), OrderType(string), LimitPrice(numericsimple), StopPrice(numericsimple), TimeInForce(string), Oco(string), OrderId(string), Template(string), Strategy(string);

 

NTCommand = Command(Cmd, Account, GetSymbolName, Action, Quantity, OrderType, LimitPrice, StopPrice, TimeInForce, Oco, OrderId, Template, Strategy);