SourceForge: humaitrader/humaitrader: changeset 190:147493e1e731
Do not need to explcit import Plot object in indicators now
authorCaoyuan Deng <dcaoyuan@gmail.com>
Fri Nov 06 01:44:53 2009 +0800 (2 weeks ago)
changeset 190147493e1e731
parent 1897268d633436d
child 1913abd0668b98b
Do not need to explcit import Plot object in indicators now
modules/lib.indicator/src/org/aiotrade/lib/indicator/AbstractIndicator.scala
modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/Computable.scala
modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/ContComputable.scala
modules/lib.securities/src/org/aiotrade/lib/securities/Ticker.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ARBRIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BIASIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BOLLIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/CCIIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/DMIIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/EMAIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/GMMAIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/HVDIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/KDIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MACDIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MAIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MFIIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MTMIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/OBVIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ROCIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/RSIIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/SARIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/WMSIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGFAIndicator.scala
modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGIndicator.scala
     1.1 --- a/modules/lib.indicator/src/org/aiotrade/lib/indicator/AbstractIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     1.2 +++ b/modules/lib.indicator/src/org/aiotrade/lib/indicator/AbstractIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     1.3 @@ -155,7 +155,7 @@
     1.4  
     1.5  abstract class AbstractIndicator(baseSer: TSer) extends DefaultTSer with Indicator {
     1.6    import AbstractIndicator._
     1.7 -    
     1.8 +
     1.9    /**
    1.10     * !NOTICE
    1.11     * computableHelper should be created here, because it will be used to
     2.1 --- a/modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/Computable.scala	Thu Nov 05 16:58:37 2009 +0800
     2.2 +++ b/modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/Computable.scala	Fri Nov 06 01:44:53 2009 +0800
     2.3 @@ -30,8 +30,8 @@
     2.4   */
     2.5  package org.aiotrade.lib.math.timeseries.computable
     2.6  
     2.7 +import java.text.DecimalFormat
     2.8  import org.aiotrade.lib.util.collection.ArrayList
     2.9 -import java.text.DecimalFormat
    2.10  import org.aiotrade.lib.math.timeseries.TSer
    2.11  import scala.actors.Actor._
    2.12  
    2.13 @@ -40,8 +40,11 @@
    2.14   * @author Caoyuan Deng
    2.15   */
    2.16  case class ComputeFrom(time: Long)
    2.17 +
    2.18  trait Computable {
    2.19  
    2.20 +  val Plot = org.aiotrade.lib.math.timeseries.plottable.Plot
    2.21 +
    2.22    // ----- actor's implementation
    2.23    val computableActor = actor {
    2.24      loop {
     3.1 --- a/modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/ContComputable.scala	Thu Nov 05 16:58:37 2009 +0800
     3.2 +++ b/modules/lib.math/src/org/aiotrade/lib/math/timeseries/computable/ContComputable.scala	Fri Nov 06 01:44:53 2009 +0800
     3.3 @@ -35,5 +35,4 @@
     3.4   * @author Caoyuan Deng
     3.5   */
     3.6  trait ContComputable extends Computable {
     3.7 -
     3.8  }
     4.1 --- a/modules/lib.securities/src/org/aiotrade/lib/securities/Ticker.scala	Thu Nov 05 16:58:37 2009 +0800
     4.2 +++ b/modules/lib.securities/src/org/aiotrade/lib/securities/Ticker.scala	Fri Nov 06 01:44:53 2009 +0800
     4.3 @@ -184,7 +184,7 @@
     4.4      if (values(PREV_CLOSE) == 0) 0f  else (values(LAST_PRICE) - values(PREV_CLOSE)) / values(PREV_CLOSE) * 100f
     4.5    }
     4.6  
     4.7 -  def compareLastCloseTo(prevTicker: Ticker ) : Int = {
     4.8 +  def compareLastCloseTo(prevTicker: Ticker) : Int = {
     4.9      if (values(LAST_PRICE) > prevTicker.values(LAST_PRICE)) 1
    4.10      else {
    4.11        if (values(LAST_PRICE) == prevTicker.values(LAST_PRICE)) 0 else 1
     5.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ARBRIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     5.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ARBRIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     5.3 @@ -28,9 +28,8 @@
     5.4   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
     5.5   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     5.6   */
     5.7 -package org.aiotrade.platform.modules.indicator.basic;
     5.8 +package org.aiotrade.platform.modules.indicator.basic
     5.9  
    5.10 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    5.11  import org.aiotrade.lib.indicator.ContIndicator
    5.12  
    5.13  /**
    5.14 @@ -52,9 +51,10 @@
    5.15    val br = TVar[Float]("BR", Plot.Line)
    5.16      
    5.17      
    5.18 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    5.19 +  protected def computeCont(begIdx: Int, size: Int) {
    5.20      var i = begIdx
    5.21      while (i < size) {
    5.22 +      
    5.23        up(i) = H(i) - O(i)
    5.24        val up_sum_i = sum(i, up, period)
    5.25              
     6.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BIASIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     6.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BIASIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     6.3 @@ -30,7 +30,6 @@
     6.4   */
     6.5  package org.aiotrade.platform.modules.indicator.basic
     6.6  
     6.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
     6.8  import org.aiotrade.lib.indicator.ContIndicator
     6.9  
    6.10  /**
    6.11 @@ -49,7 +48,7 @@
    6.12    val bias2 = TVar[Float]("BIAS2", Plot.Line)
    6.13    val bias3 = TVar[Float]("BIAS3", Plot.Line)
    6.14      
    6.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    6.16 +  protected def computeCont(begIdx: Int, size: Int) {
    6.17      var i = begIdx
    6.18      while (i < size) {
    6.19              
     7.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BOLLIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     7.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/BOLLIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     7.3 @@ -30,7 +30,6 @@
     7.4   */
     7.5  package org.aiotrade.platform.modules.indicator.basic
     7.6  
     7.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
     7.8  import org.aiotrade.lib.indicator.ContIndicator
     7.9  
    7.10  /**
    7.11 @@ -53,14 +52,16 @@
    7.12    val boll_u2 = TVar[Float]("UPPER", Plot.Line)
    7.13    val boll_l2 = TVar[Float]("LOWER", Plot.Line)
    7.14      
    7.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    7.16 +  protected def computeCont(begIdx: Int, size: Int) {
    7.17      var i = begIdx
    7.18      while (i < size) {
    7.19 +
    7.20        boll_m (i) = bollMiddle(i, C, period, alpha1)
    7.21        boll_u1(i) = bollUpper (i, C, period, alpha1)
    7.22        boll_l1(i) = bollLower (i, C, period, alpha1)
    7.23        boll_u2(i) = bollUpper (i, C, period, alpha2)
    7.24        boll_l2(i) = bollLower (i, C, period, alpha2)
    7.25 +
    7.26        i += 1
    7.27      }
    7.28    }
     8.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/CCIIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     8.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/CCIIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     8.3 @@ -30,7 +30,6 @@
     8.4   */
     8.5  package org.aiotrade.platform.modules.indicator.basic
     8.6  
     8.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
     8.8  import org.aiotrade.lib.indicator.ContIndicator
     8.9  
    8.10  /**
    8.11 @@ -49,11 +48,13 @@
    8.12    val cci    = TVar[Float]("CCI",   Plot.Line)
    8.13    val cci_ma = TVar[Float]("MACCI", Plot.Line)
    8.14      
    8.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    8.16 +  protected def computeCont(begIdx: Int, size: Int) {
    8.17      var i = begIdx
    8.18      while (i < size) {
    8.19 +
    8.20        cci(i)    = cci(i, period, alpha)
    8.21        cci_ma(i) = ma (i, cci, periodMa)
    8.22 +
    8.23        i += 1
    8.24      }
    8.25    }
     9.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/DMIIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
     9.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/DMIIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
     9.3 @@ -30,7 +30,6 @@
     9.4   */
     9.5  package org.aiotrade.platform.modules.indicator.basic
     9.6  
     9.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
     9.8  import org.aiotrade.lib.indicator.ContIndicator
     9.9  
    9.10  /**
    9.11 @@ -50,7 +49,7 @@
    9.12    val adx     = TVar[Float]("ADX",  Plot.Line)
    9.13    val adxr    = TVar[Float]("ADXR", Plot.Line)
    9.14      
    9.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    9.16 +  protected def computeCont(begIdx: Int, size: Int) {
    9.17      var i = begIdx
    9.18      while (i < size) {
    9.19              
    10.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/EMAIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    10.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/EMAIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    10.3 @@ -30,7 +30,6 @@
    10.4   */
    10.5  package org.aiotrade.platform.modules.indicator.basic
    10.6  
    10.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    10.8  import org.aiotrade.lib.indicator.ContIndicator
    10.9  
   10.10  /**
   10.11 @@ -50,12 +49,14 @@
   10.12    val ema2 = TVar[Float]("EMA2", Plot.Line)
   10.13    val ema3 = TVar[Float]("EMA3", Plot.Line)
   10.14      
   10.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
   10.16 +  protected def computeCont(begIdx: Int, size: Int) {
   10.17      var i = begIdx
   10.18      while (i < size) {
   10.19 +
   10.20        ema1(i) = ema(i, C, period1)
   10.21        ema2(i) = ema(i, C, period2)
   10.22        ema3(i) = ema(i, C, period3)
   10.23 +
   10.24        i += 1
   10.25      }
   10.26    }
    11.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/GMMAIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    11.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/GMMAIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    11.3 @@ -30,7 +30,6 @@
    11.4   */
    11.5  package org.aiotrade.platform.modules.indicator.basic
    11.6  
    11.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    11.8  import org.aiotrade.lib.indicator.ContIndicator
    11.9  
   11.10  /**
   11.11 @@ -68,9 +67,10 @@
   11.12    val  ma11 = TVar[Float]("MA11", Plot.Line)
   11.13    val  ma12 = TVar[Float]("MA12", Plot.Line)
   11.14      
   11.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
   11.16 +  protected def computeCont(begIdx: Int, size: Int) {
   11.17      var i = begIdx
   11.18      while (i < size) {
   11.19 +
   11.20        ma01(i) = ma(i, C, period01)
   11.21        ma02(i) = ma(i, C, period02)
   11.22        ma03(i) = ma(i, C, period03)
   11.23 @@ -83,6 +83,7 @@
   11.24        ma10(i) = ma(i, C, period10)
   11.25        ma11(i) = ma(i, C, period11)
   11.26        ma12(i) = ma(i, C, period12)
   11.27 +
   11.28        i += 1
   11.29      }
   11.30    }
    12.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/HVDIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    12.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/HVDIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    12.3 @@ -31,7 +31,6 @@
    12.4  package org.aiotrade.platform.modules.indicator.basic
    12.5  
    12.6  import org.aiotrade.lib.math.timeseries.TItem
    12.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    12.8  import org.aiotrade.lib.indicator.SpotIndicator
    12.9  
   12.10  /**
    13.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/KDIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    13.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/KDIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    13.3 @@ -50,12 +50,14 @@
    13.4    val d = TVar[Float]("D", Plot.Line)
    13.5    val j = TVar[Float]("J", Plot.Line)
    13.6      
    13.7 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    13.8 +  protected def computeCont(begIdx: Int, size: Int) {
    13.9      var i = begIdx
   13.10      while (i < size) {
   13.11 +
   13.12        k(i) = stochK(i, period, periodK)
   13.13        d(i) = stochD(i, period, periodK, periodD)
   13.14        j(i) = stochJ(i, period, periodK, periodD)
   13.15 +
   13.16        i += 1
   13.17      }
   13.18    }
    14.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MACDIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    14.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MACDIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    14.3 @@ -52,11 +52,11 @@
    14.4    protected def computeCont(begIdx: Int, size: Int): Unit = {
    14.5      var i = begIdx
    14.6      while (i < size) {
    14.7 -      macd(i) = macd(i, C, periodSlow, periodFast)
    14.8 -            
    14.9 +
   14.10 +      macd(i) = macd(i, C, periodSlow, periodFast)      
   14.11        signal(i) = ema(i, macd, periodSignal)
   14.12 -            
   14.13        osc(i) = macd(i) - signal(i)
   14.14 +      
   14.15        i += 1
   14.16      }
   14.17    }
    15.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MAIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    15.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MAIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    15.3 @@ -53,9 +53,11 @@
    15.4    protected def computeCont(begIdx: Int, size: Int): Unit = {
    15.5      var i = begIdx
    15.6      while (i < size) {
    15.7 +
    15.8        ma1(i) = ma(i, C, period1)
    15.9        ma2(i) = ma(i, C, period2)
   15.10        ma3(i) = ma(i, C, period3)
   15.11 +
   15.12        i += 1
   15.13      }
   15.14    }
    16.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MFIIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    16.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MFIIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    16.3 @@ -49,7 +49,9 @@
    16.4    protected def computeCont(begIdx: Int, size: Int): Unit = {
    16.5      var i = begIdx
    16.6      while (i < size) {
    16.7 +
    16.8        mfi(i) = mfi(i, period)
    16.9 +
   16.10        i += 1
   16.11      }
   16.12    }
    17.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MTMIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    17.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/MTMIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    17.3 @@ -50,8 +50,10 @@
    17.4    protected def computeCont(begIdx: Int, size: Int) {
    17.5      var i = begIdx
    17.6      while (i < size) {
    17.7 +
    17.8        mtm(i) = mtm(i, C, period)
    17.9        mtm_ma(i) = ma(i, mtm, periodSmooth)
   17.10 +
   17.11        i += 1
   17.12      }
   17.13    }
    18.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/OBVIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    18.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/OBVIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    18.3 @@ -30,7 +30,6 @@
    18.4   */
    18.5  package org.aiotrade.platform.modules.indicator.basic
    18.6  
    18.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    18.8  import org.aiotrade.lib.indicator.ContIndicator
    18.9  
   18.10  /**
   18.11 @@ -46,7 +45,9 @@
   18.12    protected def computeCont(begIdx: Int, size: Int): Unit = {
   18.13      var i = begIdx
   18.14      while (i < size) {
   18.15 +
   18.16        obv1(i) = obv(i)
   18.17 +
   18.18        i += 1
   18.19      }
   18.20    }
    19.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ROCIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    19.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ROCIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    19.3 @@ -30,7 +30,6 @@
    19.4   */
    19.5  package org.aiotrade.platform.modules.indicator.basic
    19.6  
    19.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    19.8  import org.aiotrade.lib.indicator.ContIndicator
    19.9  
   19.10  /**
   19.11 @@ -47,11 +46,13 @@
   19.12    val roc1 = TVar[Float]("ROC1", Plot.Line)
   19.13    val roc2 = TVar[Float]("ROC2", Plot.Line)
   19.14      
   19.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
   19.16 +  protected def computeCont(begIdx: Int, size: Int) {
   19.17      var i = begIdx
   19.18      while (i < size) {
   19.19 +
   19.20        roc1(i) = roc(i, C, period1)
   19.21        roc2(i) = roc(i, C, period2)
   19.22 +
   19.23        i += 1
   19.24      }
   19.25    }
    20.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/RSIIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    20.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/RSIIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    20.3 @@ -50,12 +50,14 @@
    20.4    val rsi2 = TVar[Float]("RSI2", Plot.Line)
    20.5    val rsi3 = TVar[Float]("RSI3", Plot.Line)
    20.6      
    20.7 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    20.8 +  protected def computeCont(begIdx: Int, size: Int) {
    20.9      var i = begIdx
   20.10      while (i < size) {
   20.11 +
   20.12        rsi1(i) = rsi(i, periodS)
   20.13        rsi2(i) = rsi(i, periodM)
   20.14        rsi3(i) = rsi(i, periodL)
   20.15 +
   20.16        i += 1
   20.17      }
   20.18    }
    21.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/SARIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    21.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/SARIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    21.3 @@ -48,10 +48,12 @@
    21.4      
    21.5    val sar = TVar[Float]("SAR", Plot.Dot)
    21.6      
    21.7 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    21.8 +  protected def computeCont(begIdx: Int, size: Int) {
    21.9      var i = begIdx
   21.10      while (i < size) {
   21.11 +
   21.12        sar(i) = sar(i, initial, step, maximum)
   21.13 +
   21.14        i += 1
   21.15      }
   21.16    }
    22.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/WMSIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    22.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/WMSIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    22.3 @@ -48,11 +48,13 @@
    22.4    val wms1 = TVar[Float]("WMS1", Plot.Line)
    22.5    val wms2 = TVar[Float]("WMS2", Plot.Line)
    22.6      
    22.7 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    22.8 +  protected def computeCont(begIdx: Int, size: Int) {
    22.9      var i = begIdx
   22.10      while (i < size) {
   22.11 +
   22.12        wms1(i) = wms(i, period1)
   22.13        wms2(i) = wms(i, period2)
   22.14 +
   22.15        i += 1
   22.16      }
   22.17    }
    23.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGFAIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    23.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGFAIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    23.3 @@ -49,7 +49,7 @@
    23.4    //    Var zigzag1       = new DefaultTimeVar("ZIGZAG", Chart.ZIGZAG, 0)
    23.5    //    Var pseudoZigzag1 = new DefaultTimeVar("PSEUDO", Chart.ZIGZAG, 1)
    23.6      
    23.7 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
    23.8 +  protected def computeCont(begIdx: Int, size: Int) {
    23.9      /** the follwing loop must be applied, even if nothing except setCurrent(i) to be done */
   23.10      var i = begIdx
   23.11      while (i < size) {
    24.1 --- a/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGIndicator.scala	Thu Nov 05 16:58:37 2009 +0800
    24.2 +++ b/modules/p.m.indicator.basic/src/org/aiotrade/platform/modules/indicator/basic/ZIGZAGIndicator.scala	Fri Nov 06 01:44:53 2009 +0800
    24.3 @@ -30,7 +30,6 @@
    24.4   */
    24.5  package org.aiotrade.platform.modules.indicator.basic
    24.6  
    24.7 -import org.aiotrade.lib.math.timeseries.plottable.Plot
    24.8  import org.aiotrade.lib.indicator.ContIndicator
    24.9  
   24.10  /**
   24.11 @@ -47,11 +46,13 @@
   24.12    val zigzag       = TVar[Float]("ZIGZAG", Plot.Zigzag)
   24.13    val pseudoZigzag = TVar[Float]("PSEUDO", Plot.Zigzag)
   24.14      
   24.15 -  protected def computeCont(begIdx: Int, size: Int): Unit = {
   24.16 +  protected def computeCont(begIdx: Int, size: Int) {
   24.17      var i = begIdx
   24.18      while (i < size) {
   24.19 +
   24.20        zigzag(i) = zigzag(i, percent)
   24.21        pseudoZigzag(i) = pseudoZigzag(i, percent)
   24.22 +
   24.23        i += 1
   24.24      }
   24.25    }