STOP orders always rejected.  [SOLVED]

Questions about MultiCharts and user contributed studies.
TW
Posts: 31
Joined: 14 Dec 2009
Has thanked: 5 times
Been thanked: 1 time

STOP orders always rejected.

Postby TW » 19 Nov 2012

I have codes for STOP order to SGX, like this:

if marketposition=1 then sell("LX") next bar at entryprice*0.95 stop;
if marketposition=-1 then buytocover("SX") next bar at entryprice*1.05 stop;

I have confirmed that SGX supports STOP order for IB.
But when the STOP orders have been placed by MC, the status of MC log always shows "rejected".

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: STOP orders always rejected.

Postby Andrew MultiCharts » 19 Nov 2012

Hello TW,

Please go to File -> New -> Order and Position Tracker window. In this window please open the Logs tab and find the respective rejection message. I will be happy to explain the message to you in order to make it work.

TW
Posts: 31
Joined: 14 Dec 2009
Has thanked: 5 times
Been thanked: 1 time

Re: STOP orders always rejected.

Postby TW » 19 Nov 2012

Hi Andrew,

Thank you for your reply, please see the log as following:


"2012/11/19 下午 01:14:06","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 01:02:30","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 下午 01:02:30","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 01:02:27","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 01:01:44","Warning","","Interactive Brokers","-","未能尋找在此?",
"2012/11/19 下午 01:01:44","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 01:00:06","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 12:54:48","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 下午 12:54:48","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 12:14:56","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 12:12:25","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 下午 12:12:24","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 12:10:59","Warning","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 12:10:01","Information","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 12:08:36","Warning","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 下午 12:05:35","Information","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 下午 12:03:53","Warning","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:59:27","Information","KSZ2","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:59:18","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:59:06","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:59:06","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:58:00","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:58:00","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:57:01","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:57:01","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:56:01","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:56:01","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:55:02","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:55:02","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:54:01","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:54:01","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:53:03","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:53:03","Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:50:55","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:50:55","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:50:26","Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:50:17","Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:50:15","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:50:15","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:50:13","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:47:48","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:46:31","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:46:31","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:45:54","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:42:53","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:42:53","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:40:45","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:40:03","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:40:03","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:39:56","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:39:27","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:39:27","Error","CNX12","Interactive Brokers","1119","Instrument: CNX12; Order: Buy Stop 1; Status: Rejected",
"2012/11/19 上午 11:39:27","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 11:39:25","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:39:25","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:37:21","Warning","","Interactive Brokers","-","Market data farm connection is OK:aufarm",
"2012/11/19 上午 11:37:21","Warning","","Interactive Brokers","-","Market data farm connection is OK:hkfarm",
"2012/11/19 上午 11:37:21","Information","","Interactive Brokers","-","Interactive Brokers; Connection to the Interactive Brokers Trad",
"2012/11/19 上午 11:37:21","Information","","Interactive Brokers","-","Connecting to Interactive Brokers Trader Workstation ...",
"2012/11/19 上午 11:36:29","Warning","","Interactive Brokers","-","Interactive Brokers; Disconnecting from the Interactive Brokers",
"2012/11/19 上午 11:34:41","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 11:33:28","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 11:33:28","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 10:54:41","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 10:54:17","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 10:54:17","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 10:53:30","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 10:47:30","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 10:47:29","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 10:47:24","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 10:45:54","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 10:45:54","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 10:44:12","Warning","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
"2012/11/19 上午 10:43:10","Information","CNX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
"2012/11/19 上午 10:43:08","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 10:43:06","Warning","","Interactive Brokers","-","No security definition has been found for the request",
"2012/11/19 上午 10:43:06","Warning","","Interactive Brokers","-","Market data farm connection is OK:aufarm",
"2012/11/19 上午 10:43:06","Warning","","Interactive Brokers","-","Market data farm connection is OK:hkfarm",
"2012/11/19 上午 10:43:06","Information","","Interactive Brokers","-","Interactive Brokers; Connection to the Interactive Brokers Trad",
"2012/11/19 上午 10:43:06","Information","","Interactive Brokers","-","Connecting to Interactive Brokers Trader Workstation ...",

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: STOP orders always rejected.

Postby Andrew MultiCharts » 19 Nov 2012

It seems your symbol mapping is not ok. Please read this article attentively and reset your symbol mapping from scratch. It should work fine then.

TW
Posts: 31
Joined: 14 Dec 2009
Has thanked: 5 times
Been thanked: 1 time

Re: STOP orders always rejected.

Postby TW » 19 Nov 2012

I tried "Buy next bar at market", the status still show "Rejected".
But I think the setting of symbol mapping is correct. My data source and broker are all IB.
I didn't edit anything, all symbols were set by auto.
And I used the same method, no problem for other exchanges except SGX.

Please see attached pictures and log.

2012/11/20 下午 12:07:34,"Warning","","Interactive Brokers","-","HMDS data farm connection is inactive but should be available u",
2012/11/20 下午 12:06:45,"Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
2012/11/20 下午 12:06:02,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 下午 12:06:02,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Market 1; Status: Rejected",
2012/11/20 下午 12:03:13,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 下午 12:03:13,"Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
2012/11/20 下午 12:00:34,"Warning","","Interactive Brokers","-","HMDS data farm connection is OK:hkhmds",
2012/11/20 上午 11:56:41,"Warning","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned off",
2012/11/20 上午 11:56:14,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 上午 11:56:14,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
2012/11/20 上午 11:55:07,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 上午 11:55:07,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
2012/11/20 上午 11:54:15,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 上午 11:54:15,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
2012/11/20 上午 11:53:03,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 上午 11:53:03,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
2012/11/20 上午 11:52:30,"Warning","","Interactive Brokers","-","No security definition has been found for the request",
2012/11/20 上午 11:52:30,"Error","INX12","Interactive Brokers","1119","Instrument: INX12; Order: Buy Stop 1; Status: Rejected",
2012/11/20 上午 11:52:30,"Information","INX12","Interactive Brokers","1119","The Automated Order Execution mode has been turned on",
Attachments
1120.png
(187.15 KiB) Downloaded 509 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: STOP orders always rejected.  [SOLVED]

Postby Andrew MultiCharts » 20 Nov 2012

Please try the following steps:

1. Createanother IB broker profile and set it up the same way you current one is set.
2. Delete or rename any of your IB problem symbols in QuoteManager.
3. Add the same symbol following this instruction.
4. Make sure the first IB broker profile is not connected. Connect the new IB broker profile.
5. Without changing anything in symbol mapping, try to place an order on IB.

TW
Posts: 31
Joined: 14 Dec 2009
Has thanked: 5 times
Been thanked: 1 time

Re: STOP orders always rejected.

Postby TW » 20 Nov 2012

Thank you very much, it's working by your solution.
What's the problem with my first IB broker profile? It works well for other exchanges.
Should I always keep the second IB broker profile for SGX symbols?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: STOP orders always rejected.

Postby Andrew MultiCharts » 21 Nov 2012

2 possible reasons:

1. The old broker profile may have corrupted symbol mapping due to some issues from previous versions.
2. The symbol in the data base doesn't match symbols (i mean all its parameters) that is returned from IB, when you add it by means of symbol lookup.


Return to “MultiCharts”