Timeframe and ichimoku – how to get values from other timeframes?
Forums › ProRealTime English forum › ProBuilder support › Timeframe and ichimoku – how to get values from other timeframes?
- This topic has 3 replies, 1 voice, and was last updated 4 years ago by Jerome888.
-
-
12/21/2020 at 9:40 PM #154779
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
12345678910111213141516TIMEFRAME(240 minutes)Trend240=Call "ICHIMOKU-FUNCTION"[ToleranceTenkKijun]TIMEFRAME(default)// 4 HOURSIF Trend240=1 thenDRAWPOINT(barindex, -0.4, 2) coloured (0,128,0,128)ELSIF Trend240=-1 thenDRAWPOINT(barindex, -0.4, 2) coloured (128,0,0,128)ELSIF Trend240=0 thenDRAWPOINT(barindex, -0.4, 2) coloured (255,201,14,128)ENDIFreturnThank you
12/22/2020 at 7:26 AM #15484212/22/2020 at 8:25 AM #154844A 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
12/27/2020 at 2:12 PM #155336 -
AuthorPosts
Find exclusive trading pro-tools on