Stop-Limit order in Auto Trading

Questions about MultiCharts and user contributed studies.
ilt000
Posts: 52
Joined: 06 Apr 2010
Location: Italy
Has thanked: 6 times
Been thanked: 2 times

Stop-Limit order in Auto Trading

Postby ilt000 » 07 Apr 2011

Dear Support,

How can i use the stop-limit orders in auto-trading mode?

Thank you
Regards

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

Re: Stop-Limit order in Auto Trading

Postby Spaceant » 08 Apr 2011

I want to know too. Can't find the syntax in the manual...

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 300 times

Re: Stop-Limit order in Auto Trading

Postby Stan Bokov » 08 Apr 2011

The documentation is being updated, so it can be included in the release or earlier. Here is an excerpt from the What's New, which is posted in our blog - https://www.multicharts.com/traders-blog/?p=229

There is a new order type now in MultiCharts – StopLimit order. Currently all supported brokers except for FXCM, Dukascopy and PFGBEST will accept StopLimit orders. This order is a regular limit order which activates through a stop rule. In PowerLanguage you can specify the name of the entry you want to exit from. You specify a stop price and a limit price, once the price hits the stop price, the order will become a limit order with the specified price.


PowerLanguage examples:

PL code – Buy 14 shares next bar 10.4 stop 10.7 limit;
What it means – Enter a long position for 14 contracts in total, with the price of 10.7 or lower with the condition the price will be 10.4 and higher.

PL code - Sell 14 contracts total next bar 5.1 stop 5.0 limit;
What it means - Sell 14 contracts in total, with the price 5.0 or higher, with the condition that the price will become 5.1 or lower.

PL code – SellShort(“SE”) next bar Close stop Close + 2 point limit;
What it means – Enter a short position with a limit order called “SE” with the number of contracts specified by default (either in the settings or in the signal) with the price + 2 points and higher, with the condition that the price reaches Close or goes lower

PL code - BuyToCover from Entry(“SE”) next bar entryprice stop entryprice limit;
What it means - Cover the short entry "SE" with the price equal to "entryprice" or higher, on the condition that current price reaches entryprice or goes lower.

ilt000
Posts: 52
Joined: 06 Apr 2010
Location: Italy
Has thanked: 6 times
Been thanked: 2 times

Re: Stop-Limit order in Auto Trading

Postby ilt000 » 14 Apr 2011

Thank You Stan,

I've implemented this code that works properly with all the futures that i trade except for the ZB future:

" ... buy 1 contract on next bar at buyprice stop buyprice + 4 point limit; "

on the IB TWS the limit price is equal to the stop price and not of 4 point higher, as you can see in the attach file.

I also tried this other code, but i got always limit price=stop price:

"...buy 1 contract on next bar at buyprice stop buyprice + 4*onetick limit; "

where onetick is a input equal to the tick of the ZB (0.03125) and buyprice a variable.


Can you help me?
Thank You
Best
Attachments
ZB_StopLimit.jpg
ZB_StopLimit.jpg (95.09 KiB) Viewed 821 times

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 300 times

Re: Stop-Limit order in Auto Trading

Postby Stan Bokov » 14 Apr 2011

We checked on our machine, everything is working fine. Check Symbol Settings, if everything is ok there, please come to our Live Chat so we can investigate.

ilt000
Posts: 52
Joined: 06 Apr 2010
Location: Italy
Has thanked: 6 times
Been thanked: 2 times

Re: Stop-Limit order in Auto Trading

Postby ilt000 » 14 Apr 2011

Thank You Stan,

I've solved, in the symbol settings there was an incorrect value for the Min. Movement

Many thanks
Best


Return to “MultiCharts”