Is there any way to code and find out the timestamp?

Forums ProRealTime English forum ProScreener support Is there any way to code and find out the timestamp?

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • #188776
    Hello,
    Does anyone know how to scan the highest high and lowest low cycle frequency is getting shorter or longer? Please see attached picture.
    I would like to find a timestamp (say X1, X2, X3,,,,,) for each highest high and lowest low. Then (X2 – X1) can tell us how long it took to make each price cycle. By comparing  (X2 – X1)  and  (X3 – X2), I can say whether the price cycle is getting longer or shorter.
    Regards,
    #188785

    Try this (not tested):

     

    #188789

    The new instruction HighestBars could help in this case.

    #188803

    This is the code with the new instruction suggested by Nicolas:

    #189153

    Thank you very much for your swift reply. I have been tucking to understand the following part of the previously mentioned solution by dissecting the last few days. However, I am still stuck with understanding the below:

    I understand “b3 = highestbars[p](high),” but I am not sure if I understand “b2 = highestbars[p](high[p]).” Why :[p](high[p]?” Why “p” in those two places?

    In order to dissect  and understand them on cash 500, ticker “SPTRD,” I program them to print out the code with two variable periods “p1” and “p2.”

    If anyone can possibly rephrase them in words, I would highly appreciate it very much.

    #189164

    This line will check a highest value among the latest p bars (from 0 to 39):

    you need two prior additional ones to find all the three, one between bars 40-79 and the leftmost one between bars 80-119.

    You can evaluate the expressions within brackets to check that.

     

    #189225

    Thank you very much for your reply. In order to understand what is going on with the code, I quantified the changing output with the gradation of color on cash 500, ticker symbol “SPTRD, screenshot attached. Would anyone agree with me the below:

    The blue gradation seems to illustrate the price cycle to be getting shorter.

    The black gradation seems to illustrate the price cycle to be getting longer.

    I am not sure yet if I can conclude as the above. I appreciate it very much if I can hear how other people can observe this outcome? Thank you

    p=4
    b3 = highestbars[p1](high)
    //DRAWTEXT(“#b3#”, barindex, high+range*2, Dialog, Standard, 10) COLOURED(255,0,0)
    Hp2=high[p2]
    b2 = highestbars[p1](high[p1])
    //DRAWTEXT(“#Hp2#”, barindex, high+range*0.6, Dialog, Standard, 12)
    //DRAWTEXT(“#b2#”, barindex, high+range*1.4, Dialog, Standard, 12)COLOURED(0,0,0)
    b1 = highestbars[p1](high[p1 * 2])
    //DRAWTEXT(“#b1#”, barindex, high+range*0.7, Dialog, Standard, 12)COLOURED(0,0,255)
    x1x2 = b2 – b1
    x2x3 = b3 – b2
    x = 0
    If x1x2 > x2x3 then
    M1 = x1x2 – x2x3
    HiM1=highest[pM1](M1)
    DRAWTEXT(“▇”, barindex, 1.001*highest[Hip](high), Dialog, Standard, 12)COLOURED(0,0,255, 255*M1/HiM1)
    x = 1
    Elsif x1x2 < x2x3 then
    M2 = -x1x2 + x2x3
    HiM2=highest[pM1](M2)
    DRAWTEXT(“▇”, barindex, 1.002*highest[Hip](high), Dialog, Standard, 12)COLOURED(0,0,0, 255*M2/HiM2)
    x = 2
    Endif
    return

    #189229

     

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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