Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator inputs corrupted
Collapse
X
-
We don't support dynamically adding different data series but I'm still happy to assist. Likely you will need to make the input and enum and cast it to PeriodType.
Again not supported but something like this should work:
Code:public enum TrendPeriodType { Minute = PeriodType.Minute, Day = PeriodType.Day, Week = PeriodType.Week, Month = PeriodType.Month, Year = PeriodType.Year } [Description("")] [GridCategory("Your category")] [Gui.Design.DisplayName("Period Type")] public TrendPeriodType STrendType { get { return sTrendType; } set { sTrendType = value; } }
Code:Add((PeriodType)STrendType, STrendValue);
LanceNinjaTrader Customer Service
-
Hi Lance,
Thanks for your quick reply. I'm not sure if what you've given me is different from what I already have.
The variables I have are
private PeriodType symbolbartype = PeriodType.Day; // Default setting for symbolname1
private int symbolinterval = 1; // Default setting for symbolname1
Then in Initialize I have
Add("$AUDCAD", symbolbartype, symbolinterval);
Then the inputs I have are
[Description("Symbol bar type")]
public PeriodType SymbolBarType
{
get { return symbolbartype; }
set { symbolbartype = value; }
}
[Description("Symbol bar interval")]
public int SymbolBarInterval
{
get { return symbolinterval; }
set { symbolinterval = value; }
}
What you're saying is that I should declare a separate enum (different from PeriodType) and then cast using PeriodType. So...
public enum TrendPeriodType
{
Minute = PeriodType.Minute,
Day = PeriodType.Day,
Week = PeriodType.Week,
Month = PeriodType.Month,
Year = PeriodType.Year
}
private TrendPeriodType symbolbartype = TrendPeriodType.Day; // Default setting for symbolname1
private int symbolinterval = 1; // Default setting for symbolname1
Add("$AUDCAD", (PeriodType)symbolbartype, symbolinterval);
[Description("Symbol bar type")]
public TrendPeriodType SymbolBarType
{
get { return symbolbartype; }
set { symbolbartype = value; }
}
[Description("Symbol bar interval")]
public int SymbolBarInterval
{
get { return symbolinterval; }
set { symbolinterval = value; }
}
Is there any fundamental difference between what I have and what you have? Specifically, do you think the differences in the code above would cause the issue I am seeing? This code is installed on hundreds of PCs and I don't understand how it is only causing a problem on two.
ThanksLast edited by bubblegum; 01-02-2014, 09:18 AM.
Comment
-
In terms of coding I don't see a difference, however in terms of values being properly serialized I see that using public PeriodType SymbolBarType may be causing issues.
Neither method is supported but trying the enum and then casting would be my first attempt to fix the issue.LanceNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
11 responses
39 views
0 likes
|
Last Post Today, 11:40 AM | ||
Started by FrazMann, Today, 11:21 AM
|
0 responses
5 views
0 likes
|
Last Post
by FrazMann
Today, 11:21 AM
|
||
Started by geddyisodin, Yesterday, 05:20 AM
|
8 responses
52 views
0 likes
|
Last Post Today, 10:45 AM | ||
Started by DayTradingDEMON, Today, 09:28 AM
|
4 responses
26 views
0 likes
|
Last Post Today, 10:47 AM | ||
Started by George21, Today, 10:07 AM
|
1 response
22 views
0 likes
|
Last Post Today, 10:43 AM |
Comment