private string CreatePlaceOrder(string account, string strategyTemplateName, OrderAction action, int quantity, OrderType orderType, string orderId, double limitPrice, double stopPrice)
{
string commandStringOIF = CommandString("PLACE",
account,
Instrument.FullName,
action.ToString(),
quantity,
orderType.ToString(),
limitPrice,
stopPrice,
TimeInForce.Day.ToString(),
"",
orderId,
strategyTemplateName,
"");
NinjaTrader.Server.AtiServer atiServer = NinjaTrader.Cbi.Globals.AtiServer;
MethodInfo miProcessOif = typeof(NinjaTrader.Server.AtiServer).GetMethod( "ProcessOif", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static );
if( miProcessOif != null )
{ object[] args = { commandStringOIF };
miProcessOif.Invoke( null, args );
}
return commandStringOIF;
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Access to ATI server in script
Collapse
X
-
Access to ATI server in script
In NT7 I use the following example code to run the ATI server from a script to place various orders, the example is an order to buy or sell, I realize this is not documented in NT7 but is there a documented version in NT8 or can you tell me how to access a reference to the ATI server?
Code:Tags: None
-
I believe that ati server code was being used in NT7 to overcome it's inability to place an order attached to an ATM within an indicator..Originally posted by seahn View PostIn NT7 I use the following example code to run the ATI server from a script to place various orders, the example is an order to buy or sell, I realize this is not documented in NT7 but is there a documented version in NT8 or can you tell me how to access a reference to the ATI server?
NT8 has changed and opened up that a bit..
You might try referencing the StartAtmStrategy() now instead..
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
331 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
210 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
196 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
286 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
242 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment