TradeStation Sample Code
Previous Topic  Next Topic 

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


{ Copyright (c) 2005, NinjaTrader LLC ninjatrader@ninjatrader.com }

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);