Package org.wkh.bateman.trade

Examples of org.wkh.bateman.trade.Conditions


        series = new TimeSeries(toyPrices);
        asset = new Asset("FOO", series);

        account = new Account(new BigDecimal(1000), today.minusDays(6));

        conditions = new Conditions(BigDecimal.ZERO, BigDecimal.ZERO);
        moneyManager = new FixedPercentageAllocationStrategy(0.2, asset);
        session = new Session(account, conditions);

        buyTrigger = 0.25;
        sellTrigger = 1.0;
View Full Code Here


        series = new TimeSeries(toyPrices);
        asset = new Asset("FOO", series);

        account = new Account(new BigDecimal(1000), today.minusDays(6));

        conditions = new Conditions(BigDecimal.ZERO, BigDecimal.ZERO);
        moneyManager = new FixedPercentageAllocationStrategy(0.2, asset);
        session = new Session(account, conditions);

        buyTrigger = 0.4;
        sellTrigger = 1.0;
View Full Code Here

            final double minBuy, final double minSell, final double minStop, final double maxBuy,
            final double maxSell, final double maxStop, final int generations) throws Exception {

        final Asset asset = new Asset(symbol, series);

        final Conditions conditions = new Conditions(new BigDecimal(commissions), new BigDecimal(slippage));

        final MoneyManagementStrategy moneyManager = new FixedPercentageAllocationStrategy(allocation, asset);

        FitnessFunction fitness = new FitnessFunction() {
            public double evaluate(double[] x) {
View Full Code Here

        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,
                moneyManager, buyTrigger, sellTrigger, stopLoss);
View Full Code Here

TOP

Related Classes of org.wkh.bateman.trade.Conditions

Copyright © 2018 www.massapicom. 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.