RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Bar Count Expand / Collapse
Message
Posted 4/15/2012 10:14:22 PM Post #14265
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
Does Bars.TotalCount work?

When I use it it always comes back with the current amount of bars in the system. If I do:

OutputMessage(Bars.TotalCount & " " & Bars.Count) it always has the same values.

I need to know the amount of bars in a series so I can exit stocks that have been delisted and aviod opening trades days before a stock gets delisted(normaly after a takeover)

Currently a trade will stay in the system for ever as no exit gets triggered after a takeover.


Posted 4/16/2012 2:09:32 AM Post #14267
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Unless you have set a MaxLookBack value, TotalCount will be the same as Count. TotalCount isn't the total number of bars that will be processed for the simulation, it is the total number that have been processed so far for this symbol. Count is the number of bars available in the series, and as such will never go over the MaxLookBack value.

For handling delisted stocks, I'd recommend creating a data file with the dates all the stocks are delisted. You can create one system to write this data file (in the Shutdown method you can look at the last bar date for each symbol), and then read the file from your other systems.

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, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 12:40pm

2005-2007 © RightEdge Systems