First hour of trading average high and low

First hour of trading average high and low

This indicator was needed by Roman.

The upper line shows the highest of the first hour plus the average for the past n days of the difference between the first-hour-highest and the daily open.

the lower line shows the lowest of the first hour minus the average for the past n days of the difference between the first-hour-lowest and the daily open.

I hope someone else might use this code.

Blue skies

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Maz • 04/28/2017 #

    Hi, I quite like this idea. I just wanted to suggest some code alterations:
    // --------------------------------
    // once period = 20
    // once gmtOffset = 000000 // 010000 for EU just an idea
    once startTime = 080000 //+gmtOffset ??
    // --------------------------------

    once endTime = startTime+010000
    // to avoid nasty spike on the graph
    once up = undefined
    once down = undefined
    once super = undefined
    once infer = undefined

    //computation timeframe in use and intraday number of bars - intrab
    if intradayBarIndex = 0 then
    time1=opentime
    elsif intradayBarIndex = 1 then
    time2=opentime
    // only needs to be done once a day no?
    deltatime=(time2-time1)/100
    intrab=round(522/deltatime)
    endif
    //deltatime=(time2-time1)/100
    //intrab=round(522/deltatime)

    //computation max and min in the first hour - super e infer
    if (time>=startTime) and (time<=endTime) then
    super = dopen(0)
    infer = dopen(0)
    //if high>super then
    //super=high
    //endif
    super = max(high, super)
    //if low<infer then
    //infer=low
    //endif
    infer = min(low, infer)
    endif
    //else
    //super = super // ??? why?
    //infer = infer // ??? why?
    //endif

    //computation average (super-initialopen) and (initialopen-infer)
    if (time = endTime) then
    sommadeltasuper=0
    sommadeltainfer=0
    for i=0 to (period) do
    j=1+round(i*intrab)
    sommadeltasuper = sommadeltasuper+abs(super[j]-dopen(i))
    sommadeltainfer = sommadeltainfer+abs(dopen(i)-infer[j])
    next
    deltasuper = sommadeltasuper/period
    deltainfer = sommadeltainfer/period
    //endif
    //if time>endTime then
    elsif time>endTime then
    up=super+deltasuper
    down=infer-deltainfer
    else
    up=up
    down=down
    endif

    return up,down

     

  2. gabri • 04/28/2017 #

    Maz,
    excellent corrections, thanks a lot
    Gabri

  3. Francesco78 • 04/28/2017 #

    Thank you, what is the rational? breakout outside the rectangle?
    Regards
    Francesco 

  4. gabri • 04/28/2017 #

    Roman made the strategy, I made the code and Maze made it bulltproof. You can use it I believe in many ways. A London breakout might be one of them for example.
     

  5. Roman • 04/28/2017 #

    Francesco78
    here is the strategy:
    https://www.prorealcode.com/topic/highlowopen-prices-for-specific-timeframes/

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
Iván Hi! just change line13 for this: showsignals=1
Quino Hi Excellent indicator as usual. Just 2 questions: Why LenH and LenL = 15 as Len could be...
Iván Hi! good question. This is a code request traslation from other platform. I took same inputs...
roccafragius Thank you Ivan, very Useful! I would like translation of Trading View CCI_S Indicator, How ...
Iván hi, you can ask here: https://www.prorealcode.com/free-code-conversion/
Iván È possibile che siano state caricate troppe barre nel grafico.
NicoGB67 Hola Iván, en primer lugar agradecerte el trabajo que haces, y comentarte algo sobre este in...
okeus ok fatto avevi ragione, grazie
Ciccarelli Franco Scusa e cosa devo cambiare? Grazie
Sofitech Bonjour Ivan, comment pourrais tu modifier ce code pour qu'un histogramme indiquant la créat...
geroniman Merci Ivan, cet indicateur est excellent. Comme les cours s'arretent souvent sur les 50% d'u...
sanchota Mira que has hecho unos cuantos indicadores,pues este los supera a todos.Brillante.
Gaspare Grazie Ivan, ottimo indicatore posso chiedere, per favore, una strategia che apre posizio...
Iván thanks! maybe I could test it
foufurieux
1 month ago
ANTS indicator
ANTS indicator
3
Indicators
atlante good morning the indicatordoes not display the photo you postes only upload nessages appear ...
foufurieux Please find a new image of the indicator
foufurieux Sorry impossible adding a new image
jacquesgermain
2 months ago
NicoGB67 me sigue dando error en algunas líneas: 8, 44, 45, 46, 47 y 49, no sé si será por la traducc...
jacquesgermain voir le forum proscreener topic "screener momentum bias" je vous ai déposé le fichier momen...
jacquesgermain
2 months ago
jacquesgermain à utiliser en unité de temps jour
patapouf Pourrait-on créer un screener sur la base de cet indicateur, dont l'idée semble très pertine...
jacquesgermain le voici (détecte le croisement bande haute ou bande basse) : timeframe(monthly) c1=open ...
okeus Ivan, riesci a creare un indicatore per le "evolventi paraboliche" ? grazie
groelandes Impagable tu trabajo cada semana. ¡Gracias!
Iván de nada! :)
Row trading Hi, to see the current day put : for y = i-1 to i-1 do to see all days put : for y = 1 t...
Razz Hi, thanks for your answer. I'll keep an eye on the whole thing, I've now expanded it to in...
Razz Adding an image did not work : https://www.directupload.eu/file/d/8765/3ez6bzlq_png.htm
groelandes Me uno al comentario de Edelmiro. Un millón de gracias por el trabajo constante, dándonos in...
JohnScher Ja, das würde mich auch interessieren
MARTINALA CARTINA ciao,complimenti .SIispira ai canali di migliorino per caso?grazie

Top