Examples of RelativeNumber


Examples of com.collective2.signalEntry.implementation.RelativeNumber

    private final DataProvider dataProvider = new DynamicSimulationMockDataProvider(start,open,high,low,close,stop);
    private final BigDecimal commission = new BigDecimal("9");

    @Test
    public void  stopBTOTestOpenOpen() {
        RelativeNumber buyBelow = new RelativeNumber("4");//must buy ABOVE this price
        RelativeNumber sellAbove = new RelativeNumber("3");//must sell BELOW this price

        BigDecimal expectedBuy = new BigDecimal("4");
        BigDecimal expectedSell = new BigDecimal("3");

        stopBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

        stopBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
    }

    @Test
    public void  stopBTOTestLimitLimit() {
        RelativeNumber buyBelow = new RelativeNumber("2");//must buy ABOVE this price
        RelativeNumber sellAbove = new RelativeNumber("2");//must sell BELOW this price

        BigDecimal expectedBuy = new BigDecimal("3");
        BigDecimal expectedSell = new BigDecimal("2");

        stopBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

        stopBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
    }

    @Test
    public void  stopBTOTestTopTop() {
        RelativeNumber buyBelow = new RelativeNumber("1");//must buy ABOVE this price
        RelativeNumber sellAbove = new RelativeNumber("7");//must sell BELOW this price

        BigDecimal expectedBuy = new BigDecimal("3");
        BigDecimal expectedSell = new BigDecimal("3");

        stopBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

    }

    @Test
    public void  stopSTOTest() {

        RelativeNumber sellAbove = new RelativeNumber("3");//must sell BELOW this price
        RelativeNumber buyBelow = new RelativeNumber("4");//must buy ABOVE this price

        BigDecimal expectedSell = new BigDecimal("3");
        BigDecimal expectedBuy = new BigDecimal("4");

        stopShortTest(SignalAction.STO, sellAbove, buyBelow, expectedSell, expectedBuy);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

    }

    @Test
    public void  stopSShortTest() {

        RelativeNumber sellAbove = new RelativeNumber("2");//must sell BELOW this price
        RelativeNumber buyBelow = new RelativeNumber("2");//must buy ABOVE this price

        BigDecimal expectedSell = new BigDecimal("2");
        BigDecimal expectedBuy = new BigDecimal("3");

        stopShortTest(SignalAction.SSHORT, sellAbove, buyBelow, expectedSell, expectedBuy);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

    private final DataProvider dataProvider = new DynamicSimulationMockDataProvider(start,open,high,low,close,stop);
    private final BigDecimal commission = new BigDecimal("9");

    @Test
    public void  limitBTOTestOpenOpen() {
        RelativeNumber buyBelow = new RelativeNumber("4");//must buy below this price
        RelativeNumber sellAbove = new RelativeNumber("3");//must sell above this price

        BigDecimal expectedBuy = new BigDecimal("3");
        BigDecimal expectedSell = new BigDecimal("3");

        limitBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

        limitBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
    }

    @Test
    public void  limitBTOTestLimitLimit() {
        RelativeNumber buyBelow = new RelativeNumber("2");//must buy below this price
        RelativeNumber sellAbove = new RelativeNumber("4");//must sell above this price

        BigDecimal expectedBuy = new BigDecimal("2");
        BigDecimal expectedSell = new BigDecimal("4");

        limitBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

        limitBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
    }

    @Test
    public void  limitBTOTestTopTop() {
        RelativeNumber buyBelow = new RelativeNumber("1");//must buy below this price
        RelativeNumber sellAbove = new RelativeNumber("7");//must sell above this price

        BigDecimal expectedBuy = new BigDecimal("1");
        BigDecimal expectedSell = new BigDecimal("7");

        limitBTOTest(buyBelow, sellAbove, expectedBuy, expectedSell);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

    }

    @Test
    public void  limitSTOTest() {

        RelativeNumber sellAbove = new RelativeNumber("3");//must sell above this price
        RelativeNumber buyBelow = new RelativeNumber("4");//must buy below this price

        BigDecimal expectedSell = new BigDecimal("3");
        BigDecimal expectedBuy = new BigDecimal("3");

        limitShortTest(SignalAction.STO, sellAbove, buyBelow, expectedSell, expectedBuy);
View Full Code Here

Examples of com.collective2.signalEntry.implementation.RelativeNumber

    }

    @Test
    public void  limitSShortTest() {

        RelativeNumber sellAbove = new RelativeNumber("4");//must sell above this price
        RelativeNumber buyBelow = new RelativeNumber("2");//must buy below this price

        BigDecimal expectedSell = new BigDecimal("4");
        BigDecimal expectedBuy = new BigDecimal("2");

        limitShortTest(SignalAction.SSHORT, sellAbove, buyBelow, expectedSell, expectedBuy);
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.