Reputation: 107
I'd like to see the highest price of last 5 days on 4h chart and maybe other lower timeframe charts. The function that I found in coding reference: highest(source, length)
seems not taking interval as a parameter. I came from mt4 which having this feature. So how do we do this in pine script?
Upvotes: 0
Views: 696
Reputation: 11
//@version=5
indicator("line1" , overlay =true)
s = request.security("Kucoin:BTCUSDT", "W", high) // 1 Day
t = request.security("Kucoin:BTCUSDT", "W", low ) // 1 Day
plot(s)
plot(t)
Upvotes: 0
Reputation: 1961
Use security
function:
//@version=4
study("My Script", overlay = true )
s = security(syminfo.tickerid, "1D", highest(5))
plot(s)
Upvotes: 1