NexusFi: Find Your Edge


Home Menu

 





Fixed position for text on a chart


Discussion in EasyLanguage Programming

Updated
      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,612 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




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

Hi!

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?
Sierra chart Trading system
Sierra Chart
Jlab rankings and comparison of prop firms
Funded Trading Evaluation Firms
GFIs1 DAX System
Traders Hideout
Multiple Timeframes in One Chart/Strategy
MultiCharts
Strategy runs differently with in Automated Order Execut …
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Machine Learning Journal
41 thanks
Is the WH trying to engineer a recession? This Wall Stre …
15 thanks
Demark Indicator
5 thanks
OpenAIs Deep Research - finance/trading related prompts
3 thanks
Daytrading ES & NQ
3 thanks
  #3 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,128


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)
Henrik
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
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 625 since Jan 2010
Thanks Given: 356
Thanks Received: 1,128

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
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,719 since Jun 2009
Thanks Given: 33,450
Thanks Received: 102,340

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

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

Mike




Join the free Markets Chat beta: Real-time Trading Insights

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 X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
cbritton's Avatar
 cbritton 
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:

 
Code
                            

{================================================= ==================== 
    
NAME:      text_FloatLocation 
     
    TYPE
:    Function 
    
AUTHOR:    Bill Conley (AKA Kahuna
     
    
OUTPUT
            
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
 
    
COMMENTS
            
None
 
    
RELEASE NOTES
            
1.0        10/08/09    Initial Version 
 
== Inputs Variables =================================================} 
 
inputs
    
TxtIDNumericSimple ),    // ID of Text Object to be relocated 
     
VertPctNumericSimple)    // Verticle Pct of Chart for Location 

 
vars
    
ValidTextID(false), 
    
RightDateTime(0) , 
    
HighestDispValue(0) , 
    
LowestDispValue(0) , 
    
TextDispValue(0

 
{== 
Calculations ================================================== ====} 
 
    if 
LastBarOnChart then begin 
        ValidTextID 
Text_Exist(TxtID); 
        if 
ValidTextID then    begin 
            RightDateTime 
GetAppInfo(aiRightDispDateTime); 
            
HighestDispValue GetAppInfo(aiHighestDispValue); 
            
LowestDispValue GetAppInfo(aiLowestDispValue); 
            
TextDispValue LowestDispValue 0.01 VertPct * (HighestDispValue LowestDispValue) ; 
            
Text_SetLocation(TxtIDJulianToDate(IntPortion(RightDateTime)),  
                
MinutesToTime(FracPortion(RightDateTime) * 60 24), TextDispValue);  
            
Text_SetStyle(TxtID11) ; // Left & Above  
        
end  
        
else  
            
RaiseRunTimeError("TextID does not exist."); 
    
end 
 
{== 
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.

Regards,
-C


“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


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