why my limit orders can't be converted to market order?

Questions about MultiCharts and user contributed studies.
stonebrook2011
Posts: 11
Joined: 30 Dec 2011
Has thanked: 1 time

why my limit orders can't be converted to market order?

Postby stonebrook2011 » 28 Jan 2013

hi,
I am using the 8.0 64 bit version (build5622). My strategy (based on 15min bar) uses limit order to start and exit positions. When the order can't be filled after 850s, I intend to convert order to a market order.
Last Friday, it just happened that limit order was not filled. However, the market order was not sent at all. Can someone help me to diagnose this issue? I attached the strategy property screen shot.

btw, if order is partially filled, limit order can always be replaced by a market order to fill in the rest of shares. But no good if limit order is completely unfilled.

thanks
Attachments
strategy multicharts.jpg
(107.38 KiB) Downloaded 413 times

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Re: why my limit orders can't be converted to market order?

Postby SUPER » 28 Jan 2013

Is for the first time you are having this issue, did it work in past?

May be you want test it under "Sync" auto trading option.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: why my limit orders can't be converted to market order?

Postby Henry MultiСharts » 28 Jan 2013

Hello stonebrook2011,

Unfilled Strategy Order Replacement timeout starts counting once the price level is hit but the order is not filled (because the order queue is too long and the order fails to be filled).
Is the limit price reached on ask/bid data series (Buy and BuyToCover orders are filled on ask prices, Sell and SellShort orders are filled on Bid prices)?

stonebrook2011
Posts: 11
Joined: 30 Dec 2011
Has thanked: 1 time

Re: why my limit orders can't be converted to market order?

Postby stonebrook2011 » 28 Jan 2013

I see, the symbol I am trading moves fast. So because it moves so fast that never touched my limit price in that bar, as a result timer was not triggered at all...

Any easy way to solve it? I am thinking a way to do it. I want to send a new market order to the next bar after limit order fails. Any suggestions on the following code?

Condition3 is the strategy exit condition

Code: Select all

Condition4 = CurrentBar > 1 and Condition3 and Condition3[1] = true and MarketPosition_at_Broker=1;

if condition4 then
sell ("Exit ASAP") next bar at market;
Should I use MarketPosition_at_Broker or Marketposition instead? Or I don't need it at all because if there is flat position at broker, the next "Sell" command would be voided automatically? I just don't want to mis-send a "shortsell" order.


Thanks a lot

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: why my limit orders can't be converted to market order?

Postby Henry MultiСharts » 29 Jan 2013

It depends on your trading setup.

Marketposition returns the strategy market position. It is individual for each chart.
MarketPosition_at_Broker indicates the number of contracts and the type of position at the broker for the symbol.


Return to “MultiCharts”