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 GLFX005, Today, 03:23 AM
|
0 responses
1 view
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
13 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
3 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
Comment