NexusFi: Find Your Edge


Home Menu

 





Label TL with Word text AND numeric level text


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,983 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Scalpin
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;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Tech-Savvy Trader Seeking Collaboration with Trading Pla …
Emini and Emicro Index
Need TOS RSI Converted to NT8
NinjaTrader
OMG! The Schwab API is live now!
NinjaTrader
Split Session Asia/London/US with lines extending
Sierra Chart
Knowledge Nuggets from the Web
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
6 thanks
Just another trading journal: PA, Wyckoff & Trends
4 thanks
NexusFi site changelog and issues/problem reporting
2 thanks
Cyclic Smoothed RSI V2 for Ninjatrader 8
2 thanks
The Program
2 thanks
  #3 (permalink)
 
sptrader's Avatar
 sptrader 
Colorado
 
Experience: Advanced
Platform: MultiCharts
Broker: IB & Iqfeed
Trading: ES , CL
Posts: 535 since Apr 2010
Thanks Given: 1,097
Thanks Received: 702


I'm not a great programmer but I think you want something like this, it will add the number to the end of your text.

 
Code
Lev1txt = Text_New (D,T, Leve11, "Gap High" + NumToStr(Leve11,2));

Reply With Quote
Thanked by:
  #4 (permalink)
Scalpin
Mound, MN
 
Posts: 3 since Feb 2016
Thanks Given: 0
Thanks Received: 0

THANK YOU SO MUCH!!! I've been trying to do that for months, guess I could've just asked on the forum...

Anyways, thanks again!

Reply With Quote




Last Updated on June 25, 2016


© 2025 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Sitemap - Downloads - Top
no new posts