Breakeven - order queue

Questions about MultiCharts and user contributed studies.
raven
Posts: 31
Joined: 17 Oct 2009
Been thanked: 1 time

Breakeven - order queue

Postby raven » 16 Jul 2010

When using function "setbreakeven()" not only stop orders are replaced when breakeven price is reached but limit orders (in general: target orders) are replaced also. That means your place in the order queue of the exchange (for your target price) is gone and your order has to line up again and chances to be filled decrease significantly. How to avoid replacing the target order?

Instead of using SetBreakEven or Trailing stop (same problem), I tried to write the signal using standard Stop/Limit orders. But due to the fact that stop- and limit-orders are connected by OCA-numbers even in that case your target will be replaced.

Many thanks in advance!

raven
Posts: 31
Joined: 17 Oct 2009
Been thanked: 1 time

Postby raven » 24 Jul 2010

... has anybody experienced the same problem or knows how to solve it?

Many thanks!

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Re: Breakeven - order queue

Postby Spaceant » 26 Jul 2010

When using function "setbreakeven()" not only stop orders are replaced when breakeven price is reached but limit orders (in general: target orders) are replaced also. That means your place in the order queue of the exchange (for your target price) is gone and your order has to line up again and chances to be filled decrease significantly. How to avoid replacing the target order?


I haven't used setbreakeven(), so I don't have much comment on that.
I am not sure if I understand when you mean..... when breakeven price is reached, your target limit order will be replaced by an OCA (or OCO) group with the target limit order and a stop order. To my understanding, MC will canceal your target limit order and replaces with the OCA group of orders. You may need to contact TSSupport if you don't want to have the cancellation. I am not sure it this can be done technically.

Instead of using SetBreakEven or Trailing stop (same problem), I tried to write the signal using standard Stop/Limit orders. But due to the fact that stop- and limit-orders are connected by OCA-numbers even in that case your target will be replaced.


I use standard Stop/Limit orders. With MC6.0 Beta and with matched quantity of contracts for both orders (both are exit orders), you can have Use Native OCO Group and Reduce Size OCO checked in order to let the limit order to be sent to the exchange directly without being held and monitored by TWS (I use IB, and I think it is similar for other brokers). This is to increase the chance of being filled.

Hoever, my strategy also generates like:
a limit exit order (with currentcontracts) and a reverse stop order (with 2 X currentcontracts)

Even with the above MC settings, the limit order will be held and monitored by TWS only, it will be sent to the exchange as a standard limit order only when the price has hit the limit price.

I am not sure if talk about this order not!?

I have requested TSSupport to send all limit orders to the exchange without being held.

raven
Posts: 31
Joined: 17 Oct 2009
Been thanked: 1 time

Postby raven » 26 Jul 2010

[Even with the above MC settings, the limit order will be held and monitored by TWS only, it will be sent to the exchange as a standard limit order only when the price has hit the limit price. ]

Unfortunately I still can't see how to transmit a limit (target) order immediately when getting my entry filled and to retain that order unchanged while stop price (stop order was transmitted simultaneously with target order) is changed through breakeven (or any other) order.

janus
Posts: 754
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 84 times

Re:

Postby janus » 04 Aug 2010

This is all getting too confusing. I'm going through a similar exercise of trying to figure out the best way to place simultaneous stop loss and limit profit orders on the IB queue. What makes it even more complicated is the fact these orders stay valid only for the duration of a bar, or a tick if IOG is turned on. It would be a lot simpler if we had such orders stay valid from the moment they are placed. To cancel an order we should then have some type of cancel order. It's the most logical way to do it as it's what a trader does manually through the IB TWS application. At the moment we have to repeat a stop or limit order endlessly, and that appears to present another problem, which I have brought up on another thread.
These users thanked the author janus for the post:
waveslider

waveslider
Posts: 197
Joined: 16 Oct 2011
Has thanked: 63 times
Been thanked: 20 times

Re: Breakeven - order queue

Postby waveslider » 22 Feb 2012

"Unfortunately I still can't see how to transmit a limit (target) order immediately when getting my entry filled and to retain that order unchanged while stop price (stop order was transmitted simultaneously with target order) is changed through breakeven (or any other) order."

This seems like a simple enough request!

I am having the same problem - limit orders constantly re-issued. Anyone made any progress? Multicharts - any tips?

vking
Posts: 235
Joined: 21 May 2009
Has thanked: 51 times
Been thanked: 41 times

Re: Breakeven - order queue

Postby vking » 23 Feb 2012

waveslider - see this thread and the PM request in that thread.

This PM request is likely to be implemented as part of 8 beta 2 and likely to fix the problem you have at hand as well.

Thanks.

viewtopic.php?f=1&t=8810
These users thanked the author vking for the post:
waveslider

waveslider
Posts: 197
Joined: 16 Oct 2011
Has thanked: 63 times
Been thanked: 20 times

Re: Breakeven - order queue

Postby waveslider » 23 Feb 2012

thanks - I voted for that. We had this discussion months ago and I still haven't found a way around it.
In TS the only way to really get a handle on orders was using macros - and that seemed problematic as well.

I have another question -

If I am in auto mode with a position on - entered by the signal, and there is a recalculation (have to turn off computer, alter code, etc.), is there any way to get it back on "Sync"? This happened to me yesterday (I cancelled the open orders). I tried to re-initiate with "assume position is same as on the chart" and there were no orders issued.

The only way I could get it back on track was in Async mode.

vking
Posts: 235
Joined: 21 May 2009
Has thanked: 51 times
Been thanked: 41 times

Re: Breakeven - order queue

Postby vking » 23 Feb 2012

the way I can think of (my preferred way and not necessarily works for you):

- Seperate out entries/exits into 2 seperate strategies

- for both the strategies - have the broker to strategy sync in place in the initialization section(useful in cases like disconnect)
- let them operate on their own - but on the same chart
- entry code would be operating on it's own ( based on the position at hand)
- exit code would be operating on it's own ( based on the position at hand)
- if you want certain variables to be passed between these strategies - you can use them through globalvariables.

Thanks

User avatar
Henry MultiСharts
Posts: 8473
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2718 times

Re: Breakeven - order queue

Postby Henry MultiСharts » 23 Feb 2012

waveslider wrote:thanks - I voted for that. We had this discussion months ago and I still haven't found a way around it.
In TS the only way to really get a handle on orders was using macros - and that seemed problematic as well.

I have another question -

If I am in auto mode with a position on - entered by the signal, and there is a recalculation (have to turn off computer, alter code, etc.), is there any way to get it back on "Sync"? This happened to me yesterday (I cancelled the open orders). I tried to re-initiate with "assume position is same as on the chart" and there were no orders issued.

The only way I could get it back on track was in Async mode.

When you turn off the auto trading - the strategy position becomes zero.
You can specify the position manually for each strategy. Please do the following:
Format-> Strategy properties-> Auto trading-> Assign the initial market position at the broker setting->Show the assign the initial market position at the broker dialogue-> Show always-> Ok.
When you start the auto trading - a dialogue window will appear where you can set the position for the strategy. This is how you can synchronize it (continue the trading from the position where you have left it).

If you are trading with multiple strategies on one instrument - you need to assign the position manually for each strategy.

You can also synchronize your strategy and broker position automatically with the help of synchronizer scripts:
!From Broker To Strategy MP Synchronizer! - Synchronizes the market position inside MultiCharts with the market position at broker by sending a dummy order in charting.
!From Strategy To Broker MP Synchronizer!- Synchronizes the market position at broker with the market position at chart by sending a real order to the broker.
These users thanked the author Henry MultiСharts for the post:
JoshM


Return to “MultiCharts”