What I'm wondering is if I place a buy limit order at 3:59 EST yesterday will the order still be good for tomorrow? So basically is this a good till cancel order?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Type of limit orders place
Collapse
X
-
Type of limit orders place
When you buy BuyLimit('qqq', 500); what type of limit order is this?
What I'm wondering is if I place a buy limit order at 3:59 EST yesterday will the order still be good for tomorrow? So basically is this a good till cancel order?Tags: None
-
-
Dierk,
I'm not sure where this properties thing is? You talk about the strategy... I'm not using a Ninja Script strategy, my strategies are written in trade station
Comment
-
I ended up going to interactive brokers and and clicking their time inforce option. Now we're on the same page
Thanks!
Comment
-
I'm trying to use the following function to place an buy limit order. I have no errors when I compile.
int NTCommand(string command, string account, string action, int quantity, string orderType, double limitPrice, double stopPrice,
string timeInForce, string oco, string orderId, string strategy, string strategyId)
Code:Attempted_Entry = true; OrderName = "LX1" + NumToSTr(CreateOrderName, 0); value2 = NTCommand("PLACE", symbol, "buy", 25, "LIMIT", LimitPriceL, LimitPriceL,"GTC", "", "OrderName","", ""); [B][/B]
Comment
-
Basically what I'm trying to do is place a GTC limit order. Normally I place a limit order by using this function
int NTBuyLimit(string orderId, int quantity, double limitPrice)
value1 = NTBuyLimit("anorder", 1000, 100.25);
That function places day limit orders. I went to IB and changed the default setting "to always place GTC orders" The function still places day orders.
So I'll have to use the
int NTCommand(string command, string account, string action, int quantity, string orderType, double limitPrice, double stopPrice,
string timeInForce, string oco, string orderId, string strategy, string strategyId) function to place my Buy Limit GTC order.
I replaced the code "value1 = NTBuyLimit("anorder", 1000, 100.25);"
with:
" value2 = NTCommand("PLACE", symbol, "buy", 25, "LIMIT", LimitPriceL, LimitPriceL,"GTC", "", "OrderName","", "");
// symbol is a string, LimitPriceL is type double.
// there is a spot for limitprice and stop price. I only want to use the limit
// price, but I filled int he stop price anyway, hope that's okay
The order is not being generated. Can you see an error in my function call?
Thanks
Comment
-
Automated trading is enabled and I'm connected to IB.
9/17/2007 11:43OrderOrder='1163998991/Uxxxxx' Name='' New State=PendingCancel Instrument='AIG' Action=Sell Limit price=69.22 Stop price=0 Quantity=25 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='
'9/17/2007 11:43OrderOrder='1163998990/Uxxxxx' Name='' New State=PendingCancel Instrument='AIG' Action=Buy Limit price=60.16 Stop price=0 Quantity=25 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
Above is the following log when I use
value1 = NTBuyLimit(OrderName, NumShares, LimitPriceL);
value2 = NTSellLimit(OrderName, NumShares, LimitPriceS);
<<orders are placed correctly>>
9/17/2007 11:44ATIAT 'PLACE;Uxxxxx;AIG;sell;25;LIMIT;69.2076;69.2076;GT C;DUMMY;OrderName;D2;D3' processing
9/17/2007 11:44ATIAT PLACE;Uxxxxx;AIG;buy;25;LIMIT;60.1524;60.1524;GTC; DUMMY;OrderName;D2;D3' processing
Above is the following log when I use
value2 = NTCommand("PLACE", ACCOUNT_NUM, "buy", 25, "LIMIT", LimitPriceL, LimitPriceL,"GTC", "DUMMY", "OrderName","D2", "D3");
value2 = NTCommand("PLACE", ACCOUNT_NUM, "sell", 25, "LIMIT", LimitPriceS, LimitPriceS,"GTC", "DUMMY", "OrderName","D2", "D3");
This code not not place orders at all
however value2 is "0"
<<for all orders, a different order ID is created>>Last edited by HelloHello; 09-17-2007, 01:07 PM.
Comment
-
Several things -
- Use caps when passing in string params, should not be an issue though.
- OrderId values are not unique since the log output clearly shows "OrderName" as your id value as opposed to unique values.
- Do not pass in "DUMMY" as an OCO id, leave this blank. This should also be unique for each OCO pair should you want to use OCO orders.
Apart from that, I suggest using the OIF Builder accessible from Tools > Options, ATI tab. Create some OIF, have them process (through Sim101) account and see if it works. When you see that it does, take a look at the text to see exactly what you should be passing in.RayNinjaTrader Customer Service
Comment
-
Thanks Ray,
yeah order OrderName is the string... I was passing "OrderName", I'll take a look and try on the SIM 101 account
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
150 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
Comment