Newbie with some problems writing EA, please help

 

hi guys, I'm a newbie with no programming background. I start to self learn writing EA by reading other free EA online and also the Help Manuel in the EA editor. The progress is ok so fair. However, some times I face some fundamental problems that I can't understand. I hope that u guys can help me with them. Thanks.


1. The difference between Start(), OnStart(), OnTick()

    I looked them up in the Manuel but I still can't comprehend the true meaning of each. What is the appropriate situation to use each of them? Do they make the EA run differently ?And what is the consequence if I mix them up?


2. for (cnt=0,cnt<ordertotal(),cnt++) // for(cnt=Ordertotal()-1,cnt>=0,cnt--)

   I've seen both of them within a EA, used to scan and select orders.However I don't understand what is the difference between scanning the order from the older to newer and from the newer to older. When I'm writing my own EA, it gives me wrong result when I used the opposite one. But I thought they should be worked In the same way?

3. The execution order of EA

      If I write Some codes inside int Start(), does the EA runs the code line by line from the top to the bottom? Or the EA runs all the code at the same time?


lastly, god knows that i can't ask every question here. Do u guys have any online resource recommend for a newbie like me to learn writing EA?

Thanks for any response and sorry for my bad English. 

Reason: