Profile Picture

BorkerPlugin : order fill for forex raise error

Posted By gbulle 9 Years Ago
Posted Tuesday May 05 2009

my PC is setted as USA (date,currency etc)

the symbol is defined as FOREX (mid as option for bars)

just wanting to send a fill  from my brokerplugin to my trading system;

as soon as i receive a fill from my broker to communicate the fills to RightEdge  I do this :

Dim my_order As BrokerOrder

If openOrders.ContainsKey(vet_a(1)) Then

my_order = openOrders.Item(vet_a(1))

Dim my_fills As New Fill()

my_fills.FillDateTime = New Date()

my_fills.Price = New Price(CType(vet_a(2), Double), CType(vet_a(2), Double)) 'prezzo

my_fills.Quantity = CType(vet_a(3), UInt64) 'Qty filled


my_order.OrderState = BrokerOrderState.Filled

RaiseEvent MyOrderUpdated(my_order, my_fills, "FILLED")

End If

(where vet_a are data arriving from my brokers)

after this call appear:

An exception of type System.ArgumentOutOfRangeException was thrown.
The added or subtracted value results in an un-representable DateTime.
Parameter name: value
   at System.DateTime.AddTicks(Int64 value)
   at System.DateTime.Add(Double value, Int32 scale)
   at RightEdge.Common.ForexInterestCalculator.UpdateTime(DateTime currentTime)
   at RightEdge.Common.PositionManager.UpdateTime(DateTime newTime)
   at RightEdge.Common.PositionManager.broker_OrderUpdated(BrokerOrder brokerOrder, Fill fill, String information)
   at RightEdge.Shared.BrokerWrapper.<>c__DisplayClass3.<broker_orderUpdated>b__0(Object )
   at RightEdge.Shared.CallbackStub.DoCallback()

It appera that Rightedge is doiung calculation about forex interest rate.

What I have to do?




Posted Tuesday May 05 2009
You do a New Date() but never assign anything to it. What is the value of that date?
Posted Tuesday May 05 2009
Sorry... obvious....

Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems