New Beta Compiling error

Questions about MultiCharts and user contributed studies.
Guest

New Beta Compiling error

Postby Guest » 19 Dec 2006

A few of my indicators will not compile in the new beta. I double checked to make sure they still compiled on the old version. I'm getting the following error.

Test-Assert code 23

Your help would be greatly appreciated. I would like to use the new version, however, I depend on these indicators. Thanks.

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 20 Dec 2006

Could you please give us that indicators so we can cinfirm the problem?

SP
Posts: 444
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Postby SP » 20 Dec 2006

Hi Stanley,

i have a similar problem with some codes, showing
"Assert code 44
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0"

This code produces the error

Vars: Swing(0);

Value1=Average(H,3);
Value2=Average(L,3);

If C<Value2[1] And C[1]>=Value2[2] then Swing=-1;
If C>Value1[1] And C[1]<=Value1[2] then Swing=1;

If Swing=1 Then buy next bar;
If Swing=-1 Then sell next bar ;


if i change the last line to

If Swing=-1 Then sellshort next bar ;

or even to

If Swing=-1 Then sell next bar at open;

it compiles witout an error.

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 20 Dec 2006

if i change the last line to

If Swing=-1 Then sellshort next bar ;

or even to

If Swing=-1 Then sell next bar at open;

it compiles witout an error.


The thing is that you must specify one of the five different order actions with your Sell order:

... this bar on close;
... next bar at open;
... next bar at market;
... next bar at yourprice Stop;
... next bar at yourprice Limit;

t123knight
Posts: 50
Joined: 11 Nov 2005
Contact:

Postby t123knight » 20 Dec 2006

Hey Stanley,

I emailed you a copy of the indicator code.

Thanks,

Trevor

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 20 Dec 2006

Hey Stanley,

I emailed you a copy of the indicator code.

Thanks,

Trevor


Trevor, I don't know why this code worked with the previous version but there is an error there (string 91). PrimeArray should have 2 parametres.

t123knight
Posts: 50
Joined: 11 Nov 2005
Contact:

Postby t123knight » 20 Dec 2006

that fixed it. Thanks Stanley.


Return to “MultiCharts”