最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

In TradingView, I'm getting the Pine-script error: Mismatched input "end of line without line continuation&

programmeradmin4浏览0评论

I've read this is often caused by Indentation errors, but for the life of me I can't find any problem. Here is the text for the problem section of code:

// Create new entry label
long_entry_label := label.new(
    bar_index, low, 
    text="LONG ENTRY\nLeverage: " + str.tostring(leverage_long) + "x\nPrice: " + str.tostring(close, format.mintick), 
    color=bgcolor_with_transparency(long_entry_color), 
    style=label.style_label_up, 
    textcolor=label_text_color, 
    size=label_text_size,
    yloc=yloc.belowbar
)

Pine Script Editor pic

I've read this is often caused by Indentation errors, but for the life of me I can't find any problem. Here is the text for the problem section of code:

// Create new entry label
long_entry_label := label.new(
    bar_index, low, 
    text="LONG ENTRY\nLeverage: " + str.tostring(leverage_long) + "x\nPrice: " + str.tostring(close, format.mintick), 
    color=bgcolor_with_transparency(long_entry_color), 
    style=label.style_label_up, 
    textcolor=label_text_color, 
    size=label_text_size,
    yloc=yloc.belowbar
)

Pine Script Editor pic

Share Improve this question edited Mar 20 at 9:42 CRYPTO FUTURE asked Mar 20 at 9:39 CRYPTO FUTURECRYPTO FUTURE 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

It's an indexing error
Try like this:

    // Create new entry label
    long_entry_label := label.new(
      bar_index, low, 
      text="LONG ENTRY\nLeverage: " + str.tostring(leverage_long) + "x\nPrice: " + str.tostring(close, format.mintick), 
      color=bgcolor_with_transparency(long_entry_color), 
      style=label.style_label_up, 
      textcolor=label_text_color, 
      size=label_text_size,
      yloc=yloc.belowbar)

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论