Ejemplo n.º 1
0
 @Transient
 public PonderationRule getNonNullSellPonderationRule() {
   if (sellPonderationRule == null) {
     EventSignalConfig eventConfig =
         (EventSignalConfig) ConfigThreadLocal.get(EventSignalConfig.EVENT_SIGNAL_NAME);
     Integer sellEvtThresh = eventConfig.getSellEventTriggerThreshold();
     Integer buyEvtThresh = eventConfig.getBuyEventTriggerThreshold();
     PonderationRule defaultSellPonderationRule =
         eventConfig.getSellPonderationRule(sellEvtThresh, buyEvtThresh);
     LOGGER.warn(
         "No sell weighting rule for "
             + this.name
             + " the config rule will be used "
             + defaultSellPonderationRule);
     return defaultSellPonderationRule;
   }
   return sellPonderationRule;
 }
Ejemplo n.º 2
0
  public ChartsComposite(Composite parent, int style, LogComposite logComposite) {
    super(parent, style);

    this.currentTabShareList = new ArrayList<SlidingPortfolioShare>();

    this.slidingEndDate = DateFactory.midnithDate(EventSignalConfig.getNewDate());
    Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.YEAR, -1);
    this.slidingStartDate = DateFactory.midnithDate(calendar.getTime());

    this.logComposite = logComposite;
    this.hightlitedEventModel = EventModel.getInstance(new RefreshChartHighlighted(), logComposite);

    this.chartedEvtDefsTrends = initChartedEvtDefsTrendsSet();
    this.chartedEvtDef = EventDefinition.ZERO;

    this.sliderSelection = false;

    this.stripedCloseFunction = new StripedCloseRelativeToStart(slidingStartDate, slidingEndDate);
    this.initGUI();
    chartDisplayStrategy = new ChartPerfDisplay(this);
  }
Ejemplo n.º 3
0
 private Date maxDate() {
   if (lastEndDate == null) {
     lastEndDate = DateFactory.midnithDate(EventSignalConfig.getNewDate());
   }
   return lastEndDate;
 }