Timeframe and ichimoku – how to get values from other timeframes?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #154779 quote
    Jerome888
    Participant
    Average

    Hello,

    I encounter a problem with timeframe used for ichimoku.

    I have create a function “ICHIMOKU-FUNCTION” and I call it with the instruction CALL. For information; this function return the trend (1, -1 or 0) depending on the position of the price versus the kumo.

    If I execute the here below code from time frame 4 hours (calling the function under 4 h timeframe), I get no issue (result is the right one).

    If I execute the here below code from time frame 1 hours (calling the function under 4 h timeframe), I get no issue (at least something close to expected result).

    If I execute it from the time frame 15 min or 5 min or 1 min (calling the function under 4 h timeframe), I do NOT get the right result at all.

    Any idea where it could come from ? (I am not so used with prorealcode so perhaps I miss something basic)

    Thank you

    TIMEFRAME(240 minutes)
    
    Trend240=Call "ICHIMOKU-FUNCTION"[ToleranceTenkKijun]
    
    TIMEFRAME(default)
    
    // 4 HOURS
    IF Trend240=1 then
    DRAWPOINT(barindex, -0.4, 2) coloured (0,128,0,128)
    ELSIF Trend240=-1 then
    DRAWPOINT(barindex, -0.4, 2) coloured (128,0,0,128)
    ELSIF Trend240=0 then
    DRAWPOINT(barindex, -0.4, 2) coloured (255,201,14,128)
    ENDIF
    
    return
    

    Thank you

    #154842 quote
    Jerome888
    Participant
    Average

    So I confirm that the whatever the timeframe instruction I execute, the CALL function returns values from the default timeframe only.

    Anything specific to be done ?

    #154844 quote
    Jerome888
    Participant
    Average

    A bit deeper in directtion of the problem:

    from 1 hour timeframe (code calling timeframe (4hours), TenkanSen, KijunSen, SenkouSpanA, SenkouSpanB return right values

    from 15 min timeframe (code calling timeframe (4hours), TenkanSen, KijunSen are correct, BUT SenkouSpanA, SenkouSpanB return n/d

    Any idea ? Thank you

    #155336 quote
    Jerome888
    Participant
    Average

    ok problem occur simply when not enough historical data ar loaded.*

    Topic closed.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Timeframe and ichimoku – how to get values from other timeframes?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Jerome888 @jerome888 Participant
Summary

This topic contains 3 replies,
has 1 voice, and was last updated by Jerome888
5 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/21/2020
Status: Active
Attachments: No files
Logo Logo
Loading...