hello
MC suggested we could make a function that allows us to display a text on the right of the bar being + or - X (cm, pixel, bar etc. ..)
Ideally would like a command but with the parameters of this one
Text_SetLocation (ObjectID, BarDate, BarTime, PriceValue)
Text_SetLocation (ObjectID, BarDate, BarTime, HORIZONTAL,VERTICAL ,PriceValue)
thank you
french
bonjour
suggestion MC pourrais nous mettre une fonction qui nous permette d'afficher un texte a droite de la barre en cours + ou - X (cm,pixel,barre etc..)
merci
suggestion -- Text_SetLocation
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: suggested
1. you can decide the horizontal placement by the BarTime.hello
MC suggested we could make a function that allows us to display a text on the right of the bar being + or - X (cm, pixel, bar etc. ..)
Ideally would like a command but with the parameters of this one
Text_SetLocation (ObjectID, BarDate, BarTime, PriceValue)
Text_SetLocation (ObjectID, BarDate, BarTime, HORIZONTAL,VERTICAL ,PriceValue)
thank you
french
bonjour
suggestion MC pourrais nous mettre une fonction qui nous permette d'afficher un texte a droite de la barre en cours + ou - X (cm,pixel,barre etc..)
merci
the BarTime can be:
TIME = current bar
TIME[1] = previous bar
TIME + barinterval = next bar
etc.,
you can further refine the text location by
TEXT_SETSTYLE
2. MultiCharts' PowerLanguage must retain compatibility with TS' EasyLanguage,
modifying a keyword will cause many unhappy users. >
- RobotMan
- Posts: 375
- Joined: 12 Jul 2006
- Location: Los Altos, California, USA
- Has thanked: 31 times
- Been thanked: 13 times
- Contact:
Hi drudominique,
Here is some sample code to see how this works. Note: MC already has a tick countdown timer now. There is a trick where I use "time_s + 1" to locate the text. Others might have better ways to do this, but I am not a programmer.
cheers.
Here is some sample code to see how this works. Note: MC already has a tick countdown timer now. There is a trick where I use "time_s + 1" to locate the text. Others might have better ways to do this, but I am not a programmer.
cheers.
Code: Select all
// Bob Perry 9/07, 11/08
// This only works on:
// "Tick" charts where "Build Volume On:" is set to "Tick Count"
// "Contract" or "Volume Bars" where "Build Volume On:" is set to "Volume"
inputs: marker ( "<"), space ( " " );
var: Count(0), text_string ( "" ), { string }
ref(0); { ref # of text object }
{ initialize text object }
if currentbar = 1 then
ref = text_new_s(date,time_s,close, " " );
value1 = Ticks;
Count = value1[1] - value1[0];
if lastbaronchart then begin
{ string for text object }
text_string = space + marker + space + numtostr(Count,0);
{ move text to lastbaronchart }
text_setlocation_s(ref,date,time_s+1,close);
text_setstring(ref,text_string);
text_setstyle( ref, 0, 2 );
text_setcolor(ref, tool_yellow );
end;
-
- Posts: 70
- Joined: 17 Mar 2010
hello
ok but you fix the problem for the horizontal but the vertical? take an example, suppose I want my text is on three bar on the right of the last bar and being above the highest bar in court +0.25 pts how?
cordialy
french
bonjour
ok mais la vous régler le problème pour l'horizontal mais pour le vertical ? prenons un exemple supposons que je veux que mon texte se trouve sur 3 barre sur la droite de la dernière barre en cours et au dessus du plus haut de la barre en cour +0.25 pts comment faire ?
cordialement
ok but you fix the problem for the horizontal but the vertical? take an example, suppose I want my text is on three bar on the right of the last bar and being above the highest bar in court +0.25 pts how?
cordialy
french
bonjour
ok mais la vous régler le problème pour l'horizontal mais pour le vertical ? prenons un exemple supposons que je veux que mon texte se trouve sur 3 barre sur la droite de la dernière barre en cours et au dessus du plus haut de la barre en cour +0.25 pts comment faire ?
cordialement
-
- Posts: 70
- Joined: 17 Mar 2010
I just tried and it works.
but if I use, text_setsize, text_setborder, Text_setbgcolor it does not work why? and how?
french
je viens d'essayer et ça marche .
mais si j'utilise , text_setsize,text_setborder,Text_setbgcolor cela ne fonctionne pas le décalage n'est pas pris en compte pourquoi ? et comment faire ?
but if I use, text_setsize, text_setborder, Text_setbgcolor it does not work why? and how?
french
je viens d'essayer et ça marche .
mais si j'utilise , text_setsize,text_setborder,Text_setbgcolor cela ne fonctionne pas le décalage n'est pas pris en compte pourquoi ? et comment faire ?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
What do you mean by "it does not work" ?I just tried and it works.
but if I use, text_setsize, text_setborder, Text_setbgcolor it does not work why? and how?
french
je viens d'essayer et ça marche .
mais si j'utilise , text_setsize,text_setborder,Text_setbgcolor cela ne fonctionne pas le décalage n'est pas pris en compte pourquoi ? et comment faire ?
can't compile? can't apply to chart? wrong effect? no effect? can't see it on chart?
Have you read the manual and tried the examples?
All these keywords have been in service for years,
if they do not work, surely some heavy user (like me) would have noticed it.
MultiCharts' PowerLanguage is flexible, more flexible and capable than TS' EasyLanguage.
the current set of keywords can put a dot/text/line/arrow anywhere on the screen.
All you have to do is decide the coordinates... and PowerLanguage can draw it for you.
If you need additional help, simply press the [F1] key,
look under PowerLanguage > Keyword Reference > Text Drawing
for all the available keywords.
Easy to follow examples are provided with each keyword.
ditto for Arrow Drawing and Trendline Drawing.
-
- Posts: 70
- Joined: 17 Mar 2010
yes it works very well I had a programming error.
yes EasyLanguage the MC is much more flexible, robust and capable than that of TS that is why I program all the time now while at MC in MC is faster than in TS and more stable than the matrix strongly at MC is operational because I'm eager to work only with MC
cordialy
french
oui ça marche très bien j'avais fait une erreur de programmation .
oui l'easylanguage de MC est beaucoup plus souple,solide et capable que celui de TS c'est pour cela que je programme maintenant tout le temps sous MC tout chez MC est plus rapide que sous TS et plus stable vivement que la matrix chez MC soit opérationnel car je suis pressé de travailler uniquement avec MC
cordialement
yes EasyLanguage the MC is much more flexible, robust and capable than that of TS that is why I program all the time now while at MC in MC is faster than in TS and more stable than the matrix strongly at MC is operational because I'm eager to work only with MC
cordialy
french
oui ça marche très bien j'avais fait une erreur de programmation .
oui l'easylanguage de MC est beaucoup plus souple,solide et capable que celui de TS c'est pour cela que je programme maintenant tout le temps sous MC tout chez MC est plus rapide que sous TS et plus stable vivement que la matrix chez MC soit opérationnel car je suis pressé de travailler uniquement avec MC
cordialement