how does it all hang together?

 
Hi there,

1. Can you explain the purpose and how to use SetIndexValue? I am looking at the sample SimpleMA script in MQL II user guide. By the way, does a user guide for MQL4 exist? where?

2. I'm failing to grasp the idea of how everything hangs together. Let me give you a simple example: If I wanted to create an automated trading system that monitors two EMA lines with different periods. When one crosses the other, I'd like to get in with a specified stop loss. For every new bar formed, I'd readjust the stop loss. When they crosss again, then I'd exit and at the same time put in a new order going the other way.

What components do I need to create? Custom Indicator, Expert Advisor, Script??? What are they and how they are triggered? Is it a case of creating custom indicators (if not available), and using them in scripts, which are called by Expert Advisors?

2a. I don't quite understand how expert advisors get triggered? I read somewhere where these advisors are attached to charts. So, can I have a system that can be executed on a daily chart and hourly chart for the same currency pair at the same time? Running simultaneously?

2b. When you are writing these scripts, do you have a mindset that it needs to loop around from top to bottom of code? OR is it triggered only when a new bar is finally formed. I guess you don't want the logic to kick in before the final bar is formed.

2c. Sorry for jumping the gun a bit. and asking you all sort of questions. Maybe someone can just answer at a high level how question 2 can be done in MT4.

3. What's the real difference between MT3 and MT4? Do we need to do it in MT4?

Thanks
Reason: