mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 17:48:05 +00:00
14 lines
351 B
Plaintext
14 lines
351 B
Plaintext
// AVGPRICE: Average Price
|
|
// (Open + High + Low + Close) / 4
|
|
// TA-Lib compatible — equivalent to TBar.OHLC4
|
|
|
|
//@version=6
|
|
indicator("AVGPRICE: Average Price", overlay=true)
|
|
|
|
avgprice(float o, float h, float l, float c) =>
|
|
(o + h + l + c) * 0.25
|
|
|
|
result = avgprice(open, high, low, close)
|
|
|
|
plot(result, "AvgPrice", color.new(color.blue, 0), 2)
|