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 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (2 thanks)
    1. trending_up 9,371 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)
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?
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
75 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
16 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,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)
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,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
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657

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

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
 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


© 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