Help regarding AFL functions...

Hai i am new to AFL. I need to know the meaning of the parameters for param and rsi functions. For param function what is "default value" and "min & max" parameters. What is the meaning of "period" parameter in RSI function. If possible would anyone please guide me to the resource where i can find detailed explanation about AFL functions.
 
Quote from ashok.iy:

Hai i am new to AFL. I need to know the meaning of the parameters for param and rsi functions. For param function what is "default value" and "min & max" parameters. What is the meaning of "period" parameter in RSI function. If possible would anyone please guide me to the resource where i can find detailed explanation about AFL functions.

Simply read the manual, it's all there. default value is the first value being used when function is applied on chart or exploration or backtest or scan or optimization. min and max is the range of values you can set to choose from.

For example

periodRSI = param("Period RSI", 14, 10, 100, 1);

above one is the paramter function for param window. 14 is the default value. 10 and 100 are min and max values and 1 is the step. So you can choose a RSI peridod in steps of 1 from 10 to 100. Is that understood? Well, it's pretty easy.


then you write the following for your RSI:

myRSI = RSIa(C, periodRSI);

If you wanna plot it

plot(myRSI, "RSI(" + periodRSI + ")", colorRed, styleline);
plotGrid(50, colorlightGrey);
plotGrid(30, colorGreen);
plotGrid(70, colorRed);
 
Thanks Putin.
Please clarify the below doubts also.
what are the possible values of periodRSI?
Can i access the individual array element in myrsi.
 
Re-read what I have written above and look at the code and you will understand. Apply the code on a chart and you will understand it even more clearly. Also read the manual to understand what all Param functions do mean in detail.
 
Quote from ashok.iy:


Can i access the individual array element in myrsi.

Use Paramfield for that

PARAMFIELD
- creates price field parameter Exploration / Indicators
(AFL 2.70)


SYNTAX ParamField(''name'', field = 3 )
RETURNS ARRAY
FUNCTION Allows to pick the Price field for the indicator (field which is used to calculate values of the indicator). Function returns the array defined by field parameter. Default value = 3 returns Close array. The possible values of field parameter are:
-1 - ParamField returns the values of the indicator that was inserted as a first one into the pane, or Close if no indicator was present
0 - returns Open array
1 - returns High array
2 - returns Low array
3 - returns Close array (default)
4 - returns Average array = (H+L+C)/3
5 - returns Volume array
6 - returns Open Interest array
7,8,9,.... - return values of indicators inserted into the pane.

array = ParamField("Choose Array", 3);

myRSI = RSIa(array, periodRSI);
 
Back
Top