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 - 31 through 45 (of 247 total)
  • #121027

    Hi Nicolas, is it ready yet for trading accounts (V11) with Interactive Brokers?


    I don’t think it is available presently for that type of account, but very soon. Best way to verify is by typing one of the array instruction (or by copy/paste one of the examples of that topic) and check if there is a syntax error 😉


    I created a little code that uses arrays to create a seasonality curve. It might be of interest to anyone reading this topic so here is the link to that indicator:


    Another example posted by Roberto, the Meander Bands updated with ARRAYS



    Example with a price gap levels indicator coded by @grivoire



    Example #7: calculate the Average Daily Range (ADR)

    A simple example on how to store a value in an array while the history is loaded. Each new day, the $drange variable increase its index to save the previous day range (High-Low). Once the array length is sufficient (has enough values) to calculate the average period, the calculation is made. Therefore, we only use a quick loop through the array and not through the global data history to fetch the last X days range to calculate the ADR.


    5 users thanked author for this post.

    Thanks Nicolas.

    1 user thanked author for this post.

    Hi Nicolas,

    I’ve a question for the expert.
    Is it possible with the new array function (or without) to calculate live price projection targets in the chart with the corresponding probability?
    And if so, would it be possible to create a template in which we enter our conditions?

    Thank you.



    Yes, that would be possible. You just have to deal with the probability calculation.

    1 user thanked author for this post.

    I developed my seasonality curve indicator that uses arrays further and it might be of interest for anyone studying the use of arrays.

    Find it here:


    Are arrays only used for data? ie external to the code. Or could they somehow be used to select indicator variables within the code? I’m thinking of something like this

    where the 4 variables result in hundreds or thousands of workable combinations.


    You can store any value you like in an array. So you could say recognise a set of candle price action on the chart and then store all the periods of an indicator that were within a certain range at this time.

    For example you could have an array with storage locations from 1 to 200 and when price does something you like add one to each location if the price was above that period average. So for example:

    So now we have a store of which averages were correct the most often.

    1 user thanked author for this post.

    Thanks Vonasi, it seems a hugely powerful tool. I’ll have to do some serious homework to get my head around it.


    Think of arrays as dynamic variables. You can create as many variables as you want, on the fly. Store everything in arrays and use them later (or not) in your code.


    If the variables are dynamic, is it self-optimizing? In the StochasticRSI example, if each variable had an array of 2-20 would the code then select the most effective combination? Or is it recording what would have been the best combination for future reference?

Viewing 15 posts - 31 through 45 (of 247 total)
Similar topics:

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