Page 1 of 1

Slippage

Posted: Jan 14 2015
by Kostefan
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;

Re: Slippage

Posted: Jan 14 2015
by Henry MultiŠ”harts
Hello Kostefan,

Please specify the particular difficulty you have.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
Hello Kostefan,

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

Re: Slippage

Posted: Jan 16 2015
by Kostefan
Hello Kostefan,

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

Re: Slippage

Posted: Jan 16 2015
by Kostefan
If the price goes below that limit order, too, it is rearranged. Add the function code. please

Re: Slippage

Posted: Jan 16 2015
by JoshM
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.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
Complete code .To limit order to follow the price.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
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.

Re: Slippage

Posted: Jan 16 2015
by JoshM
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.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
sellshort ( "MACrossSE" ) next bar market;

Issue. There is a large slippage.

Re: Slippage

Posted: Jan 16 2015
by JoshM
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.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
How to reduce slippage. Performance is not at the price signal is obtained.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
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)

Re: Slippage

Posted: Jan 16 2015
by JoshM
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.

Re: Slippage

Posted: Jan 16 2015
by JoshM
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.

Re: Slippage

Posted: Jan 16 2015
by Kostefan
I tried not suitable.