Solved

Open position calculation

Posted on 2011-03-11
19
332 Views
Last Modified: 2012-05-11
I need to count number of open positions at this moment.
I send query and receive from server list of open positions.
I make preliminary filtering, so I get in my method
openPositionControl(PositionReport aPositionReport)
only PositionReport messages for specified currency pair, let's say EURUSD.
I need to count them, and update this value into JTexField.
How to set new value I know.
Please advice how to count set of incoming PositionReports , set them into field and start count new incoming set. To separate different sets we can use time gap more that 100L, so if 100L no new PositionReports, in starts all incoming from zero.
This is the sample of PositionReport set:
EUR/USD Bot outY[0]    = -0.46076387
EUR/USD now    = Fri Mar 11 20:27:14 EET 2011
EUR/USD mds    = true
EUR/USD mflag0c    = true
interval: 60000
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299868034595}
OpenPositionControl bl0 = false
OpenPositionControl openPositionMassID = DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38732
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40732104,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2184,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:18:38 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585606', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:18:38, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484206', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35288, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40732094,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2175,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:18:35 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585602', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:18:35, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484203', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.3529, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731289,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-1572,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:11:58 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585051', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:11:58, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484221', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35303, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731168,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-1489,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:11:02 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16584985', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:11:02, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484224', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35311, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731944,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2087,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:17:48 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585518', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:17:48, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484191', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35323, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731946,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2089,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:17:49 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585523', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:17:49, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484194', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35323, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731951,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2093,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:17:50 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585525', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:17:50, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484197', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35324, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40731972,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2108,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:17:56 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16585537', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:17:56, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484200', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35324, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40733199,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-2801,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:25:39 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16586358', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:25:39, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484209', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35404, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40734889,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-3352,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:31:51 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16587878', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:31:51, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484212', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35428, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40734901,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-3363,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:31:57 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16587886', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:31:57, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484215', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35429, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40735417,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-3581,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:34:17 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16588301', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:34:17, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484218', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35438, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40737533,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-4590,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:46:47 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16589973', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:46:47, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484233', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35493, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40737542,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-4595,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:46:49 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16589978', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:46:49, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484236', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35493, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40737425,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-4558,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:46:27 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16589894', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:46:27, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484230', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35502, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40739705,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-5690,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:59:33 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16591793', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:59:33, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484239', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35517, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40739930,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-5785,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-09:00:36 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16591985', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-09:00:36, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484242', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35517, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40737256,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-4440,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-08:45:07 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16589765', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-08:45:07, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484227', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35524, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40741383,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-6694,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-09:11:04 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16593174', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-09:11:04, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484248', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35528, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40740915,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-6301,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-09:06:34 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16592790', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-09:06:34, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484245', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35544, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40747269,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-11892,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:13:38 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16597626', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:13:38, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484251', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35572, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40747270,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-11894,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:13:39 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16597627', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:13:39, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484255', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.35573, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40752779,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-13359,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:31:33 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16600393', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:31:33, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484258', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.36003, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40753980,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-13816,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:36:36 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16600581', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:36:36, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484264', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.36144, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40753975,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-13805,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:36:30 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16600579', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:36:30, mFXCMUsedMargin=100.0, mLastRptRequested=false, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484261', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.36155, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
OpenPositionControl: PositionReport = PositionReport --- begin superclass toString mAccount=00779442,mOrderID=40753986,mClOrdID=DB_U100D1_wI0cMRcIHFxyapvtyEuClCcZDfpdty4gaXezDojrHZVEzZgBKG1559-13824,mSecondaryClOrdID=EURUSD.AlgoTradeMarket_EURUSD.<init>(),mInstrument=TradingSecurityAdj --- begin superclass toString TradingSecurity --- begin superclass toString Instrument{mCFICode='null', mContractMultiplier=1, mFactor=1, mFXCMCondDistEntryLimit=0.0, mFXCMCondDistEntryStop=0.0, mFXCMCondDistLimit=0.0, mFXCMCondDistStop=0.0, mFXCMMaxQuantity=5.0E7, mFXCMMinQuantity=1.0, mFXCMProductID=1, mFXCMSymID=1, mFXCMSymPointSize=1.0E-4, mFXCMSymPrecision=5, mFXCMSymSortOrder=1, mFXCMTradingStatus='O', mProduct=4, mSecurityType='null', mSymbol='EUR/USD', mTouchTime=0} --- end superclass toString {mCurrency='EUR', mRoundLot=1.0, mFXCMSymInterestBuy=0.0, mFXCMSymInterestSell=0.0, mFXCMSubscriptionStatus='T'} --- end superclass toString {mAskAdjustment=0.0, mBidAdjustment=0.0, mPriceStream=PriceStream{mName='Default', mID=1}},mParties=Parties [Party:3:D:FXCM ID(26:32;2:dbd11070132001;22:Grebnevsky;10:779442;);],mTradingSessionID=FXCM,mTradingSessionSubID=DBFXUSDD1,mTransactTime=20110222-10:36:39 --- end superclass toString {mCurrency='EUR', mFXCMPosCommission=0.0, mFXCMPosID='16600582', mFXCMPosIDRef='null', mFXCMPosInterest=-5.16, mFXCMPosOpenTime=20110222-10:36:39, mFXCMUsedMargin=100.0, mLastRptRequested=true, mListID='null', mPositionQty=Position amount (Sell) 10000.0, mPosMaintRptID='541484267', mPosReqID='DB_U100D1_s58A2gZcXRbCeLOYatVtmNJrQt7WjZ0qzmY9XY92eDDUlLhsK7ei34-38624', mPosReqType=PosReqType:Positions (0), mSettlPrice=1.36159, mText='null', mTotalNumPosReports=26, mUnsolicitedIndicator=false}
EUR/USD Bot outY[0]    = -0.05596989
EUR/USD now    = Fri Mar 11 20:27:15 EET 2011
E

Open in new window

0
Comment
Question by:gbcbr
  • 11
  • 8
19 Comments
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
How are you receiving this data - and waht prevents you to have a counter and increment it as soon as you receive them?
0
 

Author Comment

by:gbcbr
Comment Utility
When I got signal to make the deal I have to check how many available positions to open I have.
In this reason I call:
public void openPositionRequest(boolean bl0) {

        System.out.println("OpenPositionControl bl0 = " + bl0);

        if (bl0 == true || bl0 == false)

            openPositionMassID = mFxcmGateway.requestOpenPositions();
        System.out.println("OpenPositionControl openPositionMassID = " +
                           openPositionMassID);
    }

Open in new window

and receive reply:
} else if (message instanceof PositionReport) {

                        aPositionReport = (PositionReport)message;
                        try {

                            if (aPositionReport.getInstrument().getSymbol() ==
                                null ? "EUR/USD" == null :
                                aPositionReport.getInstrument().getSymbol().equals("EUR/USD")) {

                                aStopLimitEntryOrder_EURUSD =
                                        new StopLimitEntryOrderPR_EURUSD();
                                aStopLimitEntryOrder_EURUSD.stopLimitEntryOrder(aPositionReport);

                                OpenPositionControl_EURUSD.getInstance().openPositionControl(aPositionReport);

Open in new window

public void openPositionControl(PositionReport aPositionReport) {

        System.out.println("OpenPositionControl: PositionReport = " +
                           aPositionReport);
        
    }

Open in new window

Sample of reply you see above.
Now I need to make all above mentioned actions: calculate number of positions(pr++), sent it to JTextField(this I know) and reset this calculation to zero, so when next set of PositionReport's will come it will start count from zero, but not from previous value. This is biggest question for me.
No problem for me pr++, problem to reset it to zero for each new set.
0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility


Can you do something like that:
Before everything you initialize counter and lastReceived like that:

int counter = 0;
java.util.Date lastRecieved = null;

Then when you receive position you do smth like this:

java.util.Date now = new Java.util.Date();
if(lastReceived == null)lastReceived = now;

if((now.getTime() - lastReceived.getTime()) > 100000L){
count = 1;
}else
{
count++;

}
lastReceived = now;

and then wait till next osition comes your way









0
 

Author Comment

by:gbcbr
Comment Utility
Which print out I have to put to see the result in terminal?
0
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
Comment Utility

I guess something like below - it will
be quickly growing until
there is an interval - and at that moment you'll see a steady number

int counter = 0;
java.util.Date lastRecieved = null;

Then when you receive position you do smth like this:

java.util.Date now = new Java.util.Date();
if(lastReceived == null)lastReceived = now;

if((now.getTime() - lastReceived.getTime()) > 100000L){
count = 1;
}else
{
count++;

}
System.out.println(count);
txtField.setText("" + count);
lastReceived = now;

0
 

Author Comment

by:gbcbr
Comment Utility
some problem with syntax => lastReceived red
0
 

Author Comment

by:gbcbr
Comment Utility
I found and clean
0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
Well, check lastReceived vs LastRecieved "e" and "i" order - I guess I made a mistake
0
 

Author Comment

by:gbcbr
Comment Utility
Something wrong, it counts without reseting:
public class OpenPositionControl_EURUSD {

    //    private static List accounts = new ArrayList();
    IGateway mFxcmGateway;
    protected static RequestForPositionsAck rfpa;
    ITransportable message;
    private static String openPositionMassID;
    protected static PositionReport aPositionReport;
    int counter = 0;
    java.util.Date lastReceived = null;

    private static OpenPositionControl_EURUSD instance =
        new OpenPositionControl_EURUSD();

    public static OpenPositionControl_EURUSD getInstance() {
        return instance;
    }

    public OpenPositionControl_EURUSD() {
        this.mFxcmGateway = DBFXConnect.getGateway();
        aPositionReport = (PositionReport)message;
    }

    public void openPositionRequest(boolean bl0) {

        System.out.println("OpenPositionControl bl0 = " + bl0);

        if (bl0 == true || bl0 == false){

            openPositionMassID = mFxcmGateway.requestOpenPositions();
        }
    }

    public void openPositionControl(PositionReport aPositionReport) {
//
//        System.out.println("OpenPositionControl: PositionReport = " +
//                           aPositionReport);
      if (aPositionReport != null) {

        java.util.Date now = new java.util.Date();
        if (lastReceived == null)
            lastReceived = now;

        if ((now.getTime() - lastReceived.getTime()) > 100000L) {
            counter = 1;
        } else {
            counter++;

        }
        System.out.println(" OpenPositionControl counter  " + counter);
//        textField.setText("" + counter);
        lastReceived = now;
    }
    }
}

Open in new window

OpenPositionControl bl0 = false
client: close positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='No close positions in response', mFXCMRequestRejectReason=2, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-12', mPosReqResult=PosReqResult:No positions found that match criteria (2), mPosReqStatus=PosReqStatus:Rejected (2), mText='No trades in response', mTotalNumPosReports=0, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='0', mMakingTime=1299878139315}
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-16', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878142863}
OpenPositionControl bl0 = false
 OpenPositionControl counter  27
 OpenPositionControl counter  28
 OpenPositionControl counter  29
 OpenPositionControl counter  30
 OpenPositionControl counter  31
 OpenPositionControl counter  32
 OpenPositionControl counter  33
 OpenPositionControl counter  34
 OpenPositionControl counter  35
 OpenPositionControl counter  36
 OpenPositionControl counter  37
 OpenPositionControl counter  38
 OpenPositionControl counter  39
 OpenPositionControl counter  40
 OpenPositionControl counter  41
 OpenPositionControl counter  42
 OpenPositionControl counter  43
 OpenPositionControl counter  44
 OpenPositionControl counter  45
 OpenPositionControl counter  46
 OpenPositionControl counter  47
 OpenPositionControl counter  48
 OpenPositionControl counter  49
 OpenPositionControl counter  50
 OpenPositionControl counter  51
 OpenPositionControl counter  52
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-69', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878144021}
OpenPositionControl bl0 = false
 OpenPositionControl counter  53
 OpenPositionControl counter  54
 OpenPositionControl counter  55
 OpenPositionControl counter  56
 OpenPositionControl counter  57
 OpenPositionControl counter  58
 OpenPositionControl counter  59
 OpenPositionControl counter  60
 OpenPositionControl counter  61
 OpenPositionControl counter  62
 OpenPositionControl counter  63
 OpenPositionControl counter  64
 OpenPositionControl counter  65
 OpenPositionControl counter  66
 OpenPositionControl counter  67
 OpenPositionControl counter  68
 OpenPositionControl counter  69
 OpenPositionControl counter  70
 OpenPositionControl counter  71
 OpenPositionControl counter  72
 OpenPositionControl counter  73
 OpenPositionControl counter  74
 OpenPositionControl counter  75
 OpenPositionControl counter  76
 OpenPositionControl counter  77
 OpenPositionControl counter  78
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-71', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878145516}
OpenPositionControl bl0 = false
 OpenPositionControl counter  79
 OpenPositionControl counter  80
 OpenPositionControl counter  81
 OpenPositionControl counter  82
 OpenPositionControl counter  83
 OpenPositionControl counter  84
 OpenPositionControl counter  85
 OpenPositionControl counter  86
 OpenPositionControl counter  87
 OpenPositionControl counter  88
 OpenPositionControl counter  89
 OpenPositionControl counter  90
 OpenPositionControl counter  91
 OpenPositionControl counter  92
 OpenPositionControl counter  93
 OpenPositionControl counter  94
 OpenPositionControl counter  95
 OpenPositionControl counter  96
 OpenPositionControl counter  97
 OpenPositionControl counter  98
 OpenPositionControl counter  99
 OpenPositionControl counter  100
 OpenPositionControl counter  101
 OpenPositionControl counter  102
 OpenPositionControl counter  103
 OpenPositionControl counter  104
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-125', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878147032}
OpenPositionControl bl0 = false
 OpenPositionControl counter  105
 OpenPositionControl counter  106
 OpenPositionControl counter  107
 OpenPositionControl counter  108
 OpenPositionControl counter  109
 OpenPositionControl counter  110
 OpenPositionControl counter  111
 OpenPositionControl counter  112
 OpenPositionControl counter  113
 OpenPositionControl counter  114
 OpenPositionControl counter  115
 OpenPositionControl counter  116
 OpenPositionControl counter  117
 OpenPositionControl counter  118
 OpenPositionControl counter  119
 OpenPositionControl counter  120
 OpenPositionControl counter  121
 OpenPositionControl counter  122
 OpenPositionControl counter  123
 OpenPositionControl counter  124
 OpenPositionControl counter  125
 OpenPositionControl counter  126
 OpenPositionControl counter  127
 OpenPositionControl counter  128
 OpenPositionControl counter  129
 OpenPositionControl counter  130
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-179', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878148523}
OpenPositionControl bl0 = false
 OpenPositionControl counter  131
 OpenPositionControl counter  132
 OpenPositionControl counter  133
 OpenPositionControl counter  134
 OpenPositionControl counter  135
 OpenPositionControl counter  136
 OpenPositionControl counter  137
 OpenPositionControl counter  138
 OpenPositionControl counter  139
 OpenPositionControl counter  140
 OpenPositionControl counter  141
 OpenPositionControl counter  142
 OpenPositionControl counter  143
 OpenPositionControl counter  144
 OpenPositionControl counter  145
 OpenPositionControl counter  146
 OpenPositionControl counter  147
 OpenPositionControl counter  148
 OpenPositionControl counter  149
 OpenPositionControl counter  150
 OpenPositionControl counter  151
 OpenPositionControl counter  152
 OpenPositionControl counter  153
 OpenPositionControl counter  154
 OpenPositionControl counter  155
 OpenPositionControl counter  156
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-233', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878150034}
OpenPositionControl bl0 = false
 OpenPositionControl counter  157
 OpenPositionControl counter  158
 OpenPositionControl counter  159
 OpenPositionControl counter  160
 OpenPositionControl counter  161
 OpenPositionControl counter  162
 OpenPositionControl counter  163
 OpenPositionControl counter  164
 OpenPositionControl counter  165
 OpenPositionControl counter  166
 OpenPositionControl counter  167
 OpenPositionControl counter  168
 OpenPositionControl counter  169
 OpenPositionControl counter  170
 OpenPositionControl counter  171
 OpenPositionControl counter  172
 OpenPositionControl counter  173
 OpenPositionControl counter  174
 OpenPositionControl counter  175
 OpenPositionControl counter  176
 OpenPositionControl counter  177
 OpenPositionControl counter  178
 OpenPositionControl counter  179
 OpenPositionControl counter  180
 OpenPositionControl counter  181
 OpenPositionControl counter  182
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-287', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878151535}
OpenPositionControl bl0 = false
 OpenPositionControl counter  183
 OpenPositionControl counter  184
 OpenPositionControl counter  185
 OpenPositionControl counter  186
 OpenPositionControl counter  187
 OpenPositionControl counter  188
 OpenPositionControl counter  189
 OpenPositionControl counter  190
 OpenPositionControl counter  191
 OpenPositionControl counter  192
 OpenPositionControl counter  193
 OpenPositionControl counter  194
 OpenPositionControl counter  195
 OpenPositionControl counter  196
 OpenPositionControl counter  197
 OpenPositionControl counter  198
 OpenPositionControl counter  199
 OpenPositionControl counter  200
 OpenPositionControl counter  201
 OpenPositionControl counter  202
 OpenPositionControl counter  203
 OpenPositionControl counter  204
 OpenPositionControl counter  205
 OpenPositionControl counter  206
 OpenPositionControl counter  207
 OpenPositionControl counter  208
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-341', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878152898}
OpenPositionControl bl0 = false
 OpenPositionControl counter  209
 OpenPositionControl counter  210
 OpenPositionControl counter  211
 OpenPositionControl counter  212
 OpenPositionControl counter  213
 OpenPositionControl counter  214
 OpenPositionControl counter  215
 OpenPositionControl counter  216
 OpenPositionControl counter  217
 OpenPositionControl counter  218
 OpenPositionControl counter  219
 OpenPositionControl counter  220
 OpenPositionControl counter  221
 OpenPositionControl counter  222
 OpenPositionControl counter  223
 OpenPositionControl counter  224
 OpenPositionControl counter  225
 OpenPositionControl counter  226
 OpenPositionControl counter  227
 OpenPositionControl counter  228
 OpenPositionControl counter  229
 OpenPositionControl counter  230
 OpenPositionControl counter  231
 OpenPositionControl counter  232
 OpenPositionControl counter  233
 OpenPositionControl counter  234
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_zfWdMNF17Ze3UGxV99mi9SSMYADHLUbWjQTf0KHhEvIOqcXtQiajy7-395', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1299878154502}
OpenPositionControl bl0 = false
 OpenPositionControl counter  235
 OpenPositionControl counter  236
 OpenPositionControl counter  237
 OpenPositionControl counter  238
 OpenPositionControl counter  239
 OpenPositionControl counter  240
 OpenPositionControl counter  241
 OpenPositionControl counter  242
 OpenPositionControl counter  243
 OpenPositionContr

Open in new window

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:gbcbr
Comment Utility
@for_yan
Any Idea how to reset it to zero?
0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
Add now.getTime() and lastReceived.getTime() to the printout along with the counter
0
 

Author Comment

by:gbcbr
Comment Utility
It's not a time at all, why?
OpenPositionControl counter  279
 OpenPositionControl now.getTime()  1300004826987
 OpenPositionControl lastReceived.getTime()  1300004826986
 OpenPositionControl counter  280
 OpenPositionControl now.getTime()  1300004826987
 OpenPositionControl lastReceived.getTime()  1300004826987

Open in new window

0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
It is a long number - number of milliseconds since Jan 1, 1970
It will reset after som substantial interval - print more of it so that we see if there
is an interval of 100000 (100 sec)

 
0
 

Author Comment

by:gbcbr
Comment Utility
5 minutes the same picture
OpenPositionControl counter  5271
 OpenPositionControl now.getTime()  1300006132701
 OpenPositionControl lastReceived.getTime()  1300006132701
 OpenPositionControl counter  5272
 OpenPositionControl now.getTime()  1300006132701
 OpenPositionControl lastReceived.getTime()  1300006132701
 OpenPositionControl counter  5273
 OpenPositionControl now.getTime()  1300006132701
 OpenPositionControl lastReceived.getTime()  1300006132701

Open in new window

0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
That is really strange.


Add printout immediately after:


java.util.Date now = new java.util.Date();
System.out.println("now: " + now.toString());


java.util.Date now = new java.util.Date(); <--- should be getting each time system time; this time should be increasing

 



0
 

Author Comment

by:gbcbr
Comment Utility
I's OK
now: Sun Mar 13 11:16:21 EET 2011
 OpenPositionControl counter  151
 OpenPositionControl now.getTime()  1300007781643
 OpenPositionControl lastReceived.getTime()  1300007781643

Open in new window

0
 

Author Comment

by:gbcbr
Comment Utility
This works:
public void openPositionControl(PositionReport aPositionReport) {

        java.util.Date now = new java.util.Date();
        System.out.println("now: " + now.toString());

        if (aPositionReport != null) {
             
            if (lastReceived == null)
                lastReceived = now;

            if ((now.getTime() - lastReceived.getTime()) > 100L) {
                counter = 1;
            } else {
                counter++;
            }
            
            System.out.println(" OpenPositionControl counter  " + counter);
            System.out.println(" OpenPositionControl now: " + now.toString());
            System.out.println(" OpenPositionControl now.getTime()  " + now.getTime());
            System.out.println(" OpenPositionControl lastReceived  " + lastReceived);
            System.out.println(" OpenPositionControl lastReceived.getTime()  " +lastReceived.getTime());
            //        textField.setText("" + counter);
            lastReceived = now;
        }
    }

Open in new window

now: Sun Mar 13 11:32:56 EET 2011
 OpenPositionControl counter  26
 OpenPositionControl now: Sun Mar 13 11:32:56 EET 2011
 OpenPositionControl now.getTime()  1300008776206
 OpenPositionControl lastReceived  Sun Mar 13 11:32:56 EET 2011
 OpenPositionControl lastReceived.getTime()  1300008776206
DBFX open positions = RequestForPositionsAck{mAccount='all', mFXCMErrorDetails='null', mFXCMRequestRejectReason=-1, mParties=Parties [Party:3:D:FXCM ID();], mPosReqID='DB_U100D1_6bYChgcZHPZE1epJaHgophF5bMoFaxeocqejRR7TkgmDO2smQDhgTH-871', mPosReqResult=PosReqResult:Valid Request (0), mPosReqStatus=PosReqStatus:Completed (0), mText='null', mTotalNumPosReports=26, mTradingSessionID='FXCM', mTradingSessionSubID='DBFXUSDD1', mPosMaintRptID='541484206', mMakingTime=1300008777711}
OpenPositionControl bl0 = false
now: Sun Mar 13 11:32:57 EET 2011
 OpenPositionControl counter  1
 OpenPositionControl now: Sun Mar 13 11:32:57 EET 2011
 OpenPositionControl now.getTime()  1300008777712
 OpenPositionControl lastReceived  Sun Mar 13 11:32:56 EET 2011
 OpenPositionControl lastReceived.getTime()  1300008776206

Open in new window

It was too big interval
0
 

Author Comment

by:gbcbr
Comment Utility
Just small clarification, how to get last value of counter before resetting?
0
 
LVL 47

Expert Comment

by:for_yan
Comment Utility
If you want to see its value, then make a printout of counter just before its resetting (counter = 1)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
noX challenge 17 75
endX challenge 2 47
What is JNDI datasource in spring 1 36
Modeling a class in java 5 31
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now