lundi 30 août 2021

'if' blocks is not compatible with return type of other block(s) (series[string]; void)

can you help me? i don't understand where is bug:

//@version=4
study("FOR break test")
string = ""
for _i = 1 to 7 
//{
    if abs(close - open) < 10000 
        break 
    else    
        string := string + tostring(_i, "00") + "•" + tostring(close[_i]/1000, "0000") + " \n"
//}
label.new(bar_index, 0, string, style = label.style_none, textcolor=color.red, size = size.normal, textalign = text.align_left)

Konstantin

Aucun commentaire:

Enregistrer un commentaire