How can I prevent this?

Questions about MultiCharts and user contributed studies.
chanceee
Posts: 7
Joined: 03 Dec 2021
Been thanked: 1 time

How can I prevent this?

Postby chanceee » 09 Dec 2021

Hello everyone, I am running a strategy with TS Data and IB brokerage.... My strategy uses Buy Stops and Sell Stops to enter and exit positions and as you can see from the attachment, I'm getting bad fills. Obviously what's happening is my strategy sends a buy stop or sell stop to IB and somehow their data is different and the price is supposedly hit - when it isn't on the chart - and a trade is made. This is unacceptable.

How can I correct things so that an order is sent only when price is touched on the chart? I'm okay with Multicharts sending a market order once price is hit on the chart.... which is basically what my strategy is doing in backtesting anyway. In need to have my strategy running in Multicharts stay in sync with what TS is showing me as much as possible. Thanks in advance for any help.
Howdoesthishappen.PNG
(10.16 KiB) Not downloaded yet
-James
Attachments
Howdoesthishappen.PNG
(10.16 KiB) Not downloaded yet

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How can I prevent this?

Postby TJ » 09 Dec 2021

is there any reason you do not want to use IB data?

chanceee
Posts: 7
Joined: 03 Dec 2021
Been thanked: 1 time

Re: How can I prevent this?

Postby chanceee » 09 Dec 2021

First, I know TS data to be more reliable. I've been trading for many years and I know IB data can be a joke. I know that's generally more at the smaller timeframes, but still Second, I'm using StrategyQuant to create some of my strategies and I'm using TS data to do so.

I just figured it wouldn't be that hard to set something to accomplish what I wanted. I've looked over the Price Emulation settings and Mode Selection, etc.... it seems like one of those, specifically 'Emulate locally using Trade' would work. Although, I've already experimented with those in my IB paper trading account and they're just causing worse problems.

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: How can I prevent this?

Postby Tammy MultiCharts » 09 Dec 2021

Hi chanceee,

Please try the following:
1) In Strategy Properties > Auto Trading tab under Get Real-Time Data select Chart.
2) In the same window check the options under Unfilled Strategy Order Replacement and leave 0 seconds.
Please test this out on a paper trading account first and see if it suit you.
More on auto trading settings here.

chanceee
Posts: 7
Joined: 03 Dec 2021
Been thanked: 1 time

Re: How can I prevent this?

Postby chanceee » 10 Dec 2021

Thanks for responding. I'm trying to test out the settings you recommended but honestly I'm having trouble getting anything working properly. First, I keep getting the error message that price does not conform to the minimum price variation for this contract. I've read the literature on this and attempted to set the min move, price scale, and big point value to match but it still won't work.

One odd problem is that Interactive Brokers has the min move for GBPJPY at 5, which isn't even correct. It's pretty much universally known to be 1, the way TS has it. But I followed the instructions anyway and set the TS GBPJPY min move at 5, and still get the error message.

My second problem is the instant I turn live auto-trading on, Multicharts sends an order if the strategy on the chart is in a position. And this is even after I set - Assign Initial Market Position to Strategy to 'From Broker' or 'Flat'.

So all that to say, if you can help me with any of these problems it will be much appreciated. Thanks.

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: How can I prevent this?

Postby Tammy MultiCharts » 15 Dec 2021

Hello chanceee,

When the minimal price movement is different for the data feed and broker symbols, in your case there are 2 options:
1) Use Market orders only.
2) Round up the Stop/Limit orders prices in your script so that they conform with the broker's prices.

As for the second issue you mentioned, we will need to check your logs to find out why that is happening.
Please reproduce the behavior and send send us logs via the main MultiCharts window -> Help -> Feedback.
In the comment section please describe your steps before the issue was reproduced.
Please select the options:
Attach a screenshot;
Attach log files…;
Upload collected data to help desk;

chanceee
Posts: 7
Joined: 03 Dec 2021
Been thanked: 1 time

Re: How can I prevent this?

Postby chanceee » 20 Dec 2021

Okay, I have sent the logs, along with a problem I'm now having with a second strategy I'm trying to run with AAPL. I'm getting the error.... 'Error validating request - 'br' : cause - The symbol or the local-symbol or the security id must be entered.' Thanks, James

User avatar
Tammy MultiCharts
Posts: 200
Joined: 06 Aug 2020
Has thanked: 6 times
Been thanked: 65 times

Re: How can I prevent this?

Postby Tammy MultiCharts » 21 Dec 2021

Hello chancee,

We have received the logs and forwarded them to the dev team. Will follow you up via email on that.

As for the second issue, looks like the symbol description is not correct for AAPL.
The currency code in the instrument’s description is critical for accessing the data for IB symbols.
For example for MSFT the following description is provided by the API: USD Stock MSFT (NASDAQ).
The most import part is currency code USD. If it is missing then that is highly likely that the data will not be provided by the API.
Please try to re-add the instrument from the data feed (Quote Manager > Instrument > Add Symbol > From data source) or modify the description in symbol settings (right-click on the symbol > Edit symbol > Settings tab).

User avatar
Mark Brown
Posts: 181
Joined: 29 Nov 2016
Has thanked: 111 times
Been thanked: 17 times

Re: How can I prevent this?

Postby Mark Brown » 29 Dec 2022

any update on this problem? also how would support suggest to modify the orders with limits orders please provide an example.


Return to “MultiCharts”