jp.sourceforge.orangesignal.trading.strategy.systems
クラス MovingAverage3LineCross

java.lang.Object
  上位を拡張 jp.sourceforge.orangesignal.trading.strategy.AbstractStrategy
      上位を拡張 jp.sourceforge.orangesignal.trading.strategy.StrategySupport
          上位を拡張 jp.sourceforge.orangesignal.trading.strategy.systems.MovingAverage3LineCross
すべての実装されたインタフェース:
Strategy
直系の既知のサブクラス:
MovingAverage3LineCrossLongEntry, MovingAverage3LineCrossShortEntry

public abstract class MovingAverage3LineCross
extends StrategySupport

価格と短期移動平均、中期移動平均、長期移動平均の交差をシグナルとするストラテジーの基底クラスを提供します。


フィールドの概要
protected  Number[] ma_fast
          短期移動平均データを保持します。
protected  Number[] ma_mid
          中期移動平均データを保持します。
protected  Number[] ma_slow
          長期移動平均データを保持します。
protected  Number[] prices
          価格データを保持します。
 
コンストラクタの概要
MovingAverage3LineCross()
           
 
メソッドの概要
 int getFast()
          短期移動平均の期間を返します。
 int getMid()
          中期移動平均の期間を返します。
 FourPrice getPrice()
          価格の種類を返します。
 int getSlow()
          長期移動平均の期間を返します。
 MovingAverage getType()
          移動平均の種類を返します。
 void init()
          ストラテジーを初期化します。
 void setFast(int fast)
          短期移動平均の期間を設定します。
 void setMid(int mid)
          中期移動平均の期間を設定します。
 void setPrice(FourPrice price)
          価格の種類を設定します。
 void setSlow(int slow)
          長期移動平均の期間を設定します。
 void setType(MovingAverage type)
          移動平均の種類を設定します。
 void terminate()
          ストラテジーを終了します。
 
クラス jp.sourceforge.orangesignal.trading.strategy.StrategySupport から継承されたメソッド
buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buy, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, buyToCover, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sell, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort, sellShort
 
クラス jp.sourceforge.orangesignal.trading.strategy.AbstractStrategy から継承されたメソッド
buy, buyToCover, createOrder, getCandlestick, getClose, getCommission, getCurrentDataIndex, getCurrentEntries, getCurrentPosition, getCurrentPositions, getDataset, getDate, getDefaultOrderTiming, getEndDataIndex, getEntryDate, getEntryPrice, getHigh, getLow, getMarketPositionType, getOpen, getStartDataIndex, getStrategyName, getSymbol, getTrader, getVolume, sell, sellShort, setCurrentDataIndex, setDataset, setDate, setDefaultOrderTiming, setEndDataIndex, setStartDataIndex, setSymbol, setTrader
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース jp.sourceforge.orangesignal.trading.strategy.Strategy から継承されたメソッド
process
 

フィールドの詳細

prices

protected Number[] prices
価格データを保持します。


ma_fast

protected Number[] ma_fast
短期移動平均データを保持します。


ma_mid

protected Number[] ma_mid
中期移動平均データを保持します。


ma_slow

protected Number[] ma_slow
長期移動平均データを保持します。

コンストラクタの詳細

MovingAverage3LineCross

public MovingAverage3LineCross()
メソッドの詳細

getPrice

public FourPrice getPrice()
価格の種類を返します。

戻り値:
価格の種類

setPrice

public void setPrice(FourPrice price)
価格の種類を設定します。

パラメータ:
price - 価格の種類

getFast

public int getFast()
短期移動平均の期間を返します。

戻り値:
短期移動平均の期間

setFast

public void setFast(int fast)
短期移動平均の期間を設定します。

パラメータ:
fast - 短期移動平均の期間

getMid

public int getMid()
中期移動平均の期間を返します。

戻り値:
中期移動平均の期間

setMid

public void setMid(int mid)
中期移動平均の期間を設定します。

パラメータ:
mid - 中期移動平均の期間

getSlow

public int getSlow()
長期移動平均の期間を返します。

戻り値:
長期移動平均の期間

setSlow

public void setSlow(int slow)
長期移動平均の期間を設定します。

パラメータ:
slow - 長期移動平均の期間

getType

public MovingAverage getType()
移動平均の種類を返します。

戻り値:
移動平均の種類

setType

public void setType(MovingAverage type)
移動平均の種類を設定します。

パラメータ:
type - 移動平均の種類

init

public void init()
クラス AbstractStrategy の記述:

ストラテジーを初期化します。

デフォルトの実装は何も行いません。

定義:
インタフェース Strategy 内の init
オーバーライド:
クラス AbstractStrategy 内の init

terminate

public void terminate()
クラス AbstractStrategy の記述:

ストラテジーを終了します。

デフォルトの実装は何も行いません。

定義:
インタフェース Strategy 内の terminate
オーバーライド:
クラス AbstractStrategy 内の terminate


Copyright © 2006-2009 OrangeSignal.com. All Rights Reserved.