Subversion Repositories Integrator Subversion

Rev

Rev 761 | Rev 763 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 761 Rev 762
Line 24... Line 24...
24
import br.com.ec.core.interfaces.Cadastrar;
24
import br.com.ec.core.interfaces.Cadastrar;
25
import br.com.ec.core.util.VerificadorUtil;
25
import br.com.ec.core.util.VerificadorUtil;
26
import br.com.kronus.core.Timeframe;
26
import br.com.kronus.core.Timeframe;
27
import br.com.sl.domain.dto.robo.CandleState;
27
import br.com.sl.domain.dto.robo.CandleState;
28
import br.com.sl.domain.model.tipos.TipoPeriodoCandle;
28
import br.com.sl.domain.model.tipos.TipoPeriodoCandle;
-
 
29
import br.com.sl.domain.util.BigDecimalUtils;
29
30
30
@Entity
31
@Entity
31
@Table(name="slp_candle", schema="sc_slp")
32
@Table(name="slp_candle", schema="sc_slp")
32
public class Candle implements Serializable {
33
public class Candle implements Serializable {
33
         
34
         
Line 213... Line 214...
213
                                return false;
214
                                return false;
214
                } else if (!sequencial.equals(other.sequencial))
215
                } else if (!sequencial.equals(other.sequencial))
215
                        return false;
216
                        return false;
216
                return true;
217
                return true;
217
        }
218
        }
-
 
219
       
-
 
220
        @Transient
-
 
221
        public boolean isCandleComprador() {
-
 
222
        return BigDecimalUtils.ehMaiorQue(fechamento, abertura);
-
 
223
    }
-
 
224
-
 
225
        @Transient
-
 
226
    public boolean isCandleVendedor() {
-
 
227
        return BigDecimalUtils.ehMenorQue(fechamento, abertura);
-
 
228
    }
-
 
229
-
 
230
        @Transient
-
 
231
    public BigDecimal getCorpoAlto() {
-
 
232
//              return Math.max(abertura.doubleValue(), fechamento.doubleValue());
-
 
233
        return BigDecimalUtils.maximo(abertura, fechamento);
-
 
234
    }
-
 
235
-
 
236
        @Transient
-
 
237
    public BigDecimal getCorpoBaixo() {
-
 
238
//              return Math.min(abertura.doubleValue(), fechamento.doubleValue());
-
 
239
        return BigDecimalUtils.minimo(abertura, fechamento);
-
 
240
    }
218
       
241
       
219
}
242
}