Thanks for you honest reply ...
Mind reading through the other bot I wrote:
https://bitsharestalk.org/index.php?topic=10131.msg132190#msg132190
Code:
https://github.com/xeroc/btsx_bots/blob/master/bots/market_balance.py
Not to sounds disparaging, but the theory (from wikipedia) sounds a little like voodoo, with terms like 'overweight' and 'underweight' used with no explanation of how you might arrive at these definitions.
In general, 'real' trading algorithms start by defining a model (or set of models) of the market they trade in, then they define a set of mapping functions used to approximate the behavior of the market. They use these mapping functions to help predict the future direction or behavior of the market given current estimates, submitting current data into their model to get a decent most probable outcome.
That way they don't suffer from the problem of lagging indicators, which you'll hear everyone complaining about in metatrader (which is a toy platform).
However, these 'real' trading algorithms are usually built by huge firms with 100s of PHDs in total secrecy. Every now and again, (when an algorithm stops being profitable) the firm will allow a paper to be written on the subject which you'll be able to google and read, implement and find it doesn't work, lol.
Cheers, Paul.