![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2007
Location: , ,
Posts: 180
Thanks: 0
Thanked 1 time in 1 post
|
Hi,
I'm trying to store the value of Bars.Period.Id in a variable. When I print it I get MInute, Tick, or whatever the current value is, but I can't store it. for example: Type = Bars.Period.Id (Type is a string varible) or Tppe = (string)Bars.Period.Id I get "Cannot convert type 'NInja Trader.Data.PeriodType" to 'string' ANy thoughts? |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Use the .ToString() method.
Type = Bars.Period.Id.ToString()
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2007
Location: , ,
Posts: 180
Thanks: 0
Thanked 1 time in 1 post
|
Thanks Josh.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bars are wrong on strategy performance (negative bars) | woodside | Historical NinjaTrader 6.5 Beta Threads | 2 | 01-13-2008 10:22 PM |
| Period 14 crossing Period Linear Regression 25 | Viper3 | Strategy Development | 8 | 10-21-2007 10:51 AM |
| Add second symbol of same PeriodType, Period | Folls | Strategy Development | 2 | 10-11-2007 05:59 PM |
| Momentum bars or Price Range Bars | Akros | Indicator Development | 7 | 06-10-2007 04:55 AM |
| Trial Period Activation | Ripcat | Installation and Licensing | 3 | 11-10-2005 05:35 AM |