To add reference to another indicator please use the below method.
When using the default parameter
Code: Select all
public T AddIndicator<T>()
Code: Select all
public T AddIndicator<T>(ISeries<double> input)
Code: Select all
public T AddIndicator<T>(object[] args)
Code: Select all
public T AddIndicator<T>(ISeries<double> input, object[] args)
Code: Select all
Values[0][0] = AddIndicator<SMA>(new object[] { 14 })[0];
Code: Select all
Values[0][0] = AddIndicator<MacD>(new object[]{ 14, 26, 9 }).Avg[0];
[Input Attribute]
A user code (which can be an Indicator or a BarType etc) can have one or more Properties. ArthaChitra, uses these user defined properties internally for various tasks, from comparing two objects or simply to append the display name.
Whether the properties be included or excluded from such evaluation depends if the coder assigns the Input Attribute to that property.
For example if the user has two properties, as below:
Code: Select all
private Pen pen;
[XmlIgnore]
public Pen Pen
{
get { return pen; }
set
{
pen = value;
if (pen.CanFreeze)
{
pen.Freeze();
}
}
}
private double period;
[Input]
public double Period
{
get { return period; }
set
{
period = value;
NotifyPropertyChanged("Period");
}
}
Xaml naming conventions
The below user defined Xaml template must have the following suffix:
Xaml Template = Suffix
For example if you name your market watch template as MyMW, then the Xaml template will have the key as MyMWMarketWatchAlert = Alert
Market Watch = MarketWatch
Time N Sales = TimeNSales
Code: Select all
<DataTemplate x:Key="MyMWMarketWatch">
<!-- design your template here -->
</DataTemplate>
<Class name><Script Type>
For example if you have an Indicator, called HolyGrail, and you have a corresponding Xaml template for it, then the template will be named as HolyGrailIndicatorBar Type = <class name>BarType
Chart Style = <class name>ChartStyle
Indicator = <class name>Indicator
Code: Select all
<DataTemplate x:Key="HolyGrailIndicator">
<!-- design your template here -->
</DataTemplate>