array variables availability in ProRealTime – examples and discussions

Forums ProRealTime English forum ProBuilder support array variables availability in ProRealTime – examples and discussions

Viewing 15 posts - 121 through 135 (of 209 total)
  • #157702

    Hi nicholas. Any chance of adding an array learning video? I only just got used to using loops thanks to your helpful videos. It would nice to have an array section as well now that its available.

    1 user thanked author for this post.


    Is-it possible to use arrays in proorder?

    It seems I get a probacktest.error.parsing when I call an indicator with array computation.



    Using one of the original array examples as below, is it possible to extract values from within an array variable?

    To try and make it clearer what I mean, in the first line of the example below, would it be possible to extract ’10’ as the highest period being used? If so, how?

    Many thanks




    Compare if $var[0] is equal to highest[10]?



    1 user thanked author for this post.


    How can we visually check the contents of an array please?

    Is it possible to use DRAWTEXT to loop through the array and output the values by using the using the # functionality?

    e.g. DRAWTEXT(“#$array[i]#,Barindex,0) or something similar?

    I’m creating arrays but have no idea if they are correct 🙁

    Many thanks




    Hi guys,

    I’m working on a “Knn” indicator but at some point I need to be able to sort arrays, to be able to use “binary search” at least  instead of having a FOR loop inside a FOR loop which leads to a ProRealTime bug because it takes forever… I had a very hard time trying to figure out how to sort an array, do you guys know by any mean how to do that ?



    Currently sorting is not supported.


    1 user thanked author for this post.

    Thanks Roberto, I can’t wait such a new feature, that would be very handy.


    Guys, please don’t double post, thanks (see rule about double posting in yellow box below, thanks)


    Is it possible to use DRAWTEXT to loop through the array and output the values by using the using the # functionality? e.g. DRAWTEXT(“#$array[i]#,Barindex,0) or something similar?

    Store your $array[i] in a classic variable before DRAWTEXTing it:



    This example (and the other two) are a really excellent additions to the indicator library @Nicolas.

    It’s very useful not just for outright trading in underlying assets but for options traders and In the Money and Out the Money probability expectations.

    My post here explains more about the Option Pricing and the Black Scholes Pricing Model and the assumptions it makes:

    In my search for probability cones I found this image below (from of a cone that also has vertical green dotted lines denoting options contract expiry dates. It would be great to know how your indicator could be coded so as to add IG Index’s Dow Jones/Wall Street DFB expiration dates for these following dates?


    Also is it at all possible to modify this normal distribution probability cone code, with components of the code for the Deviation Scaled Fisher Transform?  That indicator attempts to convert prices into a Normal Gaussian probability density function — so that the probabilities in my Black Scholes link above can be made more realistic/reliable?

    The theory behind the Ehler’s “Deviation Scaled Inverse Fisher Oscillator” indicator is that it attempts to remove the fat tails of a distribution. Fat tails distributions are distributions that have very statistically unlikely events occurring more frequently (hence the term “fat”) than the Normal Distribution suggests, eg S&P 500 returns. (Note: Assets like commodity prices have leptokurtic “Skinny Tail” distributions). Ehler’s indicator attempts to give a more perfect bell shaped Gaussian distribution which is necessary to trade low probability events at the extreme ends of the oscillator. This allows a price series to be placed into a probability distribution so that the probabilities of extreme moves corresponds to a normal standard deviation bell curve (distribution) which allows the prediction, in percentage terms, for the odds of a +2/-2 standard deviation move away from the mean price (centre of the bell curve).

    So, basically I just wondered if your cone could be “hot rodded!?”

    Ps/Apologies if this is double posted, I’d originally written this and not posted it last week and when I came back to it and posted it just now it didn’t appear in this thread or my “Topics with my Replies.”


    Hi, just a quick bump, wondering if anyone can add some code to be able to add option expiration date dotted lines (as per image in previous post above) onto this excellent probability cone code?


    Hi @Nicolas, I managed to figure out putting up dotted lines for option “stop trading” and “expiry dates” on a chart but can’t figure out why some lines are missing as the dates look correct:

    Missing lines are evident for March 2020 (the Stop Trading line and Expiry Line the next day are both missing) and ditto for Jan 2021? Also why is the green line missing for the option expiry on 20210222 yet the Stop Trading line the day before is showing on 20210221?

    Also how can I get it to plot the lines for the Stop/Expiry dates plotted ahead and throughout 2021, (not just up to the current month of March 2021)?

    The Probability Cone looks good!



    Date 202003120 has 9 digits, instead of 8, so it doesn’t match any date on the chart.

    Date 20200321 cannot be plotted because DATE is the date when a candle closes and it should have been plotted at the closure of Friday, March 20th, but it can’t be plotted because the systems stops due to the end of the week.



Viewing 15 posts - 121 through 135 (of 209 total)
Similar topics:

Create your free account now and post your request to benefit from the help of the community
Register or Login