High/low/open prices for specific timeframes

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #33749 quote
    gabrigabri
    Participant
    Master

    Copy, in this case I will post the indicator in case someone else needs it.

    #33770 quote
    gabrigabri
    Participant
    Master

    try with this

     

    //computation timeframe in use and intraday number of bars - intrab
    if intradaybarindex=0 then
    time1=opentime
    endif
    if intradaybarindex=1 then
    time2=opentime
    endif
    deltatime=(time2-time1)/100
    intrab=round(522/deltatime)
    //computation max and min in the first hour - super e infer
    if (time>=090000) and (time<=100000) then
    super=dopen(0)
    infer=dopen(0)
    if high>super then
    super=high
    endif
    if low<infer then
    infer=low
    endif
    else
    super=super
    infer=infer
    endif
    
    //computation average (super-initialopen) and (initialopen-infer)
    period=20
    if time=100000 then //originally 100000
    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>090000 then // originally 100000
    up=dopen(0)+deltasuper
    down=dopen(0)-deltainfer
    else
    up=up
    down=down
    endif
    
    
    
    return up,down
Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

High/low/open prices for specific timeframes


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Roman @roman Participant
Summary

This topic contains 16 replies,
has 2 voices, and was last updated by gabrigabri
9 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/20/2017
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...