PureBytes Links
Trading Reference Links
|
Hello,
The return type of GetAccountValue function is string.
http://www.amibroker.com/at/
You need to convert it to numer using StrToNum()
as described in the documentation.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "spi_maker" <jarea@xxxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, August 06, 2009 5:37 PM
Subject: [amibroker] StaticVarGet & Type Mismatch
> For these statements
>
> StaticVarSet("Trade_Amount", 10000);
> Available_Cash = ibc.GetAccountValue("CashBalance")
> if(StaticVarGet("Trade_Amount") > Available_Cash)
> {
> StaticVarSet("Trade_Amount", Available_Cash);
> }
> _TRACE("Trade_Amount " + StaticVarGet("Trade_Amount") + " Available_Cash " + Available_Cash);
>
> Trace Results
> Trade_Amount 10000.0 Available_Cash 123456.78
>
> Error 1: Operation not allowed. Operator/operand type mismatch.
> (Referring to if(StaticVarGet("Trade_Amount"
>
> I am curious why I am getting the type mismatch error and if there are any ideas for a workaround.
>
> Thanks in advance
>
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|