Slippage

Questions about MultiCharts and user contributed studies.
User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Slippage

Postby Kostefan » 14 Jan 2015

Hello. Change the code to warrant follow the price or how to avoid slippage.

Code: Select all

inputs: Price( Close ), Length( 5 ), ConfirmBars( 1 ) ;
variables: var0( 0 ) ;

condition1 = Price < AverageFC( Price, Length ) ;
if condition1 then
var0 = var0 + 1
else
var0 = 0 ;

condition1 = CurrentBar > ConfirmBars and var0 = ConfirmBars ;
if condition1 then
sellshort ( "MACrossSE" ) next bar at Price limit;
Attachments
test.txt
(354 Bytes) Downloaded 446 times

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

Re: Slippage

Postby Henry MultiСharts » 14 Jan 2015

Hello Kostefan,

Please specify the particular difficulty you have.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

Hello Kostefan,

Please specify the particular difficulty you have.
When placing an order slip and no test.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

Hello Kostefan,

Please specify the particular difficulty you have.
how to add code to limit the price moved

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

If the price goes below that limit order, too, it is rearranged. Add the function code. please

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Slippage

Postby JoshM » 16 Jan 2015

When placing an order slip and no test.
I don't follow. What does 'no test' mean? You want to execute orders unconditionally (i.e., without an if statement to test a certain condition)?
how to add code to limit the price moved
I suppose you're saying here "adding code to the limit order once the price moved". What does 'adding code' mean in this context? For what purpose do you want to add more code?
If the price goes below that limit order, too, it is rearranged. Add the function code. please
I think we're having some Google Translate difficulties. :) What do you mean with rearranging the prices?

And why do you want to use a function? Functions can't submit orders, after all.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

Complete code .To limit order to follow the price.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

sellshort ( "MACrossSE" ) next bar at Price limit;

Issue. Price left and limit remained unfulfilled.
How to add a limit order to move to the new price.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Slippage

Postby JoshM » 16 Jan 2015

Complete code .To limit order to follow the price.
A limit order that follows the price = a trailing stop-limit order? For a basic example of that, see stop-limit orders.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

sellshort ( "MACrossSE" ) next bar market;

Issue. There is a large slippage.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Slippage

Postby JoshM » 16 Jan 2015

sellshort ( "MACrossSE" ) next bar market;

Issue. There is a large slippage.
Slippage (definition) is outside of MultiCharts' control. Instead of market orders, you can use limit orders, although this will increase the chance that your position isn't (fully) closed when you want it to.

Alternatively, more liquid instruments will have, generally speaking, less slippage so the transaction costs for market orders will be less.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

How to reduce slippage. Performance is not at the price signal is obtained.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

sellshort ( "MACrossSE" ) next bar market;

Issue. There is a large slippage.
Slippage (definition) is outside of MultiCharts' control. Instead of market orders, you can use limit orders, although this will increase the chance that your position isn't (fully) closed when you want it to.

Alternatively, more liquid instruments will have, generally speaking, less slippage so the transaction costs for market orders will be less.
That is why I want to move the price limit (follow)

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Slippage

Postby JoshM » 16 Jan 2015

How to reduce slippage. Performance is not at the price signal is obtained.
Alternatively, more liquid instruments will have, generally speaking, less slippage so the transaction costs for market orders will be less.
Slippage will also be less (relatively to P&L) when you increase your holding period.

A good data feed that is updated tick-by-tick (like IQFeed or Rithmic) can also help, but that only applies when your current data feed is IB (which provides snapshots instead of 'real' real-time data).

There's probably a lot more you can do, but to which extend slippage can be reduced also depends on your strategy's time frame and goals.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Slippage

Postby JoshM » 16 Jan 2015

sellshort ( "MACrossSE" ) next bar market;

Issue. There is a large slippage.
Slippage (definition) is outside of MultiCharts' control. Instead of market orders, you can use limit orders, although this will increase the chance that your position isn't (fully) closed when you want it to.

Alternatively, more liquid instruments will have, generally speaking, less slippage so the transaction costs for market orders will be less.
That is why I want to move the price limit (follow)
I don't think we'll get anywhere if you don't reply to what already has been said/asked:
Complete code .To limit order to follow the price.
A limit order that follows the price = a trailing stop-limit order? For a basic example of that, see stop-limit orders.

User avatar
Kostefan
Posts: 11
Joined: 09 Jan 2015

Re: Slippage

Postby Kostefan » 16 Jan 2015

I tried not suitable.


Return to “MultiCharts”