NexusFi: Find Your Edge


Home Menu

 





Plotting text at a fixed corner of the screen MULTICHARTS


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ABCTG with 2 posts (1 thanks)
    2. looks_two Sinatra Fan with 2 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Contrahour with 1 posts (0 thanks)
    1. trending_up 3,544 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 101 since May 2019
Thanks Given: 8
Thanks Received: 12

I am trying to put together text that displays on my screen and lets me know what's going on at a moments notice. However, so far the best I could do is get it to fix a certain distance from the current bar. The end result is that the text bounces around as the bar develops.

Is there sample code or suggestions as to how I can display text in the top right corner of the screen no matter what is going on with the chart???

Thanks


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


Sinatra Fan,

you can use the reserved words aiHighestDispValue and aiLowestDispValue to get the current highest and lowest values of your screen. Together with aiLeftDispDateTime and aiRightDispDateTime you can update the location of the text to what ever your screen currently shows.
It might make sense to use a timer to forcefully update the location change in the absence of incoming ticks.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 101 since May 2019
Thanks Given: 8
Thanks Received: 12

That's exactly what I needed. thanks my friend.


Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

Sinatra Fan,

you are welcome and thank you for your feedback.

Regards,

ABCTG


Sinatra Fan View Post
That's exactly what I needed. thanks my friend.


Follow me on X Reply With Quote
  #6 (permalink)
 Contrahour 
Richmond
 
Experience: Advanced
Platform: Tradestation
Trading: Emini
Posts: 3 since Apr 2018
Thanks Given: 2
Thanks Received: 0

You can also use the chartinghost object. It's very difficult but is explained pretty well if you search for a youtube video on Drawing Text Objects In A Static Position.

The code for the video example:

 
Code
Using elsystem; 
Using elsystem.drawingobjects; 
Using charting; 

Var: 
TextLabel Text1( Null ), 
TextLabel Text2( Null ), 
ChartingHost ChartingHost1( NULL ); 


method void ChartingHost1_OnSize( elsystem.Object sender, charting.OnSizeEventArgs args )
Vars: XYPoint XYPt; 
begin 
XYPt = XYPoint.Create( args.Width - 100, args.Height * .9 ) ; 
Text1.PointValue = XYPt; 

XYPt = XYPoint.Create( args.Width - 100, args.Height * .85 ); 
Text2.PointValue = XYPt; 
end; 

method void ChartingHost1_OnInitialUpdate( elsystem.Object sender, charting.OnInitialUpdateEventArgs args ) 
Vars: XYPoint XYPt;
begin 
XYPt = XYPoint.Create( args.Width - 100, args.Height *.9 ); 
Text1.PointValue = XYPt; 
XYPt = XYPoint.Create( args.Width - 100, args.Height *.85 ); 
Text2.PointValue = XYPt; 
end; 

Once 
Begin 
 
ChartingHost1 = new charting.ChartingHost; 
ChartingHost1.Name = "ChartingHost1" ;
ChartingHost1.oninitialupdate += ChartingHost1_OnInitialUpdate; 
ChartingHost1.onsize += ChartingHost1_OnSize;
 
Text1 = TextLabel.Create( XYPoint.Create( 20, 20), NumToStr( XAverage( C, 30 ), 5 ) );
Text2 = TextLabel.Create( XYPoint.Create( 20, 20), NumToStr( XAverage( C, 10 ), 5 ) ); 

Text1.Persist = true; 
Text2.Persist = true; 

DrawingObjects.Add( Text1 ); 
DrawingObjects.Add( Text2 ); 

End;

Text1.TextString = NumToStr (XAverage(C,30), 5);
Text2.TextString = NumToStr (XAverage(C,10), 5);


Reply With Quote




Last Updated on July 21, 2020


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