Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order Handling & Parameters
Collapse
X
-
Thank you for your replies. You have been a great help.
I'm working with the unmanaged structure. I like to be able to handle all of the order features and I don't mind writing code to do it. I like to have to unlimited control of the orders and handling.
thanks again.
Comment
-
Hello again. Check out this chart (attached). I'm getting really frustrated with this as I've spent days trying to resolve this problem.
How can I develop a trading system when the or display is all messed up? I'm going to add some debugging to my script to see if the actual price data is corrupted in NT as well as the price bars. I have to assume they are otherwise I believe I would be seeing REAL PRICE VALUES.
I can't believe others have not reported this issue before? I have the newest NinjaTrader installed, I have the proper TWS installed and as far as I can tell, it is setup properly.
Any ideas??
Comment
-
Hello Bmatheny,
Can you please send the log and trace files to support[AT]ninjatrader[DOT]com
- You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
- The log file will be named "log.YYYYMMDD.txt"
- You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
- The trace file will be named "trace.YYYYMMDD.txt"
Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.
I look forward to assisting you further.JoydeepNinjaTrader Customer Service
Comment
-
yup. Just confirmed my thoughts. As soon as my entry order is filled, the charting starts messing up. Probably something to do with my handling of the orders or the onExecute function or something.
On another note, it appears that when the chart prices screw up, the raw data is also screwed up. Thus, the trading system is completely unreliable unless I can resolve this pricing issue.
PHP Code:PB Price 2598.5 2599 2598.25 2598.75
Running Pattern Code 1300 0 -1
Execution='97dfedd3e2414cdd873b67e440da7364' Instrument='NQ 12-12' Account='Sim101' Name='Short Stop' Exchange=Default Price=2599.25 Quantity=1 Market position=Long Commission=0 Order='79e168adb36c4295b760cb3e8fab86ae' Time='11/21/2012 10:00:18 AM'
Cancelled custom managed order at 11/21/2012 10:00:18 AM: Order='92397f0b45784a0bb1d84b0eaec677f6/Sim101' Name='Short Target' State=Working Instrument='NQ 12-12' Action=Buy Limit price=2595.75 Stop price=0 Quantity=1 Strategy='CandleScalperV1' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='92397f0b45784a0bb1d84b0eaec677f6' Gtd='12/1/2099 12:00:00 AM'
PB Price 2598.75 2599.75 2597.75 2597.75
Running Pattern Code 1301 0 0
11/21/2012 10:03:00 AM Bearish Trigger Found -0.1890625 :: 0.676030731201172
11/21/2012 10:03:01 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:01 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.50 OcoId='' Name='Enter Short Stop'
11/21/2012 10:03:01 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:01 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2598.50 StopPrice=0 OcoId='' Name='Enter Short Limit'
Execution='a612707e4dca4f19a847e114a0266fde' Instrument='NQ 12-12' Account='Sim101' Name='Enter Short Stop' Exchange=Default Price=2597.5 Quantity=1 Market position=Short Commission=0 Order='92d1d1a529054762b196574d48632336' Time='11/21/2012 10:03:20 AM'
Cancelled custom managed order at 11/21/2012 10:03:20 AM: Order='cfb618fd0ef84b1cb05b7491d784613d/Sim101' Name='Enter Short Limit' State=Working Instrument='NQ 12-12' Action=Sell Limit price=2598.5 Stop price=0 Quantity=1 Strategy='CandleScalperV1' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='cfb618fd0ef84b1cb05b7491d784613d' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 10:03:20 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:20 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2599.00 OcoId='' Name='Short Stop'
11/21/2012 10:03:20 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:20 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2596.00 StopPrice=0 OcoId='' Name='Short Target'
Execution='d85daaadb1b94c949fe9cb8b63f63d9e' Instrument='NQ 12-12' Account='Sim101' Name='Short Target' Exchange=Default Price=2596 Quantity=1 Market position=Long Commission=0 Order='02bda281f4d74a8897e212c4a5772a52' Time='11/21/2012 10:04:23 AM'
Cancelled custom managed order at 11/21/2012 10:04:23 AM: Order='d295279322884c79b537711d3466337e/Sim101' Name='Short Stop' State=Accepted Instrument='NQ 12-12' Action=Buy Limit price=0 Stop price=2599 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='d295279322884c79b537711d3466337e' Gtd='12/1/2099 12:00:00 AM'
PB Price 2597.75 2598.25 2595.75 2596
Running Pattern Code 1302 0 0
PB Price 2596.25 2597 2596 2598.25
Running Pattern Code 1303 0 0
11/21/2012 10:09:00 AM Bullish Trigger Found -0.5552734375 :: 0.404123401641846
11/21/2012 10:09:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:04 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.25 OcoId='' Name='Enter Long Stop'
11/21/2012 10:09:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:04 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2596.75 StopPrice=0 OcoId='' Name='Enter Long Limit'
Execution='cbbab5190e394f549378f3cc9b12a90e' Instrument='NQ 12-12' Account='Sim101' Name='Enter Long Limit' Exchange=Default Price=2596.5 Quantity=1 Market position=Long Commission=0 Order='18b45cb38986470d9f6e6c322c4c5408' Time='11/21/2012 10:09:05 AM'
Cancelled custom managed order at 11/21/2012 10:09:05 AM: Order='7bd65d64b232412386e93d11c9348554/Sim101' Name='Enter Long Stop' State=Accepted Instrument='NQ 12-12' Action=Buy Limit price=0 Stop price=2597.25 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='7bd65d64b232412386e93d11c9348554' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 10:09:05 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:05 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2595.00 OcoId='' Name='Long Stop'
11/21/2012 10:09:05 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:05 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2598.00 StopPrice=0 OcoId='' Name='Long Target'
PB Price 2596.25 2597.75 2596.25 2598.25
Running Pattern Code 1304 0 1
PB Price 2597.5 2598 2597 2598.25
Running Pattern Code 1305 0 1
Execution='1b5bbd8af49449f2a24b8da230650916' Instrument='NQ 12-12' Account='Sim101' Name='Long Target' Exchange=Default Price=2598 Quantity=1 Market position=Short Commission=0 Order='3f570ea30e8146c7b6c610b2c936b966' Time='11/21/2012 10:15:28 AM'
Cancelled custom managed order at 11/21/2012 10:15:28 AM: Order='f145412830604d9a99ef7cb76e13aab3/Sim101' Name='Long Stop' State=Accepted Instrument='NQ 12-12' Action=Sell Limit price=0 Stop price=2595 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='f145412830604d9a99ef7cb76e13aab3' Gtd='12/1/2099 12:00:00 AM'
PB Price 2597.75 2598 2595.25 2595.25
Running Pattern Code 1306 0 0
Please note the similar CLOSE prices reported for 3 bars. This was when the chart screwed up while trading. So, it appears that the price data errors are corrupting the entire platform.
Comment
-
this is getting really confusing. The system ran fine through multiple trades, then threw the OnBarUpdate error again.
Why in the world would it run thru 6+ trades just fine (without error), then throw an error like this??
PHP Code:PB Price 2598 2598.5 2597 2597.75
Running Pattern Code 1293 0 0
PB Price 2597.75 2599.75 2597.75 2599.5
Running Pattern Code 1294 0 0
11/21/2012 9:42:00 AM Bullish Trigger Found 1.3166015625 :: 1.24746904373169
PB Price 2599.25 2600.75 2599 2600.25
Running Pattern Code 1295 0 0
PB Price 2600.25 2600.75 2599.75 2600.25
Running Pattern Code 1296 0 0
PB Price 2600.25 2600.5 2598 2598.25
Running Pattern Code 1297 0 0
11/21/2012 9:51:00 AM Bearish Trigger Found 0.53203125 :: 1.02975196838379
11/21/2012 9:51:00 AM Entered internal SubmitOrder() method at 11/21/2012 9:51:00 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.75 OcoId='' Name='Enter Short Stop'
11/21/2012 9:51:00 AM Entered internal SubmitOrder() method at 11/21/2012 9:51:00 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2599.00 StopPrice=0 OcoId='' Name='Enter Short Limit'
PB Price 2598.25 2599 2598 2598.75
Running Pattern Code 1298 -1 0
Execution='f84a806edd80435eaecd8d98daaff928' Instrument='NQ 12-12' Account='Sim101' Name='Enter Short Stop' Exchange=Default Price=2597.5 Quantity=1 Market position=Short Commission=0 Order='7f3c365b712d46bcb2879d54639bd879' Time='11/21/2012 9:55:01 AM'
Cancelled custom managed order at 11/21/2012 9:55:01 AM: Order='66df51634730448da5c85f2eaf57d602/Sim101' Name='Enter Short Limit' State=Working Instrument='NQ 12-12' Action=Sell Limit price=2599 Stop price=0 Quantity=1 Strategy='CandleScalperV1' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='66df51634730448da5c85f2eaf57d602' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 9:55:01 AM Entered internal SubmitOrder() method at 11/21/2012 9:55:01 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2599.25 OcoId='' Name='Short Stop'
11/21/2012 9:55:01 AM Entered internal SubmitOrder() method at 11/21/2012 9:55:01 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2595.75 StopPrice=0 OcoId='' Name='Short Target'
PB Price 2598.75 2598.75 2597.5 2598.25
Running Pattern Code 1299 0 -1
PB Price 2598.5 2599 2598.25 2598.75
Running Pattern Code 1300 0 -1
Execution='97dfedd3e2414cdd873b67e440da7364' Instrument='NQ 12-12' Account='Sim101' Name='Short Stop' Exchange=Default Price=2599.25 Quantity=1 Market position=Long Commission=0 Order='79e168adb36c4295b760cb3e8fab86ae' Time='11/21/2012 10:00:18 AM'
Cancelled custom managed order at 11/21/2012 10:00:18 AM: Order='92397f0b45784a0bb1d84b0eaec677f6/Sim101' Name='Short Target' State=Working Instrument='NQ 12-12' Action=Buy Limit price=2595.75 Stop price=0 Quantity=1 Strategy='CandleScalperV1' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='92397f0b45784a0bb1d84b0eaec677f6' Gtd='12/1/2099 12:00:00 AM'
PB Price 2598.75 2599.75 2597.75 2597.75
Running Pattern Code 1301 0 0
11/21/2012 10:03:00 AM Bearish Trigger Found -0.1890625 :: 0.676030731201172
11/21/2012 10:03:01 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:01 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.50 OcoId='' Name='Enter Short Stop'
11/21/2012 10:03:01 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:01 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2598.50 StopPrice=0 OcoId='' Name='Enter Short Limit'
Execution='a612707e4dca4f19a847e114a0266fde' Instrument='NQ 12-12' Account='Sim101' Name='Enter Short Stop' Exchange=Default Price=2597.5 Quantity=1 Market position=Short Commission=0 Order='92d1d1a529054762b196574d48632336' Time='11/21/2012 10:03:20 AM'
Cancelled custom managed order at 11/21/2012 10:03:20 AM: Order='cfb618fd0ef84b1cb05b7491d784613d/Sim101' Name='Enter Short Limit' State=Working Instrument='NQ 12-12' Action=Sell Limit price=2598.5 Stop price=0 Quantity=1 Strategy='CandleScalperV1' Type=Limit Tif=Day Oco='' Filled=0 Fill price=0 Token='cfb618fd0ef84b1cb05b7491d784613d' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 10:03:20 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:20 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2599.00 OcoId='' Name='Short Stop'
11/21/2012 10:03:20 AM Entered internal SubmitOrder() method at 11/21/2012 10:03:20 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2596.00 StopPrice=0 OcoId='' Name='Short Target'
Execution='d85daaadb1b94c949fe9cb8b63f63d9e' Instrument='NQ 12-12' Account='Sim101' Name='Short Target' Exchange=Default Price=2596 Quantity=1 Market position=Long Commission=0 Order='02bda281f4d74a8897e212c4a5772a52' Time='11/21/2012 10:04:23 AM'
Cancelled custom managed order at 11/21/2012 10:04:23 AM: Order='d295279322884c79b537711d3466337e/Sim101' Name='Short Stop' State=Accepted Instrument='NQ 12-12' Action=Buy Limit price=0 Stop price=2599 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='d295279322884c79b537711d3466337e' Gtd='12/1/2099 12:00:00 AM'
PB Price 2597.75 2598.25 2595.75 2596
Running Pattern Code 1302 0 0
PB Price 2596.25 2597 2596 2598.25
Running Pattern Code 1303 0 0
11/21/2012 10:09:00 AM Bullish Trigger Found -0.5552734375 :: 0.404123401641846
11/21/2012 10:09:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:04 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.25 OcoId='' Name='Enter Long Stop'
11/21/2012 10:09:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:04 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2596.75 StopPrice=0 OcoId='' Name='Enter Long Limit'
Execution='cbbab5190e394f549378f3cc9b12a90e' Instrument='NQ 12-12' Account='Sim101' Name='Enter Long Limit' Exchange=Default Price=2596.5 Quantity=1 Market position=Long Commission=0 Order='18b45cb38986470d9f6e6c322c4c5408' Time='11/21/2012 10:09:05 AM'
Cancelled custom managed order at 11/21/2012 10:09:05 AM: Order='7bd65d64b232412386e93d11c9348554/Sim101' Name='Enter Long Stop' State=Accepted Instrument='NQ 12-12' Action=Buy Limit price=0 Stop price=2597.25 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='7bd65d64b232412386e93d11c9348554' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 10:09:05 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:05 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2595.00 OcoId='' Name='Long Stop'
11/21/2012 10:09:05 AM Entered internal SubmitOrder() method at 11/21/2012 10:09:05 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2598.00 StopPrice=0 OcoId='' Name='Long Target'
PB Price 2596.25 2597.75 2596.25 2598.25
Running Pattern Code 1304 0 1
PB Price 2597.5 2598 2597 2598.25
Running Pattern Code 1305 0 1
Execution='1b5bbd8af49449f2a24b8da230650916' Instrument='NQ 12-12' Account='Sim101' Name='Long Target' Exchange=Default Price=2598 Quantity=1 Market position=Short Commission=0 Order='3f570ea30e8146c7b6c610b2c936b966' Time='11/21/2012 10:15:28 AM'
Cancelled custom managed order at 11/21/2012 10:15:28 AM: Order='f145412830604d9a99ef7cb76e13aab3/Sim101' Name='Long Stop' State=Accepted Instrument='NQ 12-12' Action=Sell Limit price=0 Stop price=2595 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='f145412830604d9a99ef7cb76e13aab3' Gtd='12/1/2099 12:00:00 AM'
PB Price 2597.75 2598 2595.25 2595.25
Running Pattern Code 1306 0 0
PB Price 2595.5 2596.5 2595 2596.25
Running Pattern Code 1307 0 0
PB Price 2596.5 2597.25 2595.5 2598.25
Running Pattern Code 1308 0 0
11/21/2012 10:24:00 AM Bullish Trigger Found 0.0375 :: 0.081951904296875
11/21/2012 10:24:03 AM Entered internal SubmitOrder() method at 11/21/2012 10:24:03 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2597.50 OcoId='' Name='Enter Long Stop'
11/21/2012 10:24:03 AM Entered internal SubmitOrder() method at 11/21/2012 10:24:03 AM: Action=Buy OrderType=Limit Quantity=1 LimitPrice=2596.75 StopPrice=0 OcoId='' Name='Enter Long Limit'
Execution='f6922b4e4b5847e095b0ca688cc56b2c' Instrument='NQ 12-12' Account='Sim101' Name='Enter Long Limit' Exchange=Default Price=2596.5 Quantity=1 Market position=Long Commission=0 Order='614cb42bc005494e8f05e7839a450a48' Time='11/21/2012 10:24:03 AM'
Cancelled custom managed order at 11/21/2012 10:24:04 AM: Order='431a9d1db8ca4a3fbbc205b9728fa344/Sim101' Name='Enter Long Stop' State=Accepted Instrument='NQ 12-12' Action=Buy Limit price=0 Stop price=2597.5 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='431a9d1db8ca4a3fbbc205b9728fa344' Gtd='12/1/2099 12:00:00 AM'
11/21/2012 10:24:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:24:04 AM: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=2594.75 OcoId='' Name='Long Stop'
11/21/2012 10:24:04 AM Entered internal SubmitOrder() method at 11/21/2012 10:24:04 AM: Action=Sell OrderType=Limit Quantity=1 LimitPrice=2598.25 StopPrice=0 OcoId='' Name='Long Target'
PB Price 2596 2597.75 2596 2598.25
Running Pattern Code 1309 0 1
Execution='a4ef30428f564e3dbbe6bffb772cd1cc' Instrument='NQ 12-12' Account='Sim101' Name='Long Target' Exchange=Default Price=2598.25 Quantity=1 Market position=Short Commission=0 Order='99999230eaca471b91cc53d20c23ca4a' Time='11/21/2012 10:28:09 AM'
Cancelled custom managed order at 11/21/2012 10:28:09 AM: Order='0cd3ba8779db4684ad78ee4d39e347e5/Sim101' Name='Long Stop' State=Accepted Instrument='NQ 12-12' Action=Sell Limit price=0 Stop price=2594.75 Quantity=1 Strategy='CandleScalperV1' Type=Stop Tif=Day Oco='' Filled=0 Fill price=0 Token='0cd3ba8779db4684ad78ee4d39e347e5' Gtd='12/1/2099 12:00:00 AM'
PB Price 2597.75 2598.75 2597 2598.25
Running Pattern Code 1310 0 0
PB Price 2597.5 2598.25 2597.5 2598.25
Running Pattern Code 1311 0 0
**NT** Error on calling 'OnBarUpdate' method for strategy 'CandleScalperV1/b8faebb1e9154a2193c09d93e3279d80': Object reference not set to an instance of an object.
Last edited by Bmatheny; 11-21-2012, 01:30 PM.
Comment
-
Someone could give me an example strategy wherein the orders are submitted in unmanaged approach?
Comment
-
Someone could help me on this one.
**NT** A Sell stop order placed at '10/31/2012 2:28:10 PM' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
I trying to submit a stop to move to breakeven but it says that error. I am testing it in the strategy analyzer.
Comment
-
Hello edward_bell,
Unfortunately we do not have a sample code demonstrating Unmanaged approach however you can refer to our help guide to know more about it.
A sell stop order must be placed below the current market price. If you try to place it above the current market price then it will be rejected (by your broker/exchange).
In your coding you have to make sure you are placing a valid stop price.JoydeepNinjaTrader Customer Service
Comment
-
Someone could help me on this one.
**NT** A Sell stop order placed at '10/31/2012 2:28:10 PM' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
I trying to submit a stop to move to breakeven but it says that error. I am testing it in the strategy analyzer.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
266 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
||
Started by Mestor, Today, 03:15 AM
|
0 responses
1 view
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
11 responses
305 views
0 likes
|
Last Post
by z.franck
Today, 02:29 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
409 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
Comment