I'm trying to decide what type of list method I should use to store patterns of volume/MFI sequences I'm seeing on an equity chart. I'm leaning more towards ArrayLists, but I'd like some perspective.
Here's what I'm attempting to do.
As the market moves through the day on a one minute chart, I'm having my strategy look for volume and MFI (Money Flow Index) patterns. Right now, whenever a one-minute volume bar goes over the 14 period moving average by more than 2 (i.e. the moving average of an example one minute bar is 50000, and volume is 115000), it registers a hit and increments a value.
What I'm thinking about doing is storing these patterns in a multi-dimensional array list and triggering buy/sell orders based on those patterns. So it would work something like this:
Start:
2x volume hit (Set the first value of the array to '2x')
Evaluate arraylist for pattern. If no pattern, no action.
3x volume hit (Set the second value of the array to '3x')
Evaluate.. If no pattern, no action and continue.
MFI hit (Set the third value of the array to 'MFI')
Evaluate. Pattern matches, and order executes.
Array either resets all stored values, or moves do a different dimension (Array[1][0]) to store a new pattern.
....
Rinse and repeat.
Make sense? I'd probably also add a date/time stamp to see when the pattern occurred if I were to store the dimensions in the array.
My biggest question is.. would a dataseries object be more appropriate for this?
Thanks in advance to any responses.
Yours,
Spider
Comment