# ProRealTime v11 – new instructions and improvements in calculation speed

Hi, a while ago that I did not write any articles about programming and the release of ProRealTime version 11 is an important opportunity to remember all the many improvements that come with it for programming!

Before talking about the new instructions related to prorealtime indicators, I wanted to share with you a particular and very important addition that will allow us to limit indicator loading times.
This is the new instruction “IsLastBarUpdate“. This keyword returns a boolean equal to ‘true’ as soon as the last candle in the chart has changed.

What is the use ? It’s pretty simple, in case you only do calculations from the last candle on your chart (case of loops in the past in particular), it is totally useless to make them on all the candles of the history! In version 10.3 we were obliged to do so and considerably increase the loading and calculation times of the ‘indicator in prorealtime.

Example in this video: on the left the indicator calculates the levels of supports and resistances on thousands of bars using a loop with the addition of the condition to do it only from the last candle of the history, on the right side, we use the old way, as you can see, it’s amazing! Now the calculations are instantaneous!

So you just have to embed your codes in a condition related to “IsLastBarUpdate”, like this:

Definition of the instruction:
islastbarupdate:
This function returns 1 on candlesticks updated in real-time (or the last candlestick on a closed instrument, otherwise it returns 0.
We have a backtest, this function returrns 1 starting at the date the backtest was started. It is equal to 0 on the historical data preloaded by the backtest (PreLoadBars).

## New graphical instruction: DRAW RAY

We can now draw segments that extend, on the right or on the left with DRAWRAY.
Example:

Definition of the instruction:
drawray:
Draws a ray on the chart.
Example: DRAWRAY (x1, y1, x2, y2) COLOURED (R, V, B, a)

## Styles of ProRealTime graphical instructions

All prorealtime graphical instructions now have the ability to be styled, as you could already do for variables in a RETURN statement, ie now you can draw on your graph a triangle colored in blue with thick edges and red dotted!
Example:

All available graphical instructions can be found in our online documentation: ProRealTime graphical instructions

## New mathematical instructions

New rounding functions down (floor) and up (ceil).
floor:
Largest value that is equal to or lower to the argument Example use: Floor (a)

ceil:
Smallest value that is greater than or equal to the argument Example of use: CEIL (a)

Example:

floor(109.45697) returns “109” , while ceil(109.45697) returns “110”.

All available mathematical instructions for ProBuilder language can be found here, in our online prorealtime documentation: Mathematical keywords for programming

1. • 11/13/2019 #

But the Indicator seems very interesting.
What is the name of Indicator (Green-Red Lines) in video? Thx

• • 11/13/2019 #

No names in particular, it is just a quick example of a code showing the most recent highs/lows with loops.

2. • 11/13/2019 #

bonjour Nicolas,
pour la fonction floor, comment pouvons nous utiliser l’option digital indiqué dans le glossaire :”floor (a,digit) ?
J’essaie d’arrondir mes résultats à 2 chiffres après la virgule. Probuilder refuse quant j’écris : floor(a,2). Il ne comprend pas la virgule et 2 , pourtant c’est ce qui est indiqué dans le glossaire. A étant un paramètre de calcul.
Pouvez vous m’aider par un exemple d’utilisation ?
Merci

• • 11/13/2019 #

L’instruction var=floor(a,2), devrait fonctionner correctement sous PRT v11 pourtant.

3. • 11/13/2019 #

Hi Nicolas, do you know when is V11 being released? Thanks.

4. • 334 days ago #

Thanks

5. • 261 days ago #

As an IG customer, I wait with anticipation to start using v11. Is there any way I could start testing it already now?

• • 261 days ago #

6. • 137 days ago #

bonjour nicolas as tu un robot de trading?

bien a toi

xavier

7. • 12 days ago #

Hi Nicolas thank you for this post, Is the speed increase with “IsLastBarUpdate” still the case with the latest version of v11 as I’ve found backtesting seems quicker in v10.3 when I’m putting trading strategies together? Maybe missing this out of my code is where I’ve been going wrong.

Register or

Top