If you are more specific about the problem we can try to help you out. There is a lot of information about writing an indicator You can first take a look at one that is standard in MT4 and figure out how it works and then try to change it.
if you are truly new to coding - - then maybe start with creating an EA - not an indicator.
An indicator requires extra coding that an EA does not - - and so you will find success faster. while building and learning an EA - you can learn and see the differences required to construct an indicator.
The your version is what I recognize as the current indicator template. The lesson that you follow is out-of-date.
You are starting with an indicator. That will be a steep learning curve. As said by others, maybe you should start with an expert advisor. Or are you trying to do something specific?
What I want to ask, what are you functionally trying to accomplish or are you as said just learning to code with no specific end in mind?