Your incomplete code looks good at a first glance - you're definitely making progress. What's the problem with completing the code?

Be aware though that the parameter setup of this EA looks like heavy curve overfitting. So take any claims about the backtest performance with a grain of salt.