Greetings,

I have checked in to branch = "historical", an experimental historical
indicator support.  It works with existing Indicator functionality, so this
means it appears on your graphs, can be optimized with params, just like
other indicators.  I included a SampleHistorical Strategy.

This is not by any means stable or final code, it lacks many features and
still needs some cleanup:

Current limitations:

1.  Requires a specific file to be included in the ./historical directory.
2.  This file is not updated by the system in real-time, this means it is
mostly working for backtesting and optimization, not real trading yet.
So, more code is needed to maintain the historical files at runtime.
3.  The current historical file i tested with is created by a Unit test I
wrote, which converts jbooktrader data files into daily summaries.  It is
also not that smart, it doesn't respect trading hours, and doesn't inspect
ordering.
4.  I actually would like to have IB update the file, if the user doesn't
have such historical quote data.  I implemented the manual file method
first, mostly because it is what peopled seemed to want first.

I wrote an EMA indicator for it, and I must say it IS harder to get right,
as you must be aware of the current marketSnapshot date, and how it impacts
the validity of your EMA.  This includes grabbing next samples on day
boundaries, and even if you have enough samples to have a stable indicator.
 I think some of this logic could be simplified into a Base class as an
improvement.

Mostly, I put this code out there to see if the overall use-case is worth
it.  Fixing all these limitations and issues is only worth it if people
want to use it.  I'm currently running optimizations with it, to see if it
is worth my time to actually continue.

I'm not done, but I'm seeking opinions on high-level structure and overall
need for this feature.  So, if you like, please review the branch.  If you
need help setting up a test, let me know.  Perhaps I forgot to check-in
something that would help you.

Marcus

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.

Reply via email to