Hit in Any Way,

I'm Analyzing a simple EA taken from the example: Simple Expert Advisor https://book.mql4.com/samples/expert.
I wrote the code from scratch (to get a better understanding), following the same process of this framework,
the same trading egies, same trading standards, values parameter etc. etc..
I am still continuing to study and improve the code,
I hoped I had reached a stage to set it in a little bit of backTesting and see results,
but that I get poor outcomes

What do you suggest me to better it?

What's core of a EA profitable???

Trading egies / trading strument?
Trading standards?
values parameters ?
Framework?

Thanks a lot to everyone Beforehand, of your time and your abilities