I have spent many hundreds of hours now, fiddling around with Quantconnect and have nothing but praise for the effort they have made. 

Debugging with the online version of Lean is far from satisfactory - I like to loop through the underlying back test code, but of course you always have the option of buying your own data and downloading Lean. My two other "complaints" are the logging allowance and the ability to run only a limited number of back tests at any one time. Both of these problems can be ameliorated by taking out a paying subscription.

I have spent many happy hours in the futile endeavour of seeking algorithmic profitability from penny stocks. I will write an article on the matter and repost it here.  I may well be missing crucial rules - perhaps even an exploration of SEC filings would help. But currently, the prospects do not look attractive.

The answer of course is to be an illegal insider. One who organises the pump and benefits from it by shafting investors. Others profit handsomely by their marketing tactics - suckering in punters who subscribe to useless trading rooms and buy crappy videos at exorbitant prices. 

The purpose of this post however is not to whine at my futile endeavours but to give something back for the excellent free resources I have enjoyed.

I am sure there will be many things I have got wrong but if nothing else, the attched code may enlighten some on the way, or ways, to place orders for intraday trading.

Some may also find use in considering the way I have coded a system designed to use raw data. They will realise that the use of raw data is essential for trading penny stocks where the endless reverse splits make portfolio management impossible using back adjusted data.

I have no doubt whatsoever that changes would need making in the light of paper and live trading experience of this system, but I have not taken matters that far.

Perhaps others on the forum might like to adapt and improve my code - who knows, they may even find profit.