array variables availability in ProRealTime – examples and discussions

Viewing 15 posts - 46 through 60 (of 255 total)
  • Author
    Posts
  • #123894 quote
    Nicolas
    Keymaster
    Master

    They are dynamic because you can dynamically create new variable just by adding a new index. What you describe is something that you’ll have to code by yourself, if you want it as an indicator.

    If I understand your question correctly, for example, you want to know what was the best stochastic period to get the most of an order opened when it crosses the level 20?

     

    #123906 quote
    nonetheless
    Participant
    Master

    No, I meant the possible values for each variable, same as you would enter them in the optimization box. So that by holding them in an array it self-optimizes. Is that poss? Or am I getting it all wrong?

    #123942 quote
    Nicolas
    Keymaster
    Master

    In order to self optimize something, you have to program the way it should sort the result and ‘optimize’ it..

    In this example, if I want to store the value of a RSI for each period, as you would do it with the optimizer:

    // --- optimization settings 
    OptMin = 10
    OptMax = 30
    Step = 5
    // --- --- ---
    
    i = OptMin
    index = 0
    while i <=OptMax do
     $var[index]=rsi[i]
     index = index+1
     i = i+Step
    wend
    
    return

    Then you can use any value of the RSI stored in each column of the array (index) to do something, such as optimize your strategy. What period is better for each market condition, what value of the RSI is better to use in conjunction with a stochastic to trigger something, etc… There is no limit in what you can explore.

    nonetheless thanked this post
    #123944 quote
    nonetheless
    Participant
    Master

    It sounds fascinating, I’ll have to study that chapter in the manual when v11 comes out.

    #123960 quote
    Vonasi
    Moderator
    Master

    Another example of the use of arrays can be found here:

    Distribution of returns using arrays in PRTv11

    nonetheless thanked this post
    #124250 quote
    Vonasi
    Moderator
    Master

    Another example of the benefits of arrays can be found here:

    Every Fractal trend lines

    #124733 quote
    Vonasi
    Moderator
    Master

    Another example of the use of arrays in a code can be found here:

    Fractals average using arrays

    #125076 quote
    Fabian
    Participant
    Master

    03/24/2020 at 5:11 PM#123172REPLY | QUOTE | REPORT Yes, that would be possible. You just have to deal with the probability calculation.

     

    Hi Nicolas,

    Should I open a new thread in the forum for this?

    Thanks,

    Fabian

    #125084 quote
    Nicolas
    Keymaster
    Master

    Yes, why not! Sorry but we are all very busy actually.. will look asap.

    #125104 quote
    Fabian
    Participant
    Master

    Yes, why not! Sorry but we are all very busy actually.. will look asap.

    Yes, I know, that’s why I waited a few days.
    I’ll create a thread and explain in more detail with an example why I think it could add great value to the community.

    #125181 quote
    stefou102
    Participant
    Veteran

    miss this release! awesome!

    #125221 quote
    stefou102
    Participant
    Veteran

    when you have an array, how do you do to see what is stored in it, in order to debug???

    #125234 quote
    Nicolas
    Keymaster
    Master

    Make a loop through all the arrays and plot the values with DRAWTEXT.

    #125556 quote
    Nicolas
    Keymaster
    Master

    Another example with this indicator to plot the Relative intraday Volume: https://www.prorealcode.com/topic/relative-volume-rvol/#post-125548

    #125677 quote
    MPL
    Participant
    Average

    Hello everyone, hello Nicolas,

    Do you know if it is possible to get an array via a CALL function calling the indicator that builds this array?
    thank you so much,

    Mikaël

Viewing 15 posts - 46 through 60 (of 255 total)
  • You must be logged in to reply to this topic.

array variables availability in ProRealTime – examples and discussions


ProBuilder support

New Reply
Author
author-avatar
Nicolas @nicolas Keymaster
Summary

This topic contains 254 replies,
has 50 voices, and was last updated by robertogozzi
1 year, 3 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 02/06/2020
Status: Active
Attachments: 59 files
Logo Logo
Loading...