[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Omega EL dept says it can't be done, but...



PureBytes Links

Trading Reference Links

> Here's what I am trying to do: I want to load 500 days of a price
> series into an array and then manipulate it -- What I want is to be
> able to: 
> 1. load an entire price series into an array 
> 2. manipulate it 
> 3. mark the bars that meet the criteria 

The EL Dept is correct that you can't load in the *entire* chart.  
But is that what you want to do?  You couldn't do that in realtime.  
In realtime you're limited to what's happened already, so you can't 
load in the future bars.  (If you figure out a way to do that, I'm 
sure we'd all love to hear how you did it!!!  :-)

However, there's nothing to keep you from loading up the 500 days 
prior to the current date.  In EL you don't load it all up at once; 
instead, you load it up incrementally, bar by bar.  Store each bar's 
info in a slot of the array.  When you've got 500 bars of data, do 
your calculation.  When the next bar comes in, either shift the array 
elements by one so you can add in the new bar at the end, or use a 
circular-array technique to avoid the shifting.

This technique will duplicate, in history, the behavior you'd see if 
you ran it in realtime.  Which is probably what you want.

If not, you might be able to send the entire chart to a DLL and then 
operate on the entire chart's data for past dates.  I seriously 
question whether that's a smart thing to do, unless you're just 
trying to do some kind of abstract analysis as opposed to tradeable 
techniques.  And even then, I suspect you could probably do the same 
kinds of calculations with the incremental El approach.

> Ideally, I would like this same information to be available to
> another indicator that I can plot at the bottom of the chart. 

Once you've computed the info, you can use any of several global-vars 
products to share the info with another indicator.  Try 
http://www.investlabs.com, in particular 
http://www.investlabs.com/hashnumb.html

Gary