Support Board
Date/Time: Mon, 03 Feb 2025 11:02:46 +0000
Is it possible a floating text window in sierrachart?
View Count: 997
[2019-11-07 09:22:22] |
GiovanniD - Posts: 41 |
Hi if not exist I would like to suggest a brilliant idea that has had an MT5 programmer. In MT5 as in Sierra it is possible to send comments to the console, to see the contents of a variable for example. The programmer has decided to create a new class that allows to display the string comments line by line in a special window that appears on the graph, which can be moved at will. It is possible to define the color of the window (background and border), the color of the text, the style of the text, the size of the text The applications of this idea are practically endless! Attached 2 application images made by me and the really simple code to implement them.. I hope it is a doable idea even in SierraChart, if not immediately, in the future. I don't think it's complicated .. at the limit, instead of using a floating window on the chart you could immediately use a special space normally dedicated to the indicators .. at this point defining a new class shouldn't be a big problem. If needed, I also have the source code of the MT5 class, but it's nothing complex, use the basic MT5 commands. what do you think? //--- global variables
#define COLOR_BACK clrWhite #define COLOR_BORDER clrDimGray #define COLOR_CAPTION clrBlue #define COLOR_TEXT clrDimGray #define COLOR_WIN clrLimeGreen #define COLOR_LOSS clrOrangeRed CComment comment; //"comment" associated to the CComment class //--- init zone settings srand(GetTickCount()); //random number generation name="panel_"+IntegerToString(rand()); //panel name comment.Create(name,100,150); // panel creation: name, dimensionX, dimensionY (default initial position, not defined, automatically set in the left part of the chart) comment.SetAutoColors(InpAutoColors);//colors defined "Auto" comment.SetColor(COLOR_BORDER,COLOR_BACK,255);//border color assigned to clrDimGray comment.SetFont("Lucida Console",13,false,1.7);//font, dimension, etc comment.SetText(0,"FINESTRA : " + name, COLOR_TEXT);//first row (0) of the window, content, color comment.SetText(1,"PRICE D1 H4 H1 M30 M15 M5", COLOR_CAPTION);//second row (1) of the window, content, color ............ etc comment.Show();//finally show the window //--- main and recursive code for cicle (x>1)//x = row { comment.SetText(x, intest[x-2] + " " + DoubToStringa(D1p,2) + " " + DoubToStringa(H4p,2) + " " + DoubToStringa(H1p,2) + " " + DoubToStringa(M30p,2) + " " + DoubToStringa(M15p,2) + " " + DoubToStringa(M5p,2),COLOR_TEXT);//simply I go to calc all the rows I need and put them in the "comment" as string, if a row exist, simply replace it } comment.Show();//update the window content //on indicator exit comment.Destroy();//to remove the class object and delete the window |
ccomment1.jpg / V - Attached On 2019-11-07 09:20:29 UTC - Size: 73.26 KB - 332 views ccomment2.jpg / V - Attached On 2019-11-07 09:20:36 UTC - Size: 63.32 KB - 323 views |
[2019-11-07 09:54:59] |
User907968 - Posts: 825 |
Did you look at 'Study Summary Window'? Study Summary Window |
[2019-11-07 10:31:58] |
GiovanniD - Posts: 41 |
No, I do not know it. If I write an indicator or an automated trading system, can I write the result of any calculations performed by my code in that window in real time? What I wish do is this, so if I can whit it, it's great.
|
[2019-11-08 01:36:41] |
Sierra Chart Engineering - Posts: 104368 |
There are two different ways of doing this. Certainly the Study Summary window. Yes you can do what is described in post #3 because the Study Summary window is going to display the data at the last index in the study Subgraph Data arrays: ACSIL Interface Members - sc.Subgraph Array You can also draw text directly on a chart using the text tool: Using Drawing Tools From an Advanced Custom Study And the Text can also be movable by making the text user drawn. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: