RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Did not have current price for [symbol] Expand / Collapse
Message
Posted 12/29/2009 11:43:37 Post #10363
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
The title of this post should have been: Did not have current price for [symbol]

During a simulation, I'm receiving a "Did not have current price for [symbol]" exception (see call stack below). There is obviously no data for that date/symbol but I thought the simulation would skip over a date that did not have data and use the next bar. I set synchronize bars to both true and false with the same results. Is there a setting that I'm overlooking?

Thanks, Duane


The service plugin PaperBroker.PaperTrader threw an exception of type RightEdge.Common.RightEdgeError
at RightEdge.Shared.ServiceWrapper.DoError(Exception e)
at RightEdge.Shared.BrokerWrapper.SimTick(Symbol symbol, TickData tick)
at RightEdge.Common.Internal.SystemRunner.ProcessTickInPaperBroker(Symbol symbol, TickData tick)
at RightEdge.Common.FrequencyManager.x3fd1cdb5e353e534()
at RightEdge.Common.FrequencyManager.xfc18b789d02886f4(DateTime xb21f13a9707ad954)
at RightEdge.Common.FrequencyManager.ProcessTick(Symbol symbol, TickData tick)
at RightEdge.Common.Internal.SystemRunner._tickGenerator_NewTick(Object sender, NewTickEventArgs e)
at RightEdge.Common.TickGenerator.ProcessBar(NewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBar(NewBarEventArgs newBars)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename, ServiceAppDomainFactory brokerFactoryFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData, ServiceAppDomainFactory brokerFactoryFactory, Func`2 dataStoreFactory)
at RightEdge.SystemProgress.InitAndRunSystem()

Inner Exception:
Did not have current price for NTLI
at RightEdge.Shared.SystemWrapper.b__0(Object sender, ExceptionEventArgs args)
at RightEdge.Shared.CallbackStub.DoCallback()
at RightEdge.Shared.MarshalledSynchronizationContext.Post(SendOrPostCallback d, Object state)
at RightEdge.Shared.BrokerWrapper.broker_orderUpdated(BrokerOrder order, Fill fill, String information)
at PaperBroker.PaperTrader.OnOrderUpdated(BrokerOrder order, Fill fill, String information)
at PaperBroker.PaperTrader.ProcessOrder(BrokerOrder order, Double bidPrice, Double askPrice, DateTime tickTime, Boolean bGap, Boolean bClose)
at PaperBroker.PaperTrader.SimTick(Symbol symbol, TickData tick)
at RightEdge.Shared.BrokerWrapper.SimTick(Symbol symbol, TickData tick)

Inner Exception:
Did not have current price for NTLI
at RightEdge.Common.SystemStatistics.OrderFilled(BarStatistic stats, TradeInfo trade, PositionInfo position, Double lastPrice, IAccountInfo accountInfo, Dictionary`2 positionValues)
at RightEdge.Common.SystemStatistics.OrderFilled(TradeInfo trade, PositionInfo position, Double lastPrice, IAccountInfo accountInfo)
at RightEdge.Common.BaseSystemHistory.OrderFilled(TradeInfo trade, PositionInfo pos, PositionState state)
at RightEdge.Common.BaseSystemHistory.positionManager_OrderFilled(Object sender, OrderFilledEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at RightEdge.Common.PositionManager.OnOrderFilled(Trade trade, Position position, PositionInfo brokerPosition)
at RightEdge.Common.PositionManager.PositionOrderFilled(PositionData pos, PositionState posState, BrokerOrder order, Fill fill, TradeType tradeType, String description, Boolean sendUpdate)
at RightEdge.Common.PositionManager.OnOrderFilled(BrokerOrder order, Fill fill, PositionData pos, PositionState posState, TradeOrder tradeOrder)
at RightEdge.Common.PositionManager.broker_OrderUpdated(BrokerOrder brokerOrder, Fill fill, String information)
at RightEdge.Shared.BrokerWrapper.<>c__DisplayClass3.b__0(Object )
at RightEdge.Shared.CallbackStub.DoCallback()
Posted 12/30/2009 02:24:54 Post #10372
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
This looks like a bug. You can probably avoid it by waiting to trade on a symbol until you've had enough ticks to construct a valid bar based on the bar construction. Ie, if the bar construction is Trades, wait until you have a trade tick, if it's Mid, then you need both a bid and an ask tick.

Let me know if this works.

Thanks,
Daniel
Posted 12/30/2009 13:01:03 Post #10375
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
Upon closer review, the data for several of the following dates 10/27, etc. have Open, High, and Low's == 0. Close is set to the Close of 10/26 == $38. I ran Bar Data checker but it did not catch this. Can the data checker be updated to catch this error? This could drastically alter performance results if trades are opened at $1 and closed at $38 for several bars...assuming an exception is not thrown for some reason. Or can the data checker code be made available to users so that a customized version (maybe a dll) could be easily executed?

Thanks, Duane
Posted 12/30/2009 14:17:25 Post #10377
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
I've modified the bar data checker to check for OHLC values of zero, infinity, or NaN. The checker isn't designed to be a plugin, and while it would be nice if it were it's pretty low on the priority list right now. If you want to use your own data checker logic, you can simply write a system that checks the data for you and outputs any issues.

Thanks,
Daniel
Posted 12/30/2009 17:43:03 Post #10385
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
I believe that will work. Thanks for making the changes. Other checks that would be helpful are H < O/C/L and L > O/C/H
Posted 3/17/2010 17:15:54 Post #11200
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Since the new release 2010 I got the same error message as above. This hasn't been the case with the prior version. Why is that? What do I need to change?



Did not have current price for NSTR
at RightEdge.Common.SystemStatistics.OrderFilled(BarStatistic stats, TradeInfo trade, PositionInfo position, Double lastPrice, IAccountInfo accountInfo, Dictionary`2 positionValues)
at RightEdge.Common.BaseSystemHistory.SimNewBar(NewBarEventArgs newBars)
at RightEdge.Common.Internal.SystemRunner.UpdateObjects(FrequencyNewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBarEvents(IEnumerable`1 eventList)
at RightEdge.Common.FrequencyManager.x2906e2ead14f9e00()
at RightEdge.Common.FrequencyManager.xfc18b789d02886f4(DateTime xb21f13a9707ad954)
at RightEdge.Common.Internal.SystemRunner._tickGenerator_NewBar(Object sender, NewBarEventArgs e)
at RightEdge.Common.TickGenerator.ProcessBar(NewBarEventArgs args)
at RightEdge.Common.Internal.SystemRunner.ProcessBar(NewBarEventArgs newBars)
at RightEdge.Shared.SystemWrapper.RunSystem(SystemData systemData, SharedSystemRunData runData, ServiceFactory brokerFactory)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.SystemWrapper.RunSystem(String filename, ServiceFactory brokerFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.Run(String filename, ServiceAppDomainFactory brokerFactoryFactory, PluginReference dataStore, SystemParameters systemParameterOverrides)
at RightEdge.Shared.TradingModuleWrapper.RunSystem(SharedSystemRunData systemRunData, ServiceAppDomainFactory brokerFactoryFactory, Func`2 dataStoreFactory)
at RightEdge.SystemProgress.InitAndRunSystem()
Posted 3/18/2010 11:09:36 Post #11204
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
Is there enough tick data to create a bar? What happens when you run the bar data checker? Did you try the other suggestions above? Also, what tick type are you using to determine a trade tick (bid, ask, last trade, etc)?
Posted 3/21/2010 12:45:59 Post #11219
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Thanks Bill... the bars checker seems to solve the problem! Just strange that I didn´t had to do that in the previous version...
Posted 3/28/2010 22:05:00 Post #11282
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
I've made a change so that the bars will be checked to make sure they are valid when running a simulation. So you would get an error message that would tell you which bar had a problem when running a system, instead of the "did not have current price" message, which doesn't help you much.

Thanks,
Daniel
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 3:24pm

2005-2007 © RightEdge Systems