Reputation: 39
I requested data from a higher timeframe "selectedTimeframe" but the float array returned is completly incosistent with what i have on the actual higher timeframe
note: the chart below is the higher timeframe(4h), and the one above is the lower timeframe(1h)
here is the code :
float ph = request.security(syminfo.tickerid, selectedTimeframe, ta.pivothigh(src1, prd, prd)[barstate.isrealtime ? 1 : 0],barmerge.gaps_on)[barstate.isrealtime ? 0 : 1]
float pl = request.security(syminfo.tickerid, selectedTimeframe, ta.pivotlow(src2, prd, prd)[barstate.isrealtime ? 1 : 0],barmerge.gaps_on)[barstate.isrealtime ? 0 : 1]
note: the main issue is that it returns a different price for the 4h and a different on 1h where the 4h price is being requested
I have tried manually unputting the timeframe string, but that seems not to be the issue, i also created a temporary request for just the close price on the higher time frame, but that also yielded the same result, the higher was inconsistent with whats displayed on the lower timeframe
Upvotes: 0
Views: 128