Package edu.harvard.fas.zfeledy.fiximulator.core

Examples of edu.harvard.fas.zfeledy.fiximulator.core.Order


        return executions.getCount();
    }

    public Object getValueAt(int row, int column) {
        Execution execution = executions.getExecution(row);
        Order order = execution.getOrder();
        if (column == 0) return execution.getID();       
        if (column == 1) return order.getClientID();
        if (column == 2) return order.getSide();
        if (column == 3) return order.getSymbol();
        if (column == 4) return execution.getLastShares();
        if (column == 5) return execution.getLastPx();
        if (column == 6) return execution.getCumQty();
        if (column == 7) return execution.getAvgPx();
        if (column == 8) return order.getOpen();
        if (column == 9) return execution.getExecType();
        if (column == 10) return execution.getExecTranType();
        if (column == 11) return execution.getRefID();
        if (column == 12) return execution.isDKd();
        return "";
View Full Code Here


private void acknowledgeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acknowledgeButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.getStatus().equals("Received") ||
             order.getStatus().equals("Pending New")) {
            FIXimulator.getApplication().acknowledge(order);
        } else {
            System.out.println(
                    "Order in status \"" + order.getStatus() + "\" " +
                    "cannot be acknowledged...");
        }
    }
}//GEN-LAST:event_acknowledgeButtonActionPerformed
View Full Code Here

private void orderRejectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_orderRejectButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.getStatus().equals("Received") ||
             order.getStatus().equals("Pending New")) {
            FIXimulator.getApplication().reject(order);
        } else {
            System.out.println(
                    "Order in status \"" + order.getStatus() + "\" " +
                    "cannot be rejected...");
        }
    }
}//GEN-LAST:event_orderRejectButtonActionPerformed
View Full Code Here

private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        FIXimulator.getApplication().cancel(order);
    }
}//GEN-LAST:event_cancelButtonActionPerformed
View Full Code Here

private void dfdButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dfdButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        FIXimulator.getApplication().dfd(order);
    }
}//GEN-LAST:event_dfdButtonActionPerformed
View Full Code Here

private void cancelPendingButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelPendingButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.isReceivedCancel() ) {
            FIXimulator.getApplication().pendingCancel(order);
        } else {
            System.out.println(
                    "Order is not in a valid status for pending cancel");
        }       
View Full Code Here

private void cancelAcceptButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelAcceptButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        FIXimulator.getApplication().cancel(order);
    }
}//GEN-LAST:event_cancelAcceptButtonActionPerformed
View Full Code Here

private void replacePendingButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_replacePendingButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.isReceivedReplace() ) {
            FIXimulator.getApplication().pendingReplace(order);
        } else {
            System.out.println(
                    "Order is not in a valid status for pending replace");
        }       
View Full Code Here

private void replaceAcceptButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_replaceAcceptButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.isReceivedReplace() ||
                order.getStatus().equals("Pending Replace") ) {
            FIXimulator.getApplication().replace(order);
        } else {
            System.out.println(
                    "Order is not in a valid status to replace");
        }       
View Full Code Here

private void cancelRejectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelRejectButtonActionPerformed
    int row = orderTable.getSelectedRow();
    // if no rows are selected
    if ( row != -1 ) {
        row = orderTable.convertRowIndexToModel(row);
        Order order = FIXimulator.getApplication().getOrders().getOrder(row);
        if ( order.isReceivedCancel() ||
                order.getStatus().equals("Pending Cancel") ) {
            FIXimulator.getApplication().rejectCancelReplace(order, true);
        } else {
            System.out.println(
                    "Order is not in a valid status to reject cancellation");
        }       
View Full Code Here

TOP

Related Classes of edu.harvard.fas.zfeledy.fiximulator.core.Order

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.