NexusFi: Find Your Edge

Home Menu


Fixed position for text on a chart

Discussion in EasyLanguage Programming

      Top Posters
    1. looks_one aslan with 3 posts (2 thanks)
    2. looks_two Henrik with 2 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (2 thanks)
    4. looks_4 cbritton with 1 posts (2 thanks)
    1. trending_up 9,365 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments

Search this Thread

Fixed position for text on a chart

  #1 (permalink)
Berlin, Germany
Posts: 33 since Sep 2009
Thanks Given: 12
Thanks Received: 6


I have a question

Is there a way to fix a textposition for example on the top right on a chart (no matter of zoomlevel)?

In manuals I find only a way to set position to a position depend of the price. But in this case, when I zoom or scroll the chart, the text goes away....

But I want always see (for example) the number of open trades and the netto profit in the top right in the chartwindow. No matter of scroll right or left or zoom.
In MT4 I can do this. But in MultiCharts?

Thank you for help!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Any futures traders in Texas looking to give back to tho …
Traders Hideout
Exit Strategy
Platforms and Indicators
VFC turning around or continuing to fall?
Stocks and ETFs
Honey, dont forget the gold bars at the store!
Best Threads (Most Thanked)
in the last 7 days on NexusFi
My NQ Trading Journal
32 thanks
Diary of a simple price action trader
20 thanks
Daytrading ES & NQ
10 thanks
Coding money management strategies.
10 thanks
Just another trading journal: PA, Wyckoff & Trends
9 thanks
  #3 (permalink)
aslan's Avatar
Madison, WI
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127

My MC trial ended, but in Tradestation there is an indicator called Text_Float, and a similar function that it calls. You basically create a text object, then call the funcion on each tick/bar to update its location.

Reply With Quote
Thanked by:
  #4 (permalink)
Berlin, Germany
Posts: 33 since Sep 2009
Thanks Given: 12
Thanks Received: 6

Thank you, aslan,
actually I use Text_float, but the position depends on the price...

I want to fix position, for example: 5 pixels left from right corner etc...

Reply With Quote
  #5 (permalink)
aslan's Avatar
Madison, WI
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,127

You have to attach the text to price/time. The price part can be worked around with the floating function. The time portion (to get to the right edge) can only be moved so far. You can use a time value of MinutesToTime(TimeToMinutes(time+1)) to push it one bar into the future, but that is as far as you can go. The horizontal alignment of the text object can also be used to push it as far right as it can go. To my knowledge, that is the best you can do.

Reply With Quote
Thanked by:
  #6 (permalink)
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,437 since Jun 2009
Thanks Given: 33,199
Thanks Received: 101,592

You can use the built in functions GetAppInfo to tell you the min/max x-axis value.

Text_SetLocation(mytextiddatetimeGetAppInfo(aiHighestDispValue) - (10 MinMove/PriceScale)); 


We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
cbritton's Avatar
Atlanta, Georgia
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

From the TS support site:


{================================================= ==================== 
NAME:      text_FloatLocation 
:    Function 
AUTHOR:    Bill Conley (AKA Kahuna
Similar to the TS text_Float function except does not use 
the "Date[TextBarsBack]" construct for horizontal spacing
The code used (borrowed from text_SetVertLocationdoes a better 
            job of locating text a consistent distance from the last bar 
            on tick 
and volume charts where bars may share the same time
1.0        10/08/09    Initial Version 
== Inputs Variables =================================================} 
TxtIDNumericSimple ),    // ID of Text Object to be relocated 
VertPctNumericSimple)    // Verticle Pct of Chart for Location 

RightDateTime(0) , 
HighestDispValue(0) , 
LowestDispValue(0) , 

Calculations ================================================== ====} 
LastBarOnChart then begin 
ValidTextID then    begin 
HighestDispValue GetAppInfo(aiHighestDispValue); 
LowestDispValue GetAppInfo(aiLowestDispValue); 
TextDispValue LowestDispValue 0.01 VertPct * (HighestDispValue LowestDispValue) ; 
MinutesToTime(FracPortion(RightDateTime) * 60 24), TextDispValue);  
Text_SetStyle(TxtID11) ; // Left & Above  
RaiseRunTimeError("TextID does not exist."); 
Returns ================================================== =========} 
text_FloatLocation 1
This code was submitted as part of a bar countdown timer. Neat stuff, but I only needed this function and I thought I would pass it along.


“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
Thanked by:

Last Updated on August 8, 2010

© 2024 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 - Downloads - Top
no new posts