What the difference between buy and buy to cover?

Questions about MultiCharts and user contributed studies.
maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

What the difference between buy and buy to cover?

Postby maisatomai » 17 Nov 2014

Let say you have a short position of 5 and will there be a difference between

1) "buy to cover 10 contracts at next bar"
2) "buy 10 contracts at next bar"

User avatar
virginiatrader
Posts: 79
Joined: 05 May 2007
Location: Virginia
Has thanked: 5 times
Been thanked: 5 times

Re: What the difference between buy and buy to cover?

Postby virginiatrader » 17 Nov 2014

maisatomai:

If you are speaking about the order keywords that can be coded and executed in MC, to "buy" is to initiate a new LONG position, i.e., to go long a security or contract.

"buytocover" is also an order keyword that can be coded and executed in MC, and will result in closing or offsetting a open SHORT position, so that your account is flat for that security or contract.

In MC, you "buy" and "sell" your longs, and "sellshort" and "buytocover" your shorts.

Good trading!

virginiatrader

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: What the difference between buy and buy to cover?

Postby MAtricks » 17 Nov 2014

Let say you have a short position of 5 and will there be a difference between
1) "buy to cover 10 contracts at next bar"
5 contracts are bought to close out short position. Result: flat
2) "buy 10 contracts at next bar"
5 contracts are bought to close out short position. 10 contracts are also bought to go long. Result: 10 contracts long

maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

Re: What the difference between buy and buy to cover?

Postby maisatomai » 17 Nov 2014

Thanks for the replies.

1) So if you are short 11 and you have a code

Code: Select all

buy to cover next bar at market (note no contract size is input)
,

will you get a flat position?


2) if you are already long 3 and you have a code

Code: Select all

buy 5 contracts next bar at market
,

will you get position of +5 or +8?

Actually I want to trade a strategy that need these and that is why I am asking.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: What the difference between buy and buy to cover?

Postby MAtricks » 17 Nov 2014

Code: Select all

Buytocover this bar
Will flatten your entire short position

Code: Select all

Sell this bar
Will flatten your entire long position

However, if your Buytocover or Sell lines specify LESS contracts than your position, they will only fill that specified amount. If you specify MORE contracts than your position, they will flatten your position with no residual.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: What the difference between buy and buy to cover?

Postby MAtricks » 17 Nov 2014

I'd suggest writing out some test execution code to ensure you understand this process. This will get you started:

Code: Select all

//Buy and SellShort are ENTRY commands
//Buytocover and Sell are EXIT commands


if MP[5]{[5] for example}<=0 then
Buy 10 contracts this bar ;
if MP[5]{[5] for example}>=0 then
Sellshort 10 contracts this bar ;

if MP<=0 then
Buytocover 2 contracts this bar ;
if MP>=0 then
Sell 2 contracts this bar ;
Image
Attachments
2014-11-17_20-10-04.gif
(18.08 KiB) Downloaded 936 times



Return to “MultiCharts”