Returns the maximum value contained in an array.
Syntax:
1 |
ArrayMax($MyArray) |
Returns the maximum value contained in an array.
Syntax:
1 |
ArrayMax($MyArray) |
Returns the minimal value contained in an array.
1 |
ArrayMin($MyArray) |
Return the number of bars since the beginning of data loaded (in a chart in the case of a ProBuilder indicator of for a trading system in the case of ProBacktest or ProOrder)
Syntax:
1 |
BarIndex |
Instruction forcing the exit of “FOR” loop or “WHILE” loop.
Syntax:
1 |
BREAK |
Example:
1 2 3 4 5 6 7 8 9 10 |
Value = 0 FOR i = 1 TO 20 DO IF (Close[i] < Open[i]) THEN Value = Value + 1 ELSE BREAK //we are exiting the 'FOR NEXT' loop here ENDIF NEXT RETURN Value |
Purpose of this instruction is to avoid computer memory consumption by limiting the bars quantity use in indicator calculation.
This parameter increases the speed at which an indicator will be calculated by defining the number of bars that will present the result.
Syntax :
1 |
DEFPARAM CalculateOnLastBars = 200 |
“CALL” is an instruction made for calling value of user indicator. Add under brackets as many parameters the personal indicator have.
Syntax:
1 |
myValue = CALL "myIndicator"[parameter1,parameter2] |
If the personal indicator returns more than one value from its RETURN instruction, the CALL function should be coded like this:
(case of an indicator that return 3 values)
1 |
myValue1, myValue2, myValue3 = CALL "myIndicator"[parameter1,parameter2] |
3 variables are set from the the 3 returns variables of the custom indicator “myIndicator”.
Create a background color only between two values. (more…)