Identification of starting point for the synthesis of a protein
You seem to be interested in identifying potenital coding regions in a DNA sequence. These regions are called open reading frames (ORF) because they are open to translation.
As detailed in the linked Wikipedia article, an ORF usually starts with an ATG and ends with one of the stop codons (TAA, TGA or TAG in DNA space). However, there are many ORFs that are not translated at all, particularly short ones.
Since finding ORFs is an old and established task in bioinformatics there are many algorithms availabe to do this. I would suggest using such an existing tool because they often have additional features and bugfixes. There is a list in the link above.
Estimating the stability and likelihood of a particular amino acid sequence is much more complicated. There are many tools for protein structure prediction that may be worth having a look at.