Limit position to a single contract  [SOLVED]

Questions about MultiCharts and user contributed studies.
DaveAronow
Posts: 72
Joined: 20 Apr 2014
Has thanked: 9 times
Been thanked: 8 times

Limit position to a single contract

Postby DaveAronow » 07 Mar 2016

My autotrading system is somehow trading two contracts when reversing from long to short. In Strategy Properties I have the option Maximum Shares/Contracts per position set to 1, yet it opens a long position with 1 share, then reverses but for the short position sells 2 contracts.

So it buys + 1 to go long. Then sells -1 to go flat, and instead of another -1 to go short, it sells -2.

The reversal code looks like this:

Code: Select all

Sell Next Bar At SellStopPrice Stop;
Sell Short Next Bar at SellStopPrice Stop;
This same system works fine in TS without trading a second contract. What setting am I missing?

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

Re: Limit position to a single contract

Postby TJ » 07 Mar 2016

My autotrading system is somehow trading two contracts when reversing from long to short. In Strategy Properties I have the option Maximum Shares/Contracts per position set to 1, yet it opens a long position with 1 share, then reverses but for the short position sells 2 contracts.

So it buys + 1 to go long. Then sells -1 to go flat, and instead of another -1 to go short, it sells -2.

The reversal code looks like this:

Code: Select all

Sell Next Bar At SellStopPrice Stop;
Sell Short Next Bar at SellStopPrice Stop;
This same system works fine in TS without trading a second contract. What setting am I missing?

See this thread
viewtopic.php?f=1&t=49415

DaveAronow
Posts: 72
Joined: 20 Apr 2014
Has thanked: 9 times
Been thanked: 8 times

Re: Limit position to a single contract  [SOLVED]

Postby DaveAronow » 07 Mar 2016

Ugh guess I should RTFM. Thanks TJ!


Return to “MultiCharts”