Mound, MN
Posts: 3 since Feb 2016
Thanks Given: 0
Thanks Received: 0
|
I can't believe I can't find this anywhere, and maybe I'm just not searching the right question. I want to label a horizontal line with the label "Gap High", and also have a label attached to it with the corresponding numeric value (vs having the numeric value only on the right axis.)
For example, I want to place a line at 203 that says "Gap High 203"
if I want it at 201, it will have a label of "Gap high 201", WITHOUT me having to change the easylanguage.
I can't believe TS doesn't offer the ability to label a horizontal drawing object with a word label (yes you can use a text box but it doesn't stay on the right side of the chart unless you make it an indicator, after which it is a text box on EVERY chart at that level)
anyways, this is the code I have for the trendline indicator I had to make to get the label on the horizontal line. I just want it to have the word label, but also add the numeric label. I've tried adding a second Lev1Txt, but it will only do one or the other as far as I can tell. I've also tried adding a Lev2Txt, but Lev2Txt input isn't in the language
This is what I have, any help would be great! I'm sure its an easy fix! THANKS SO MUCH
Input: Level1 (0);
Vars: Lev1Txt (0);
Plot1 [-5](Level1,"Lev1",magenta);
If text_exist (Lev1Txt) = False then
Begin
Lev1txt = Text_New (D,T, Level1, "Gap High");
Text_setstyle (Lev1Txt,1,1);
Text_SetColor(Lev1Txt, magenta);
end
Else
Begin
Value2 = GetAppInfo(aiRightDispDateTime);
Value3 = ELDate(MonthFromDateTime(Value2),DayFromDateTime(Value2), YearFromDateTime(Value2));
Text_setLocation(Lev1Txt, Value3, HoursfromDateTime(Value2) * 100 + MinutesfromDateTime(Value2), Level1);
End;
|