template starting point

 
I wish to write a system and aim to enter into next years contest for autotrading.


Can you recommend a starting template, something that takes into account the competition rules, something that is well structured and has error catching and logging and double checks open positions and counts etc..

I aim to ensure the logic is safest as possible.
ie. I was thinking that one problem could be taking a signal on the periods bar and not retesting price until the next bar.
i.e. the system needs to monitor price relative to entry and signals, say at 5 second intervals.
Reason: