Package com.collective2.signalEntry.adapter.dynamicSimulator

Examples of com.collective2.signalEntry.adapter.dynamicSimulator.SystemManager.portfolio()


                                                        profitTargetSignalId==SystemManager.NO_ID?null:profitTargetSignalId,
                                                        OK);

                case GetBuyPower:
                   //  long lastTickTime = lastTickDataProvider.endingTime();
                     BigDecimal buyPower = system.portfolio().cash().add(system.totalMargin());
                     return new SimulatedResponseGetBuyPower(OK,time,buyPower);

                case Cancel:

                    Integer id = (Integer)request.get(Parameter.SignalId);
View Full Code Here


                    system.cancelAllPending(time);
                    return new SimulatedResponseCancelAllPending(OK);

                case CloseAllPositions:

                    system.portfolio().closeAllPositions();
                    return new SimulatedResponseCloseAllPositions(OK);

                case FlushPendingSignals:

                    system.flushPendingSignals(lastTickDataProvider);
View Full Code Here

                    return new SimulatedResponseGetAllSignals(OK, allPendingSignals);

                case GetSystemEquity:

                    long lastTickTime = lastTickDataProvider.endingTime();
                    Number equity = system.portfolio().equity(lastTickDataProvider);
                    return new SimulatedResponseGetSystemEquity(OK,lastTickTime,equity);

                case GetSystemHypothetical:

                    List<Map<C2Element, Object>> data = new ArrayList<Map<C2Element, Object>>();
View Full Code Here

                    return new SimulatedResponseGetSystemHypothetical(data);

                case PositionStatus:

                    String symbol = (String)request.get(Parameter.Symbol);
                    Integer position = system.portfolio().position(symbol).quantity();
                    return new SimulatedResponsePositionStatus(OK,time,symbol,position);

                case RequestOCAId:

                    Integer ocaid = system.generateNewOCAId();
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.