EA(basic): what is core? trading systems? trading criteria? values parameters? framework?

 
Hit at all,

I'm studying a simple EA taken from the example: Simple Expert Advisor https://book.mql4.com/samples/expert.

I wrote the code from scratch (for a better understanding), following the same procedure of the framework,
the same trading systems, same trading criteria, values parameter etc. etc.

I'm still continuing to study and improve the code,
I hoped I had reached a point enough to put it in a bit of backTesting and see results,
but I get bad results


What do you suggest me to better it?

what is core of a EA profitable ???

trading systems / trading strument ?

trading criteria ?

values parameters ?

framework ?


Thanks a lot to everyone in advance, of your time and your skills