Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

  • Forums
  • Strategies
  • Help : Modify a ''dotted line'' into a ''solid line'' with Pine Script

Help : Modify a ''dotted line'' into a ''solid line'' with Pine Script

Apr 8, 2021 - 4:39 PM

Viewed 93 times

https://best-trading-indicator.com/community/bti/forums/3953/topics/23584 COPY
  • Quick reply

    This forum uses Markdown for formatting text in posts.

    • Emphasis, aka italics, with *asterisks* or _underscores_.
    • Strong emphasis, aka bold, with **asterisks** or __underscores__.
    • Combined emphasis with **asterisks and _underscores_**.
    • Strikethrough uses two tildes. ~~Scratch this.~~
    • Links are added automatically, but can be formatted like so: [My link](https://mylink.com)

    For more information, take a look at the Markdown Cheatsheet

  • Did you try to play with the extend parameter of the line.new object?
    Wondering if this could help

    0
  • Hey thanks for you answer. Ive saved it successfully, but no line are plotted on chart. Here's what i have now.

    //Previous day high and low lines
    var line my_line = na

    line.delete(my_line)
    my_line := line.new(bar_index, previousdayhigh, bar_index, previousdaylow, xloc=xloc.bar_index , color=#0000FF, style=line.style_solid, width=2)

    line.delete(my_line)
    my_line := line.new(bar_index, previousdaylow, bar_index, previousdaylow, xloc=xloc.bar_index , color=#0000FF, style=line.style_solid, width=2)

    //Premarket high and low lines
    line.delete(my_line)
    my_line := line.new(bar_index, pm_high, bar_index, pm_high, xloc=xloc.bar_index , color=#0000FF, style=line.style_solid, width=2)

    line.delete(my_line)
    my_line := line.new(bar_index, pm_low, bar_index, pm_low, xloc=xloc.bar_index , color=#0000FF, style=line.style_solid, width=2)

    1
  • Hello

    The dotted effect comes from the trackprice=true part of the plot function

    You'll have to use the line.new object instead

    Example

    Replace all the plots by line.new

    Line 47

    I haven't tested but it should look something like this

    var line my_line = na
    line.delete(my_line)
    my_line := line.new(bar_index, dailyhigh, bar_index, dailyhigh, xloc=xloc.bar_index ,  color=#FFFFFF, style=line.style_solid, width=2)
    
    0
  • Hi, I'm asking for help with what seems to be an ''easy'' problem with a pine script code line.

    As a newbie, I am trying to modify an existing script line, but I'm starting to get an headache after many many tries and searching on pine manual :P

    Would you please help me to set the lines as solid please? As is it now, it's only showing dotted.

    Code Lines: from 46 to 71

    Here's the scrips:
    https://www.tradingview.com/script/1yLZ7nkU-BB-Indicator-Marks-High-and-low-of-premarket-daily-yesterday/

    I'm asking here because the author of the script is not replying to me.

    I thank you very much for your time and knowledge :) This is much appreciated

    1
CONTENTS