/*
 * Copyright (c) 2006-2009 OrangeSignal.com All rights reserved.
 */

package jp.sourceforge.orangesignal.trading.strategy.systems;

import static jp.sourceforge.orangesignal.ta.CrossSignal.GOLDEN_CROSS;

/**
 * 移動平均のゴールデンクロスで買いポジションを建てるストラテジーを提供します。
 */
public class MovingAverage2LineCrossLongEntry extends MovingAverage2LineCross {

	@Override
	public boolean execute() {
		final int i = getCurrentDataIndex();
		if (cross[i] != null && cross[i] == GOLDEN_CROSS)
			buy(getStrategyName());
		return false;
	}

}
