STILL HAS THE BUG IN MC 5.0 BETA 3

Questions about MultiCharts and user contributed studies.
ppan
Posts: 106
Joined: 31 Jan 2007
Has thanked: 2 times

STILL HAS THE BUG IN MC 5.0 BETA 3

Postby ppan » 24 Feb 2009

Try the following code in a 1 minute chart. Turn on the Position Limits:
Signal -> Properties -> Select the "Allow up to 10 entry orders" and Select the "regardless of the entry that generated the order".

The S5 will exit 2 contracts. Is it a bug?:
----------------------------------------------------------------------------
var: _counter(0) ;
VARS: COUNTER2(0);

SETEXITONCLOSE;

IF DATE <> DATE[1] THEN BEGIN
FOR COUNTER2 = 1 TO 2 BEGIN
BUY ("B1") 5 CONTRACTS NEXT BAR AT MARKET;
END;
_counter = 0 ;
END;

IF DATE = DATE[1] and _counter = 1 THEN
SELL("S1") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 2 THEN
SELL("S2") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 3 THEN
SELL("S3") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 4 THEN
SELL("S4") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 5 THEN
SELL("S5") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 6 THEN
SELL("S6") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 7 THEN
SELL("S7") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 8 THEN
SELL("S8") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 9 THEN
SELL("S9") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
IF DATE = DATE[1] and _counter = 10 THEN
SELL("S10") 1 CONTRACT entry("B1") NEXT BAR AT MARKET;
if ( barstatus = 2 ) then _counter += 1 ;
----------------------------------------------------------------------------

The above code is from my previous post:
http://forum.tssupport.com/viewtopic.ph ... highlight=

ppan
Posts: 106
Joined: 31 Jan 2007
Has thanked: 2 times

Postby ppan » 02 Mar 2009

The bug still exist in beta 4.

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 03 Mar 2009

Please make sure support is aware of it.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 16 Mar 2009

The bug has been confirmed and will be fixed in Beta 5.


Return to “MultiCharts”