RaptorUK:
It's down to personal preference and what is more readable for you . . . I'm pretty sure that most spaces and all comments are removed during compilation.
That's what I thought, but I like getting confirmation before I have too much code that might be inefficient.
It's down to personal preference and what is more readable for you . . . I'm pretty sure that most spaces and all comments are removed during compilation.
FoxGuy:
That's what I thought, but I like getting confirmation before I have too much code that might be inefficient.
That's what I thought, but I like getting confirmation before I have too much code that might be inefficient.
Of course . . . one other thing that helps readability is using variable names that make logical sense . . if often means you can reduce, not eliminate, comments. Try not to use negatives in your variable names . .
For example, DontTradeNow = false; means trade now ! TradeNow = false; and TradeNow = true; seem to be more readable to me.
RaptorUK:
Works for me.
Of course . . . one other thing that helps readability is using variable names that make logical sense . . if often means you can reduce, not eliminate, comments. Try not to use negatives in your variable names . .
For example, DontTradeNow = false; means trade now ! TradeNow = false; and TradeNow = true; seem to be more readable to me.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm just learning MT4 and modifying an Indicator from someone else.
I notice that the original author eliminated an awful lot of spaces. Specifically he used
I think that putting the spaces in makes it easier to read and debug.
I recognize that maybe the compiled file might be smaller with all the spaces removed, but I can't imagine that it makes a difference in the speed when it runs.
Is there any advantage to removing all the spaces?
I also prefer to put a test and action on 2 lines instead of 1 for readability. Is there any advantage to putting them on 1 line?