Rev 770 | Rev 776 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 770 | Rev 771 | ||
|---|---|---|---|
| Line 31... | Line 31... | ||
| 31 | @Scope("view") |
31 | @Scope("view") |
| 32 | public class RoboBean extends AbstractBean<RoboDTO> implements Serializable { |
32 | public class RoboBean extends AbstractBean<RoboDTO> implements Serializable { |
| 33 | 33 | ||
| 34 | private RoboOperadorService roboOperadorService; |
34 | private RoboOperadorService roboOperadorService; |
| 35 | 35 | ||
| 36 | // private TipoFonteDadosProfit tipoFonteSelecionada = TipoFonteDadosProfit.HISTORICO;
|
- | |
| 37 | - | ||
| - | 36 | private String tipoFonteSelecionada; |
|
| - | 37 | ||
| 38 | private List<PadraoGatilho> padroesEmAberto; |
38 | private List<PadraoGatilho> padroesEmAberto; |
| 39 | private Integer contadorUltimoCandle; |
39 | private Integer contadorUltimoCandle; |
| 40 | 40 | ||
| 41 | private List<PadraoGatilho> padroes; |
41 | private List<PadraoGatilho> padroes; |
| 42 | private List<PadraoGatilho> padroesComG3; // completos (G3 != null) |
42 | private List<PadraoGatilho> padroesComG3; // completos (G3 != null) |
| Line 62... | Line 62... | ||
| 62 | setPadroes(new ArrayList<PadraoGatilho>()); |
62 | setPadroes(new ArrayList<PadraoGatilho>()); |
| 63 | setPadroesComG3(new ArrayList<PadraoGatilho>()); |
63 | setPadroesComG3(new ArrayList<PadraoGatilho>()); |
| 64 | setPadroesAteG2(new ArrayList<PadraoGatilho>()); |
64 | setPadroesAteG2(new ArrayList<PadraoGatilho>()); |
| 65 | setSinaisTradeGatilho3(new ArrayList<SinalTradeGatilho3>()); |
65 | setSinaisTradeGatilho3(new ArrayList<SinalTradeGatilho3>()); |
| 66 | setResultados(new ArrayList<ResultadoEstrategiaGatilho3>()); |
66 | setResultados(new ArrayList<ResultadoEstrategiaGatilho3>()); |
| - | 67 | setTipoFonteSelecionada(TipoFonteDadosProfit.TEMPO_REAL.getValor()); |
|
| 67 | }
|
68 | }
|
| 68 | 69 | ||
| 69 | @Override |
70 | @Override |
| 70 | public GenericService<RoboDTO> getService() { |
71 | public GenericService<RoboDTO> getService() { |
| 71 | return roboOperadorService; |
72 | return roboOperadorService; |
| Line 112... | Line 113... | ||
| 112 | public List<PadraoGatilho> getPadroesAteG2() { |
113 | public List<PadraoGatilho> getPadroesAteG2() { |
| 113 | return padroesAteG2; |
114 | return padroesAteG2; |
| 114 | }
|
115 | }
|
| 115 | public void setPadroesAteG2(List<PadraoGatilho> padroesAteG2) { |
116 | public void setPadroesAteG2(List<PadraoGatilho> padroesAteG2) { |
| 116 | this.padroesAteG2 = padroesAteG2; |
117 | this.padroesAteG2 = padroesAteG2; |
| - | 118 | }
|
|
| - | 119 | ||
| - | 120 | public String getTipoFonteSelecionada() { |
|
| - | 121 | return tipoFonteSelecionada; |
|
| - | 122 | }
|
|
| - | 123 | public void setTipoFonteSelecionada(String tipoFonteSelecionada) { |
|
| - | 124 | this.tipoFonteSelecionada = tipoFonteSelecionada; |
|
| - | 125 | }
|
|
| - | 126 | ||
| - | 127 | public TipoFonteDadosProfit[] getTiposFonteDadosProfit() { |
|
| - | 128 | return TipoFonteDadosProfit.values(); |
|
| 117 | }
|
129 | }
|
| 118 | 130 | ||
| 119 | public void iniciar() { |
131 | public void iniciar() { |
| 120 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
132 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 121 | public void execute() { |
133 | public void execute() { |
| 122 | // ANALISAR POR HISTÓRICO
|
- | |
| 123 | getEntidade().setAnalisarPorHistoricoArquivo(false); |
- | |
| 124 | - | ||
| 125 | roboOperadorService.iniciarOperacao(getEntidade().getAnalisarPorHistoricoArquivo()); |
- | |
| - | 134 | roboOperadorService.iniciarOperacao(getTipoFonteSelecionada()); |
|
| 126 | setEntidade(roboOperadorService.statusRobo()); |
135 | setEntidade(roboOperadorService.statusRobo()); |
| 127 | LancadorMensagem.lancarSucesso("ROBÔ INICIADO COM SUCESSO!"); |
136 | LancadorMensagem.lancarSucesso("ROBÔ INICIADO COM SUCESSO!"); |
| 128 | }
|
137 | }
|
| 129 | }); |
138 | }); |
| 130 | }
|
139 | }
|