new instructions added into PRT version 11, yesterday:
Array instructions (see dedicated topic for examples/how to use this new type of variables: array variables availability in ProRealTime: examples and discussions
ArrayMax:Returns the highest value defined in an array
ArrayMin:Returns the lowest value defined in an array
IsSet: Returns 1 if the index of the array has already been set in the code,otherwise returns 0.
Example: ISSET($MyArray[Index])
LastSet: Returns the last index of the array defined by the code.If no index was previously defined, the function returns -1.
Example: LASTSET($Array)
New graphical instruction: DRAWPOINT
Draws a point on the chart.
Example: DRAWPOINT (x,y,size) COLOURED (R,V,B,a) BORDERCOLOR (R,V,B,a)
Draw in the future of the chart (at the right of price chart) with coordinates in 2 different format (you choose):
- BARINDEX+x (where x is the quantity of bars to add to the current barindex)
- DateToBarIndex (new instruction to convert a date into a BARINDEX number):
DateToBarIndex: Allows to set an absciss with a datetime instead of a candlestick barindex for Drawing commands. Accepted formats for date are YYYY / YYYYMM / YYYYMMDD / YYYYMMDDHH / YYYYMMDDHHMM / YYYYMMDDHHMMSS
Example: DRAWTEXT(“text”, DateToBarindex(20200101), close)
Round, Floor and Ceil digits precision:
Added a second optional parameter for the round, floor and ceil functions allowing rounding to the decimal desired by the client (0 by default).
Stochastic and StochasticD extended syntax and capabilities:
Added two optional parameters in the stochastic formulas: Stochastic[N,K](price1,price2,price3) , StochasticD[N,K](price1,price2,price3)
“price1”, “price2” and “price3” are optional. By default the stochastic will be calculated with Close on the High/Low scale (same as the internal platform indicator). But you can adjust it with any other price or data series (e.g. Stochastic[N,K](close,close,close) or Stochastic[N,K](var1,var2,var3) )