![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2007
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
What's wrong with this code? It generates the error:
Cannot convert method group 'ToString' to non-delegate type 'string'. Did you intend to invoke the method? Code: string Str1, Str2; Str1=Position.MarketPosition.ToString; Str2=Position.Quantity.ToString; Print(Str1); Print(Str2); |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
ToString() is a method not a property. Should read:
Str1=Position.MarketPosition.ToString(); Str2=Position.Quantity.ToString();
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2007
Location: , ,
Posts: 26
Thanks: 0
Thanked 0 times in 0 posts
|
Obvious...
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Indicator convert from decimal to 32nds | Json | Indicator Development | 5 | 03-08-2007 01:45 AM |
| How To Convert Simulator to Live | longtex | Installation and Licensing | 7 | 05-31-2006 03:55 AM |
| Unknown OIF file type. | Zardoz | Automated Trading | 3 | 04-17-2006 05:34 AM |
| Problem with 'Parameter Type' set to Price | codeye | Miscellaneous Support | 5 | 12-09-2005 07:06 AM |
| Group Accounts | jrn317 | Miscellaneous Support | 3 | 05-03-2005 06:41 AM |