_SECTION_BEGIN("Price");
Plot( Close, "Close", ParamColor("Color", colorGold), ParamStyle("Style", styleCandle, maskAll));
_SECTION_END();
Today, we will learn how to write comments in the code. It's simple. We can write comments by two ways :
(1) Single line comments that starts with //
//It's single line comments
(2) Multi line comments that starts with /* and end with */
/*It's a
multi line
comments*/
Why we use comments? Is it necessary? It's depend on you. You can complete a full afl code without comments. It has no programming value. Usually, I use comments to
=> describe the code so that after 5 years I can understand why I used this code.
=> block code.
Let's see a practical example :
/*
-------------------------------
I've written this Code for the
purpose of my blog writing.
Date : December 16, 2011
-------------------------------
*/
_SECTION_BEGIN("Price");
//The below line code is not active
//Plot( Close, "Close", ParamColor("Color", colorGold), styleBar);
//The below code will display the price through candlesticks
Plot( Close, "Close", ParamColor("Color", colorGold), ParamStyle("Style", styleCandle, maskAll));
_SECTION_END();
Allah Hafiz.
No comments:
Post a Comment