﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RightEdge Forums / Trading / Technical Indicators  / SeriesCalculatorBaseSimple sample (Absolute value example) / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>RightEdge Forums</description><link>http://www.rightedgesystems.com/forums/</link><webMaster>rightedge@yyesoftware.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 15:47:30 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>OK got it. Built my indicator and all working nicely. I used the IndicatorMath functions which made things pretty straight forward.</description><pubDate>Tue, 13 Nov 2007 03:00:33 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>[quote][b]BigBerner (11/12/2007)[/b][hr][quote][b]dplaisted (11/12/2007)[/b][hr]If you want to actually use one indicator inside another, see the SampleAverageAverage2.cs example attached to this &lt;A href="http://www.rightedgesystems.com/forums/FindPost2498.aspx"&gt;creating indicators post&lt;/A&gt;.  Let us know if you have questions.&lt;P&gt;Thanks,&lt;BR&gt;Daniel[/quote]&lt;P&gt;The SampleAverageAverage2.cs link seems to just take you back to the forum home page.[/quote]&lt;P&gt;You may have tried this before being logged in.  You must be logged in to download attachments.  That should be handled better.</description><pubDate>Mon, 12 Nov 2007 18:24:26 GMT</pubDate><dc:creator>young</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>The EMA is calculated using the previous value's EMA.  The code looks like this:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;   double percent = (2.0 / (double)((double)periods + 1.0));&lt;BR&gt;   double todaysMA = presentValue * percent;&lt;BR&gt;   double yesterdaysMA = previousValue;&lt;/P&gt;&lt;P&gt;   return (todaysMA + (yesterdaysMA * (1 - percent)));&lt;BR&gt;&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;If there is no previous EMA, you should start with an SMA.  See the &lt;A href="http://www.rightedgesystems.com/documentation/developerguide/html/T_RightEdge_Indicators_EMA.htm"&gt;EMA indicator remarks section&lt;/A&gt; in the documentation for a good description.&lt;/P&gt;&lt;P&gt;If you want to override the existing EMA indicator, I would derive from EMA.  It is based on SeriesCalculatorBaseWithValues so you can override CalcNewValue and Reset.&lt;/P&gt;&lt;P&gt;You can also contain an instance of the EMA indicator in your own class and simply manipulate the values returned from that.  If you want to give me more details on what you're trying to accomplish, I can go into it deeper.&lt;/P&gt;&lt;P&gt;[quote][b]BigBerner (11/12/2007)[/b][hr][quote][b]billb (11/12/2007)[/b][hr]There is a function in &lt;A href="http://www.rightedgesystems.com/documentation/developerguide/html/AllMembers_T_RightEdge_Indicators_IndicatorMath.htm"&gt;IndicatorMath&lt;/A&gt; to help with this.  You can calculate EMA that's not tied to BarData.&lt;/P&gt;&lt;P&gt;[quote][b]BigBerner (11/12/2007)[/b][hr]I would like to write an indicator plugin that calculates an exponential moving average of a value.  I would like to do this by using the EMA class that already exists. How would I do this?&lt;/P&gt;&lt;P&gt;Thanks[/quote][/quote]&lt;P&gt;Could you explain how to use the IndicatorMath.EMAValue method. I am not sure what "presentvalue" and "previousvalue" refer to. Let's say I wanted to calculate the EMA of today's close - yesterday's close, how would I do this?&lt;P&gt;Thanks.[/quote]</description><pubDate>Mon, 12 Nov 2007 17:10:18 GMT</pubDate><dc:creator>billb</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>[quote][b]billb (11/12/2007)[/b][hr]There is a function in &lt;A href="http://www.rightedgesystems.com/documentation/developerguide/html/AllMembers_T_RightEdge_Indicators_IndicatorMath.htm"&gt;IndicatorMath&lt;/A&gt; to help with this.  You can calculate EMA that's not tied to BarData.&lt;P&gt;[quote][b]BigBerner (11/12/2007)[/b][hr]I would like to write an indicator plugin that calculates an exponential moving average of a value.  I would like to do this by using the EMA class that already exists. How would I do this?&lt;/P&gt;&lt;P&gt;Thanks[/quote][/quote]&lt;P&gt;Could you explain how to use the IndicatorMath.EMAValue method. I am not sure what "presentvalue" and "previousvalue" refer to. Let's say I wanted to calculate the EMA of today's close - yesterday's close, how would I do this?&lt;P&gt;Thanks.</description><pubDate>Mon, 12 Nov 2007 16:51:07 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>Try &lt;A href="http://www.rightedgesystems.com/forums/Topic128-10-3.aspx"&gt;http://www.rightedgesystems.com/forums/Topic128-10-3.aspx&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Daniel</description><pubDate>Mon, 12 Nov 2007 15:39:28 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>[quote][b]dplaisted (11/12/2007)[/b][hr]If you want to actually use one indicator inside another, see the SampleAverageAverage2.cs example attached to this &lt;A href="http://www.rightedgesystems.com/forums/FindPost2498.aspx"&gt;creating indicators post&lt;/A&gt;.  Let us know if you have questions.&lt;P&gt;Thanks,&lt;BR&gt;Daniel[/quote]&lt;P&gt;The SampleAverageAverage2.cs link seems to just take you back to the forum home page.</description><pubDate>Mon, 12 Nov 2007 15:37:35 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>If you want to actually use one indicator inside another, see the SampleAverageAverage2.cs example attached to this &lt;A href="http://www.rightedgesystems.com/forums/FindPost2498.aspx"&gt;creating indicators post&lt;/A&gt;.  Let us know if you have questions.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Daniel</description><pubDate>Mon, 12 Nov 2007 09:20:29 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>There is a function in &lt;A href="http://www.rightedgesystems.com/documentation/developerguide/html/AllMembers_T_RightEdge_Indicators_IndicatorMath.htm"&gt;IndicatorMath&lt;/A&gt; to help with this.  You can calculate EMA that's not tied to BarData.&lt;/P&gt;&lt;P&gt;[quote][b]BigBerner (11/12/2007)[/b][hr]I would like to write an indicator plugin that calculates an exponential moving average of a value.  I would like to do this by using the EMA class that already exists. How would I do this?&lt;/P&gt;&lt;P&gt;Thanks[/quote]</description><pubDate>Mon, 12 Nov 2007 08:19:26 GMT</pubDate><dc:creator>billb</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>I would like to write an indicator plugin that calculates an exponential moving average of a value.  I would like to do this by using the EMA class that already exists. How would I do this?&lt;/P&gt;&lt;P&gt;Thanks</description><pubDate>Mon, 12 Nov 2007 02:46:54 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>RE: SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>Thanks! Most informative and helpful.</description><pubDate>Wed, 05 Sep 2007 06:25:53 GMT</pubDate><dc:creator>phg</dc:creator></item><item><title>SeriesCalculatorBaseSimple sample (Absolute value example)</title><link>http://www.rightedgesystems.com/forums/Topic3484-10-1.aspx</link><description>Hello,&lt;P&gt;I have decided that over the next few days I am going to post some example code of indicators.  There are three different base classes that can be used to write an indicator and I am going to also try to explain when to use each type and why.  First:&lt;/P&gt;&lt;P&gt;SeriesCalculatorBaseSimple - Indicators of this sort are useful when you do not need to look backwards into the series.  For example, if you were going to create a indicator that simple doubled the value of every input it would not ever need to look at previous values, just muliply the current value by two.  For this example I have choosen an 'Absolute Value' indicator.   Now the code.&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System.Collections.Generic;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System.Text;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; RightEdge.Common;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;namespace&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; Indicators&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;  [&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;YYEIndicatorAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;(System.Drawing.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;KnownColor&lt;/FONT&gt;&lt;FONT size=2&gt;.Black,&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;  YYEIndicatorAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EIndicatorGroup&lt;/FONT&gt;&lt;FONT size=2&gt;.Other,&lt;/P&gt;&lt;P&gt;  Name = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Absolute Value"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  Description = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Returns the absolute value of the input."&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  Id = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"uniqueid-0000000"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  HelpText = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;/P&gt;&lt;P&gt;  [&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Serializable&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/P&gt;&lt;P&gt;  [&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SeriesInputAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Input"&lt;/FONT&gt;&lt;FONT size=2&gt;, 1)]&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;  public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;AbsoluteValue&lt;/FONT&gt;&lt;FONT size=2&gt; : &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SeriesCalculatorBaseSimple&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;  {&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Constructs an Absolute Value indicator instance.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;    public&lt;/FONT&gt;&lt;FONT size=2&gt; AbsoluteValue()&lt;/P&gt;&lt;P&gt;    : &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;base&lt;/FONT&gt;&lt;FONT size=2&gt;(1)&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Returns a series value at the specified index.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="index"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;The index to retrieve series value.&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;    ///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;returns&amp;gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;A double containing the calculated value.&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/returns&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;    public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;[&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; index]&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;      { &lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;        return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Math&lt;/FONT&gt;&lt;FONT size=2&gt;.Abs(inputs[0][index]);&lt;/P&gt;&lt;P&gt;      }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;[/code]&lt;P&gt;Now the runthrough of what everything here does.&lt;P&gt;&lt;P&gt;  [&lt;FONT color=#2b91af size=2&gt;YYEIndicatorAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;(System.Drawing.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;KnownColor&lt;/FONT&gt;&lt;FONT size=2&gt;.Black,&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;  YYEIndicatorAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EIndicatorGroup&lt;/FONT&gt;&lt;FONT size=2&gt;.Other,&lt;/P&gt;&lt;P&gt;  Name = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Absolute Value"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  Description = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Returns the absolute value of the input."&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  Id = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"uniqueid-0000000"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;  HelpText = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"&lt;/FONT&gt;&lt;FONT size=2&gt;)]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This attribute contains a number of parameters that help the UI of rightedge know how to present your indicator.&lt;/P&gt;&lt;P&gt;The first paramter is the default drawing color of your indicator. The second is the group, which is used to place your indicator into our treeview of indicators.  Next is the name that is shown in the treeview.  The description is shown on the indicator information page.  Next is a unique id for your indicator.  Suggest you use your company name and then a unique number here.  Internally we use GUIDS for this.  Next is the friendly helptext for the indicator.  Usually good to have a description of what the indicator does, how it does it and when it might be useful.&lt;P&gt;[&lt;FONT color=#2b91af size=2&gt;Serializable&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/FONT&gt;&lt;P&gt;Every indicator needs this attribute.  Don't forget it.&lt;P&gt;[&lt;FONT color=#2b91af size=2&gt;SeriesInputAttribute&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Input"&lt;/FONT&gt;&lt;FONT size=2&gt;, 1)]&lt;/FONT&gt;&lt;P&gt;This attribute lets RE know how many inputs are required for this indicator to work.  In our case we accept one since we're just doing an absolute value on the members of a single series.  If we needed two (or more) we would just specify the number here.&lt;P&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;AbsoluteValue&lt;/FONT&gt;&lt;FONT size=2&gt; : &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SeriesCalculatorBaseSimple&lt;/FONT&gt;&lt;P&gt;We are deriving from SeriesCalulatorBaseSimplere here.&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;    public&lt;/FONT&gt;&lt;FONT size=2&gt; AbsoluteValue()&lt;/P&gt;&lt;P&gt;    : &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;base&lt;/FONT&gt;&lt;FONT size=2&gt;(1)&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;Our constructor does not do anything but call the base constructor, passing in the number of series (one, in this case).&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;    public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;override&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;[&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; index]&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;      { &lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;        return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Math&lt;/FONT&gt;&lt;FONT size=2&gt;.Abs(inputs[0][index]);&lt;/P&gt;&lt;P&gt;      }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;Overide the indexer for this class, returning the absolute value of the index of the first series.&lt;/P&gt;&lt;P&gt;That's about it for a simple indicator.  Any questions, please ask.  We'd really like to see folks creating indicators and getting up to speed with this.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Tue, 04 Sep 2007 11:12:14 GMT</pubDate><dc:creator>young</dc:creator></item></channel></rss>
