Fixed position drawing

Questions about MultiCharts and user contributed studies.
User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Fixed position drawing

Postby lingwuchung » 10 Jul 2021

Hi,

Is there a way to draw text at fixed position, e.g. 5% or 10 pixel of screen height from bottom of chart on a bar? It seems all the drawing "setLocation" functions are relative to price only. I want to draw indicators at fixed position of the chart, not flunctuating up and down with prices.

Thanks.

Mydesign
Posts: 177
Joined: 15 Feb 2017
Has thanked: 32 times
Been thanked: 39 times

Re: Fixed position drawing

Postby Mydesign » 15 Jul 2021

Hi,

You should check out these keywords:
GetAppInfo(aiLowestDispValue) and GetAppInfo(aiHighestDispValue)

For instance:

Code: Select all

Input: Space_Pct(5) ; Vars: Bottom(0), Top(0), Space(0) ; Bottom = GetAppInfo(aiLowestDispValue) ; Top = GetAppInfo(aiHighestDispValue) ; Space = (Top - Bottom) * Space_Pct/100 ; Value1 = Text_New (Date, Time, Top - Space, "xxxxx") ;


Return to “MultiCharts”