Closes positions, cancels pending orders and prevents placement of additional orders before the time of day specified (in hours, minutes and seconds) in the user’s time zone.
Syntax:
1 |
Defparam FlatBefore = 073000 |
Closes positions, cancels pending orders and prevents placement of additional orders before the time of day specified (in hours, minutes and seconds) in the user’s time zone.
Syntax:
1 |
Defparam FlatBefore = 073000 |
Returns integer numeric value closest from below.
Syntax:
1 |
floor(var,digits) |
“digits” is optional. It is the number of digits after decimal point.
FOR loop (processes all the values with an ascending “TO” or a descending order “DOWNTO”)
Syntax:
1 |
FOR |
Example 1:
1 2 3 4 5 6 7 |
a = 0 FOR i = 10 TO 20 DO a = average[i](open) + a NEXT RETURN a AS "compound averages direction" |
Example 2:
Build a moving average fishnet (guppy) dynamically with 2 loops:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
defparam drawonlastbaronly=true defparam calculateonlastbars=100 //--- settings lookback = 50 //periods to plot firstPeriod = 1 //first moving average Period lastPeriod = 30 //last moving average Period //--- end of settings b = 1 for i = max(1,firstPeriod) to max(1,lastPeriod) do for a = 0 to lookback do drawsegment(barindex[a],average[i][a],barindex[a+1],average[i][a+1]) coloured(0,191,max(1,255-b)) next b = b+5 next return |
Return value for the ForceIndex technical indicator for the price selected.
This indicator need volume values.
Syntax:
1 |
ForceIndex(price) |
Calculation:
Force Index=(today’s close-yesterday’s close)*Volume.
Returns the FDI (Fractal Dimension Index) indicator value.
Syntax:
1 |
FractalDimensionIndex[period](price) |
Where:
Returns the current timeframe in seconds. (more…)
Instruction to display the historical values of ProBacktest variables on charts. It can be use many times on the same ProBacktest strategy, all values will be displayed on the same window chart.
Syntax :
1 |
GRAPH myvariable AS "my variable" |
GRAPH instructions can also be ‘coloured(R,G,B)’ like any other variable returned as a graphical object.
The GRAPHONPRICE instruction lets you display the values of variables you use in your ProBacktest program (“myvariable” in the example below) at the close of each bar on the price chart.
Syntax:
1 |
GRAPHONPRICE myvariable AS "my variable" |
High of the current bar or of the last N one.
Syntax:
1 |
High[N] |
Return the value of the highest price over a number of N bars of the defined price.
Syntax:
1 |
highest[N](price) |
Example:
1 2 3 4 5 6 7 |
if(High>Highest[10](close)) THEN bandH = High ELSE bandH = Highest[10](close) ENDIF RETURN bandH |