array variables availability in ProRealTime – examples and discussions

Viewing 15 posts - 196 through 210 (of 255 total)
  • Author
    Posts
  • #206317 quote
    thomas2004ch
    Participant
    Average

    Hi Nicolas,

    I use your example1 to the TSLA chart. But it seems a very important resistance/support zone could not be found?

    #206319 quote
    Nicolas
    Keymaster
    Master

    That code are using tops and bottoms aligned, not accumulation of prices in the same zone.

    #206323 quote
    thomas2004ch
    Participant
    Average

    Hi Nicolas,

    I use the example4 on the SPY. But it looks quite different than your example screen.

    #206325 quote
    Nicolas
    Keymaster
    Master

    Because you are applying it on the daily chart. Pivot points change everyday and that’s what you observed as a curve on a daily chart.

    #206326 quote
    thomas2004ch
    Participant
    Average

    I apply your example5 on SPY but see nothing.

    #206328 quote
    Nicolas
    Keymaster
    Master

    Do not add it on the price, but like an oscillator indicator.

    #213774 quote
    Aragorna
    Participant
    New

    Hi 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

    #220348 quote
    Pieter_T
    Participant
    New

    If 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

    #220349 quote
    Khaled
    Participant
    Veteran

    I had the same issue when I first copied the code. If I remember well, you need to reduce/increase the factor of 0.5, it’s ticker and timeframe dependent.

    #220350 quote
    Nicolas
    Keymaster
    Master

    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?

    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 🙂

    #220351 quote
    Nicolas
    Keymaster
    Master

    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.

    I recoded the examples in the first post.

    Pieter_T thanked this post
    #225189 quote
    abel1986
    Participant
    New

    Hello 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 again

    defparam 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
    endif

    hi = 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 – ADR

    if 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)
    endif

    return

    #225708 quote
    robertogozzi
    Moderator
    Master

    The attached pic shows on a 2-minute TF (Dax) the results.

    What’s the change you need?

    #232174 quote
    IG_CFD_Trader
    Participant
    Average

    For example, (for the current real-time bar only) how would I use Arrays to:

    1. 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)
    2. plot those VWAP values whilst the bar is running and then start again when new bar starts.
    abel1986 thanked this post
    #235229 quote
    Finning
    Participant
    Veteran

    Hi there,

    I just would like to ask please, does this code here, as per post #123834 actually work?

    $avg[a] = $avg[a] + 1

    I’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

Viewing 15 posts - 196 through 210 (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...