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 2 months ago by robertogozzi.
-
-
12/26/2022 at 10:48 AM #206317
Hi Nicolas,
I use your example1 to the TSLA chart. But it seems a very important resistance/support zone could not be found?
12/26/2022 at 10:50 AM #20631912/26/2022 at 1:53 PM #206323Hi Nicolas,
I use the example4 on the SPY. But it looks quite different than your example screen.
12/26/2022 at 1:55 PM #20632512/26/2022 at 2:02 PM #206326I apply your example5 on SPY but see nothing.
12/26/2022 at 2:11 PM #20632804/26/2023 at 2:44 PM #213774Hi Nicolas, I know it’s an old topic but I’m struggling to understand the use of Array. If I put in this indicator Timeframe (1 day, Updateonclose) at the beginning of the code Example #1: support and resistance example, based on fractals points, is it possible to see the rectangles of that timeframe on my chart timeframe 5 minutes? I ask you this because if I do that, I don’t see anything, probably I’m missing something. Second question, If I want to see the condition if price close in TF 5 minutes for example in the middle of a $Topy(y) – $Topy(y) detected in TF 1 day, do I have to do a cycle For, to look for the array and then code a Buy if that condition is Ok? It’s not clear for me, it’d be of great help if you could help me.
thank’s in advance
Alessio
09/05/2023 at 7:37 AM #220348If you have a list of values (a list of recent highest high, for example), storing them in single variables could look like this:
Hi Nicolas,
In your post on 2/6/2020 you seem to have examples or code you used for explanation of the ArrayMax. For some reason, I cannot copy this code or view it. Are these still available?
Thx
Pieter
09/05/2023 at 8:11 AM #22034909/05/2023 at 8:16 AM #220350If I put in this indicator Timeframe (1 day, Updateonclose) at the beginning of the code Example #1: support and resistance example, based on fractals points, is it possible to see the rectangles of that timeframe on my chart timeframe 5 minutes?
No, if you want to get the support and resistance detection of the daily timeframe in an inferior timeframe, then the detection must be made in the code. The example #1 should be changed a bit for that purpose..
If I want to see the condition if price close in TF 5 minutes for example in the middle of a $Topy(y) – $Topy(y) detected in TF 1 day, do I have to do a cycle For, to look for the array and then code a Buy if that condition is Ok?
Yes, if you want to find something relevant for your condition in the table, then loop in it and explore the data stored 🙂
09/05/2023 at 8:18 AM #220351In your post on 2/6/2020 you seem to have examples or code you used for explanation of the ArrayMax. For some reason, I cannot copy this code or view it.
I recoded the examples in the first post.
1 user thanked author for this post.
12/13/2023 at 10:49 AM #225189Hello Nicolas,
thanks first of all for sharing the ADR calculation code.
I am trying to utilise it for my intraday trading in the 2 min TF. I am basically plotting the ADR targets from current day’s low and high.
The problem is that these levels are not correctly showing and calculating in real-time. The ADR calculation that I am printing is also wrong during real time.In order to make this work, I need every time to manually touch the indicator settings to sort of “reset” the plot during the live market.
Here’s the code I am using: (please find it also attached)
Do you have any idea how to adjust it?
thank you very much in advance againdefparam drawonlastbaronly = true
sum = 0
if day<>day[1] then
$drange[lastset($drange)+1]=dhigh(1)-dlow(1)
if lastset($drange)>=PERIODS then
for i = lastset($drange) downto lastset($drange)-PERIODS do
sum = sum+$drange[i]
next
ADR = sum/PERIODS
endif
endifhi = dhigh(0)
lo = dlow(0)bull50 = lo + (ADR * 0.5)
bull75 = lo + (ADR * 0.75)
bull100 = lo + ADR
bear50 = hi – (ADR * 0.5)
bear75 = hi – (ADR * 0.75)
bear100 = hi – ADRif barindex > 0 then
DRAWTEXT(“dHI”,barindex+3,hi,SansSerif,Bold,10) COLOURED (0,0,0)
DRAWTEXT(“ADR: #ADR#”,barindex+10,hi,SansSerif,Bold,10) COLOURED (0,0,0)
DRAWTEXT(“dLO”,barindex+3,lo,SansSerif,Bold,10) COLOURED (0,0,0)
DRAWTEXT(“d50”,barindex+3,bear50,SansSerif,Bold,10) COLOURED (255,0,0)
DRAWTEXT(“d75”,barindex+3,bear75,SansSerif,Bold,10) COLOURED (255,0,0)
DRAWTEXT(“d100”,barindex+3,bear100,SansSerif,Bold,10) COLOURED (255,0,0)
DRAWTEXT(“d50”,barindex+3,bull50,SansSerif,Bold,10) COLOURED(62,154,72)
DRAWTEXT(“d75”,barindex+3,bull75,SansSerif,Bold,10) COLOURED(62,154,72)
DRAWTEXT(“d100”,barindex+3,bull100,SansSerif,Bold,10) COLOURED(62,154,72)
endifreturn
12/26/2023 at 12:08 PM #225708The attached pic shows on a 2-minute TF (Dax) the results.
What’s the change you need?
05/02/2024 at 10:09 AM #232174For example, (for the current real-time bar only) how would I use Arrays to:
- store the VWAP value for every tick in that current bar (for example a 5 minute bar might have ticked 100 times up and down)
- plot those VWAP values whilst the bar is running and then start again when new bar starts.
1 user thanked author for this post.
07/13/2024 at 11:40 AM #235229Hi there,
I just would like to ask please, does this code here, as per post #123834 actually work?
1$avg[a] = $avg[a] + 1I’m trying to get it to mimic the following idea, B=A+B, which by intention is the summation of new data “A” onto the summation series of previous “A” values, “B”. I’m trying to count the increase of A over time.
Many thanks,
Finning
-
AuthorPosts
Find exclusive trading pro-tools on