示例#1
0
        public SimulatorTests()
        {
            position = new Position(closedTrade);
            order = new Order(closedTrade, position);

            position.createPosition(pairAU, new DateTime(2015, 1, 1, 1, 1, 1, 0), "BUY", 1000, entryPriceAU, "id-1", "custom-1");
            order.createEntryOrder(pairAU, new DateTime(2015, 1, 1, 1, 1, 1, 1), "SELL", "STOP", 1000, 0.6910, "id-1");
            order.createEntryOrder(pairAU, new DateTime(2015, 1, 1, 1, 1, 1, 2), "SELL", "LIMIT", 1000, 0.6955, "id-1");

            position.createPosition(pairAJ, new DateTime(2015, 1, 1, 1, 1, 1, 0), "SELL", 1000, entryPriceAJ, "id-1", "custom-1");
            order.createEntryOrder(pairAJ, new DateTime(2015, 1, 1, 1, 1, 1, 1), "BUY", "STOP", 1000, 82.70, "id-1");
            order.createEntryOrder(pairAJ, new DateTime(2015, 1, 1, 1, 1, 1, 2), "BUY", "LIMIT", 1000, 82.25, "id-1");
        }
示例#2
0
文件: Order.cs 项目: pipseq/csFxModel
 public Order(ClosedTrade closedTrade, Position position)
 {
     this.closedTrade = closedTrade;
     this.position = position;
 }