array variables availability in ProRealTime – examples and discussions
Forums › ProRealTime English forum › ProBuilder support › array variables availability in ProRealTime – examples and discussions
- This topic has 254 replies, 50 voices, and was last updated 1 month ago by robertogozzi.
-
-
03/30/2020 at 9:48 AM #123894
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?
03/30/2020 at 10:50 AM #123906No, 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?
03/30/2020 at 12:30 PM #123942In 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:
123456789101112131415// --- optimization settingsOptMin = 10OptMax = 30Step = 5// --- --- ---i = OptMinindex = 0while i <=OptMax do$var[index]=rsi[i]index = index+1i = i+StepwendreturnThen 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.
1 user thanked author for this post.
03/30/2020 at 12:42 PM #123944It sounds fascinating, I’ll have to study that chapter in the manual when v11 comes out.
03/30/2020 at 1:52 PM #123960Another example of the use of arrays can be found here:
https://www.prorealcode.com/topic/distribution-of-returns-using-arrays-in-prtv11/
1 user thanked author for this post.
04/01/2020 at 3:33 PM #124250Another example of the benefits of arrays can be found here:
https://www.prorealcode.com/prorealtime-indicators/every-fractal-trend-lines/
04/05/2020 at 8:02 PM #124733Another example of the use of arrays in a code can be found here:
https://www.prorealcode.com/topic/fractals-average-using-arrays/
04/07/2020 at 3:37 PM #12507604/07/2020 at 3:57 PM #12508404/07/2020 at 4:35 PM #125104Yes, 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.04/08/2020 at 10:17 AM #12518104/08/2020 at 1:11 PM #12522104/08/2020 at 2:11 PM #12523404/10/2020 at 10:48 AM #125556Another example with this indicator to plot the Relative intraday Volume: https://www.prorealcode.com/topic/relative-volume-rvol/#post-125548
04/11/2020 at 10:35 AM #125677 -
AuthorPosts
Find exclusive trading pro-tools on