Beginner's Guide to MultiCharts Programming: Difference between revisions
From MultiCharts
Beginner's Guide to MultiCharts Programming (view source)
Revision as of 10:03, 27 January 2012
, 27 January 2012→Layout
(→Layout) |
|||
Line 3: | Line 3: | ||
== Layout == | == Layout == | ||
Some tips regarding the layout of a coding script. | Some tips regarding the layout of a coding script. | ||
=== General layout tips === | |||
Some general layout tips are: | |||
* Use tabs and empty lines to make the code better readable - don't forget: if you want to edit your script a half-year from now, you'll still need to be able to comprehend it. | |||
* Make use of comments. | |||
* While it isn't needed in EasyLanguage to use parentheses ( & ) after an 'if' statement, it makes the code better readable and prevents errors. | |||
* Make your code explicit. For example, instead of writing ''if LastBarOnChart then'' write ''if (LastBarOnChart = True) then''. While both statements work, the latter makes it easier to debug and makes the implicit assumptions you're making explicit. | |||
=== Description === | === Description === |