void |
setPrng(RandomEngine prng)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prng
protected RandomEngine prng
ForecastTradeDirectionPolicy
public ForecastTradeDirectionPolicy()
isBuy
public boolean isBuy(Market market,
TradingAgent agent)
- Description copied from interface:
TradeDirectionPolicy
- Decide whether to go long long (buy) or short (sell).
- Specified by:
isBuy in interface TradeDirectionPolicy
- Parameters:
market - The market in which to make a trading decision
- Returns:
- true for a long position or false for a short position
decideDirection
public boolean decideDirection(double currentPrice,
double forecastedPrice)
getPrng
public RandomEngine getPrng()
setPrng
|