Examples of minusDays()


Examples of org.joda.time.DateTime.minusDays()

    if(selectedMode == SelectionMode.DAY)
      if(this.cboDay.getDate() != null){
        DateTime selectedDate = new DateTime(this.cboDay.getDate());

        lowerBound = selectedDate.minusDays(this.numberOfPeriods);
      }
    else if(selectedMode == SelectionMode.WEEK)
      if(this.cboWeek.getSelectedItem() != null)
        lowerBound = ((Week)this.cboWeek.getSelectedItem()).getLowerBound();
    else if(selectedMode == SelectionMode.MONTH)
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

        System.out.println("Sell trigger: " + sellTrigger);
        System.out.println("Stop loss: " + stopLoss);

        Asset asset = new Asset(symbol, series);

        Account account = new Account(new BigDecimal(initialBalance), today.minusDays(days));

        Conditions conditions = new Conditions(new BigDecimal(commission), new BigDecimal(slippage));
        MoneyManagementStrategy moneyManager = new FixedPercentageAllocationStrategy(accountAllocation, asset);

        BuyZoneModel instance = new BuyZoneModel(account, asset, conditions,
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

   

    @Override
    protected DateTime doConvertToObject(String value, Locale locale) throws ConversionException {
        final DateTime parsedDateTime = convert(value);
        return parsedDateTime.minusDays(adjustBy);
    }

    private DateTime convert(String value) throws ConversionException {
        try {
            return getFormatterForDateTimePattern().parseDateTime(value);
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(
                new Interval(
                    now.minusDays(2),
                    now.minusDays(1)
                )
            ).build(),
            now
        )
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(
                new Interval(
                    now.minusDays(2),
                    now.minusDays(1)
                )
            ).build(),
            now
        )
    );
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

            now
        )
    );
    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusYears(100), now.minusDays(1)))
                       .build(),
            now
        )
    );
  }
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

        new Period("P1M")
    );

    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusWeeks(1), now.minusDays(1)))
                       .build(),
            now
        )
    );
    Assert.assertTrue(
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

            now
        )
    );
    Assert.assertTrue(
        rule.appliesTo(
            builder.interval(new Interval(now.minusDays(1), now))
                   .build(),
            now
        )
    );
    Assert.assertFalse(
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

            now
        )
    );
    Assert.assertFalse(
        rule.appliesTo(
            builder.interval(new Interval(now.minusYears(1), now.minusDays(1)))
                       .build(),
            now
        )
    );
    Assert.assertFalse(
View Full Code Here

Examples of org.joda.time.DateTime.minusDays()

            now
        )
    );
    Assert.assertFalse(
        rule.appliesTo(
            builder.interval(new Interval(now.minusMonths(2), now.minusDays(1)))
                       .build(),
            now
        )
    );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.