remove a horizontal line previously drawn by my code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #125092 quote
    Nico Rood
    Participant
    Average

    is it possible in v10.3 to remove a horizontal line previously drawn by my code and then draw it again in a new place? I have to take into account that lines from highs to lows also on the chart should remain

    #125097 quote
    Nicolas
    Keymaster
    Master

    It is not possible to remove objects previously drawn. But you can make your code plotting once and only on the last candle, this way on each new candlestick, the code is plotting again all objects at the same place or different ones depending of your calculation and settings.

    See: DrawOnLastBarOnly

    #125098 quote
    Vonasi
    Moderator
    Master

    If you use:

    defparam drawonlastbaronly = true

    at the top of your code then only drawn object that are drawn on the latest bar are shown.

    Sometimes it is necessary to create two indicators rather than one and then apply them both. One can draw on the last bar only and the other can draw on all bars.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

remove a horizontal line previously drawn by my code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Nico Rood @nico-rood Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Vonasi
5 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/07/2020
Status: Active
Attachments: No files
Logo Logo
Loading...