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




 
Search this Thread

Plotting text at a fixed corner of the screen MULTICHARTS

  #1 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 66 since May 2019
Thanks Given: 7
Thanks Received: 9

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?
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
What broker to use for trading palladium futures
Commodities
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
15 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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 Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 66 since May 2019
Thanks Given: 7
Thanks Received: 9

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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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


© 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