i have 2 questions regarding signals automatically executing on IB via the TWS API:
1. does Mulitcharts format the price based on the settings in QuoteManager for the symbol to ensure that the price is 'valid' with respect to min tic size and price format of the instrument?
--> or, do i need to take care to format each price and make sure it is rounded to minticsize ?
2. i have numerous exit signal - various conditions that would trigger scaling out or getting flat, both on the profit side (limit orders) and downside (stop orders),
--> does Multicharts look at these and only send the 'closest' orders (e.g. 1 stop and 1 limit) at any given time, or are all of the orders being sent over the wire to IB ?
--> if my concern is to not overload IB with too much network/messaging traffic, do i need to manage that within my strategy to only be sending 1 limit and 1 stop at a time? in other words, consolidate all of the code into 1 line for issuing a exit limit (if long) to be sell at minlist(several prices) ?
thank you.
minimize messaging traffic with IB from my signals [SOLVED]
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: minimize messaging traffic with IB from my signals
i have 2 questions regarding signals automatically executing on IB via the TWS API:
1. does Mulitcharts format the price based on the settings in QuoteManager for the symbol to ensure that the price is 'valid' with respect to min tic size and price format of the instrument?
--> or, do i need to take care to format each price and make sure it is rounded to minticsize ?
::
thank you.
MultiCharts saves the quotes from your dataprovider "as is".
The presentation on your chart (eg tick size) depends on 2 settings in your QuoteManager:
PriceScale
MinMove
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: minimize messaging traffic with IB from my signals
MultiCharts is dumb. It will only do things you instruct it to do.i have 2 questions regarding signals automatically executing on IB via the TWS API:
::
2. i have numerous exit signal - various conditions that would trigger scaling out or getting flat, both on the profit side (limit orders) and downside (stop orders),
--> does Multicharts look at these and only send the 'closest' orders (e.g. 1 stop and 1 limit) at any given time, or are all of the orders being sent over the wire to IB ?
--> if my concern is to not overload IB with too much network/messaging traffic, do i need to manage that within my strategy to only be sending 1 limit and 1 stop at a time? in other words, consolidate all of the code into 1 line for issuing a exit limit (if long) to be sell at minlist(several prices) ?
thank you.
ie. if the logic in your strategy meets the market condition, your order will be sent. If the logic is not met, nothing happens.
ie. you have to code the detail in the strategy to make MC operate the way you want it to.
If you are new to programming, this is a good place to start:
[FAQ] EasyLanguage / PowerLanguage
viewtopic.php?f=16&t=6929
Re: minimize messaging traffic with IB from my signals
thanks for your reply - i am not trying to do anything on the chart, but here is a specific example:MultiCharts is dumb. It will only do things you instruct it to do.i have 2 questions regarding signals automatically executing on IB via the TWS API:
::
2. i have numerous exit signal - various conditions that would trigger scaling out or getting flat, both on the profit side (limit orders) and downside (stop orders),
--> does Multicharts look at these and only send the 'closest' orders (e.g. 1 stop and 1 limit) at any given time, or are all of the orders being sent over the wire to IB ?
--> if my concern is to not overload IB with too much network/messaging traffic, do i need to manage that within my strategy to only be sending 1 limit and 1 stop at a time? in other words, consolidate all of the code into 1 line for issuing a exit limit (if long) to be sell at minlist(several prices) ?
thank you.
ie. if the logic in your strategy meets the market condition, your order will be sent. If the logic is not met, nothing happens.
ie. you have to code the detail in the strategy to make MC operate the way you want it to.
If you are new to programming, this is a good place to start:
[FAQ] EasyLanguage / PowerLanguage
viewtopic.php?f=16&t=6929
if i am long ESH6 (e-mini) and want to have a stop 1 average-true-range below my entry, i can write an order that says:
if(marketposition = 1) then sell("LX") 1 contract next bar at entryPrice - avgTrRange stop;
but what if that results in a price such as 1990.71
and the e-mini only trades on 0.25 increments - do i need to round that or does MC do that automatically?
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
Re: minimize messaging traffic with IB from my signals
You have to check with your broker.thanks for your reply - i am not trying to do anything on the chart, but here is a specific example:
if i am long ESH6 (e-mini) and want to have a stop 1 average-true-range below my entry, i can write an order that says:
if(marketposition = 1) then sell("LX") 1 contract next bar at entryPrice - avgTrRange stop;
but what if that results in a price such as 1990.71
and the e-mini only trades on 0.25 increments - do i need to round that or does MC do that automatically?
Some brokers will round up/down to give you best price.
IB will reject your order if the number does not meet the prescribed price format.
[Edit] Correction: MultiCharts will round your order according to the chart instrument price scale.
Re: minimize messaging traffic with IB from my signals [SOLVED]
thanks - i'm just going to use the function Round2Fraction around all of my prices and be done with it - should have coded it that way in the first place.
thanks for your replies, eric.
thanks for your replies, eric.
Re: minimize messaging traffic with IB from my signals
Why not do something like this.
if(marketposition = 1) then AND close < ( entryPrice - avgTrRange stop) then sell ("LX") 1 contract next bar at market;
This way you would not need to round anything.
if(marketposition = 1) then AND close < ( entryPrice - avgTrRange stop) then sell ("LX") 1 contract next bar at market;
This way you would not need to round anything.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: minimize messaging traffic with IB from my signals
Hi all,
MultiCharts is rounding the order price based on the chart instrument price scale.
MultiCharts is rounding the order price based on the chart instrument price scale.
Re: minimize messaging traffic with IB from my signals
thanks for confirming Henry - i was getting errors (orders rejected to IB) b/c i am using DTN iQFEED on the chart (so i can load enough data to prime the pump for my code and then i mapped the IQ chart symbol to the IB execution symbol - but unfortunately the IQFEED instrument was setup incorrectly in QuoteMgr - i fixed that but wanted to make sure that MC does submit based on the chart params.Hi all,
MultiCharts is rounding the order price based on the chart instrument price scale.
thanks again, eric.