![]() WStyle = input("solid", title="Weekly style", options=) WColor = input("orange", title="Weekly color", options=) WValue = input("Previous Week", title="Candle Selection", options=) ShowWeekly = input(true, type=input.bool, title="Show Weekly?") lblOffset = input(30, title="Label Offset") I have followed the same procedure but I am probably missing something important. I already added a ready code for Labeled Daily and weekly close horizontal lines and tried to use the "same" code for this, but nothing seems to work. Now I want to label these horizontal EMA lines with 10, 21 EMA etc. Plot(veryslowema, color=show_emas ? color_veryslowema : na, linewidth=2, title="Veryslow EMA") Plot(slowema, color=show_emas ? color_slowema : na, linewidth=2, title="Slow EMA") Plot(mediumema, color=show_emas ? color_mediumema : na, linewidth=2, title="Medium EMA") Plot(fastema, color=show_emas ? color_fastema : na, linewidth=2, title="Fast EMA") Plot(entryema, color=show_emas ? color_entryema : na, linewidth=2, title="Entry EMA") If (hour=0 and minute=0 and year(time)=year(timenow) and month(time)=month(timenow) and dayofmonth(time)=dayofmonth(timenow))į_moveLine(line_entryema, time, entryema)į_moveLine(line_mediumema, time, mediumema)į_moveLine(line_veryslowema, time, veryslowema) ![]() Var line_veryslowema = line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=show_hlines ? color_veryslowema : na, style=line.style_solid) Var line_slowema = line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=show_hlines ? color_slowema : na, style=line.style_solid) Var line_mediumema = line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=show_hlines ? color_mediumema : na, style=line.style_solid) Var line_fastema = line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=show_hlines ? color_fastema : na, style=line.style_solid) Var line_entryema = line.new(x1=na, y1=na, x2=na, y2=na, xloc=xloc.bar_time, extend=extend.both, color=show_hlines ? color_entryema : na, style=line.style_solid) Var bool show_hlines = input(true, "Show horizontal lines", input.bool) Len3 = input(55, minval=1, title="Length") Len2 = input(21, minval=1, title="Length") Len1 = input(10, minval=1, title="Length") SL = label.new (x=bar_index, y=na, text=ShortLabel, xloc=xloc.bar_index, yloc=yloc.abovebar, color=color.red, style=label.style_none, textcolor=color.red, size=size.normal, textalign=text.This is the Code I use atm. LL = label.new (x=bar_index, y=na, text=LongLabel, xloc=xloc.bar_index, yloc=yloc.belowbar, color=een, style=label.style_none, textcolor=een, size=size.normal, textalign=text.align_center) Show_Label_Short = input(true, title="Short Position") Show_Label_Long = input(true, title="Long Position") Risk = input(100.00, "Risk Amount (USD)", type=input.float) Thanks Flow Share Size Calculator", overlay=true) ![]() I'm lost in where to start with this, any help is much appreciated. Otherwise worst case scenario would be to have have a future offset. I would like to have them in the top left corner of the chart if possible. I'm looking for some help to set a location for my labels.
0 Comments
Leave a Reply. |