Spaces:
Sleeping
Sleeping
File size: 693 Bytes
f5cd2d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | package com.rods.backtestingstrategies.strategy;
import com.rods.backtestingstrategies.entity.Candle;
import com.rods.backtestingstrategies.entity.TradeSignal;
import java.util.List;
public interface Strategy {
/**
* Evaluate market state at a given candle index
* and return a trading signal.
*
* @param candles ordered historical candles
* @param index current candle index (time step)
* @return TradeSignal BUY / SELL / HOLD
*/
TradeSignal evaluate(List<Candle> candles, int index);
/**
* Human-readable name of the strategy
*/
String getName();
// Type of strategy being implemented
StrategyType getType();
}
|