How to add value to chart, but just for current candle

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #181452 quote
    RubberToe
    Participant
    Average

    I want to be able to see the current value for the SD slope on my chart. This is the code I am starting with, but it gives me values on top of every bar, and I would prefer just the last one.

    timeframe(1mn)
    
    il = ((LinearRegressionSlope[120](close))/close)*10000 //
    
    DRAWTEXT("#il#", barindex, high+.2, Dialog, Standard, 12) COLOURED(255,0,10)
    
    RETURN
    #181455 quote
    robertogozzi
    Moderator
    Master

    Try replacing high+.2 with:

    high+.2*pipsize
    RubberToe thanked this post
    #181507 quote
    RubberToe
    Participant
    Average

    That helps in one regard but I would like to just have the value over the last candle, not all of them.

    Screenshot-2021-11-12-090604.jpg Screenshot-2021-11-12-090604.jpg
    #181511 quote
    robertogozzi
    Moderator
    Master

    Simply add this as first line:

    Defparam DrawOnLastBarOnly = true
    RubberToe thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

How to add value to chart, but just for current candle


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
RubberToe @rubbertoe Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/11/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...