Здравствуйте, это мой скрипт, который я конвертирую из MQL4 в Pinescript, он не работает. Я тестирую llb и hhb, возвращая значение индекса, а не тот индекс, как я могу это исправить?
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © hesamx98
//@version=4
study("My Script")
hhb = highest(high,bar_index)[24]
llb = lowest(low,bar_index)[24]
if bar_index == hhb
label.set_text(hhb, "Buy")
label.set_color(hhb, color.green)
label.set_yloc(hhb, yloc.belowbar)
label.set_style(hhb, label.style_labelup)
if bar_index == llb
label.set_text(llb, "Sell")
label.set_color(llb, color.red)
label.set_yloc(llb, yloc.abovebar)
label.set_style(llb, label.style_labeldown)