Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 778 | blopes | 1 | package br.com.robo.strategy; |
| 2 | |||
| 3 | import java.util.List; |
||
| 4 | |||
| 5 | import br.com.robo.model.Candle; |
||
| 6 | |||
| 7 | public interface Strategy { |
||
| 8 | |||
| 9 | enum Signal { |
||
| 10 | BUY, SELL, HOLD |
||
| 11 | } |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param index índice do candle atual |
||
| 15 | * @param candles série inteira de candles |
||
| 16 | * @param hasPosition se já estamos comprados (true) ou não (false) |
||
| 17 | */ |
||
| 18 | Signal decide(int index, List<Candle> candles, boolean hasPosition); |
||
| 19 | |||
| 20 | } |