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
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 ?
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
ok problem occur simply when not enough historical data ar loaded.*
Topic closed.