public static PriceCalculator new_Calculator( StrategyConfig strategy_cfg, PriceEngine price_engine, int global_hist_size) { PriceCalculator calc = null; int at_pos = 0; if (strategy_cfg.strategyName.equalsIgnoreCase("highesthigh")) { calc = new PriceCalculatorHighestHigh( price_engine.get_PriceHistory(TSTickType.BID_PRICE), OhlcPriceType.CLOSE, global_hist_size, (int) strategy_cfg.getParameter("len"), at_pos); } else if (strategy_cfg.strategyName.equalsIgnoreCase("lowestlow")) { calc = new PriceCalculatorLowestLow( price_engine.get_PriceHistory(TSTickType.ASK_PRICE), OhlcPriceType.CLOSE, global_hist_size, (int) strategy_cfg.getParameter("len"), at_pos); } return calc; }