How to code for a Stop Limit Order

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

How to code for a Stop Limit Order

Postby arjfca » 24 Jan 2011

Hello

I just read in IB document that we can send a Stop Limit Order

If I understand well:
The stop will triggerd the lookout for the limit Price. This way, i could limit my slippage

If my understanding is ok, how do I code that?

Martin

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

Re: How to code for a Stop Limit Order

Postby TJ » 24 Jan 2011

Hello

I just read in IB document that we can send a Stop Limit Order

If I understand well:
The stop will triggerd the lookout for the limit Price. This way, i could limit my slippage

If my understanding is ok, how do I code that?

Martin
Stop Limit orders will be supported in MultiCharts 7


a syntax example:

Code: Select all

Buy 14 shares next bar 10.4 stop 10.7 limit;

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: How to code for a Stop Limit Order

Postby arjfca » 24 Jan 2011

Thank you TJ

Any hint when is expected the new version?

Martin

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: How to code for a Stop Limit Order

Postby Dave Masalov » 25 Jan 2011

Dear Martin,

Currently we are testing Pre-Alpha version of MC 7. Public Beta should be available soon. However, there is no ETA at the moment.

Rommi
Posts: 9
Joined: 15 Sep 2010

Re: How to code for a Stop Limit Order

Postby Rommi » 26 Jan 2011

Hello

I just read in IB document that we can send a Stop Limit Order

If I understand well:
The stop will triggerd the lookout for the limit Price. This way, i could limit my slippage

If my understanding is ok, how do I code that?

Martin
Why You dont use trigger for set limit order?

Code: Select all

[intrabarordergeneration = true]
Vars:Trigger(0),Orderprice(0),
intrabarpersist Myclose(0);
Myclose=close;
Trigger = ......;
Orderprice = ......;

if Myclose crosses above/below trigger then
buy next bar Orderprice limit;
Maybe that works.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: How to code for a Stop Limit Order

Postby arjfca » 26 Jan 2011

Why You dont use trigger for set limit order?

Code: Select all

[intrabarordergeneration = true]
Vars:Trigger(0),Orderprice(0),
intrabarpersist Myclose(0);
Myclose=close;
Trigger = ......;
Orderprice = ......;

if Myclose crosses above/below trigger then
buy next bar Orderprice limit;
Thank Rommi
I will see if i could use this way.

For sure, i want my entry and stops to reside on IB server. Trading targets as to be on broker site even after MC as been shut down.

As stated, version 7 should take care of this type of Stop / Limit entry situation

Martin


Return to “MultiCharts”