I recommend you to begin with the basics:
https://fxdreema.com/instructions/builder/constants-and-variables
https://fxdreema.com/instructions/builder/groups-and-magic-numbers
What you want is not an easy structure to create. If you begin with it, we will help you step by step. 
I tried for some time until I discovered that. Not a single backtest will be reliable anymore, believe me. I strongly recommend you to find an alternative for your EA.