I draw vertical line using
Code: Select all
//
Value1 = TL_New_S(D,Time_S,H+(Offset),D,Time_S,H*100);
//Value2 = TL_SetExtRight(Value1,True);
TL_SetColor(Value1,Red);
TL_SetStyle(Value1,Tool_dashed);
TL_SetSize(Value1,0.5);
Martin
Code: Select all
//
Value1 = TL_New_S(D,Time_S,H+(Offset),D,Time_S,H*100);
//Value2 = TL_SetExtRight(Value1,True);
TL_SetColor(Value1,Red);
TL_SetStyle(Value1,Tool_dashed);
TL_SetSize(Value1,0.5);
Code: Select all
var:
my.line(-1),
my.text(-1),
begin.date(0), begin.time(0), begin.price(0),
end.date(0), end.time(0), end.price(0);
my.line = TL_New_S( begin.date, begin.Time, begin.price,
end.date, end.Time, end.price);
TL_SetColor(my.line, Red);
TL_SetStyle(my.line, Tool_dashed);
TL_SetSize(my.line, 0.5);
// put text at the beginning of the line
my.text = text_new_s( begin.date, begin.Time, begin.price, "TEXT");
Hehe your the lucky one, I don't usually respond to codes with Value1 in it.Hehe your the lucky one to have seen a code with Value1 from me.
I usually never use value1. Just use it for a fast implantation of my idea.
Thanks for the reminding. I appreciate
Martin
Someone (maybe JoshM) wrote a function to do that.Here is some clarification of what I want to achieved
I want to implement code that will show a time line on my chart. I want to be able to see what is the reference of the line. Here is a snap picture of a manually implanted Time Line
Now, How do I code that. I got the line, but not the text. As the text need to be always visible, I need it to float at a fixed position, at the bottom of the chart window.
Martin
I don't think is possible; I suppose we need a new PowerLanguage keyword for that like Text_RotateFont(numeric degrees) - with the existing Text Drawing words I don't see a way (but I also would like to do this! )I want to implement code that will show a time line on my chart. I want to be able to see what is the reference of the line. Here is a snap picture of a manually implanted Time Line
Now, How do I code that.
Code: Select all
input: Plottime (115500);
vars: TLText(0);
if time_s = Plottime then
TLText = printtext_s (d,Plottime ,GetAppInfo(aiLowestDispValue ),1,1,red,10,true,
FormatDate("dd-MM-yyyy",ELDateToDateTime(date))+" "+
FormatTime("HH:mm:ss",ELTimeToDateTime_s(Plottime ) ),false);
Request to provide such keyword as been doneConfirmed, there is no such keyword to plot text vertically.
Josh, you could add your request or comment to my own request. Go to the page and in the bottom, there is a link to add commentaryThanks Martin for making the feature request, I've added my vote to it.
On a related note, is it possible to set the alignment of the text inside the box? For example, in Excel this would look like (with the alignment buttons highlighted in orange):
Off course, I've looked at the text drawing functions in the wiki, but didn't see a way to do this - am I overlooking something?