Can you add a general non-time specific note to a chart
Forums › ProRealTime English forum › ProBuilder support › Can you add a general non-time specific note to a chart
- This topic has 11 replies, 3 voices, and was last updated 1 year ago by Crocogotter.
-
-
01/23/2023 at 4:55 PM #208007
Is it possible to add a note to a chart that isn’t time specific, so that it is always visible whenever you open the chart?
Basically I’d like to have reminders or notes about a chart whenever I open it, say at the top of the chart? It seems a basic function, but I can’t work out how to do it.
Many thanks in advance.
01/23/2023 at 4:58 PM #208008Hi,
you can use these added instructions last year using screen pixels:
https://www.prorealcode.com/topic/new-drawing-instructions-anchoring-in-pixels/
1 user thanked author for this post.
01/23/2023 at 5:03 PM #208010Many thanks for such a speedy reply; that looks to be what I’m looking for 👍.
01/23/2023 at 6:00 PM #208013I’ve had a look at that, and I think it will help, if I can get it to work.
Could you explain, or preferably illustrate, exactly the code to get the text to appear please? I understand the various definitions, but am unsure how to get the text on the screen in the first place.
01/23/2023 at 6:13 PM #208014If you take second post from Nicolas in that link, number #190103 the second example and its explanation is a good illustration:
Write the word “test” 50 pixels to the right and 30 pixels higher than the bottom-left corner of the graph.
1drawtext ("test", 50 ,30) anchor(bottomleft)As you talked about the top, similarly you can use the middle-top as anchor, and use negative pixel value on vertical axis to go below top edge :
1drawtext ("test", 0 , -30) anchor(top)01/23/2023 at 6:21 PM #208015I understand that, I just don’t understand where I use it; I tried to create an indicator with that code but it didn’t work, and I’m otherwise at a loss I’m afraid.
01/23/2023 at 6:22 PM #208016I just noticed you posted in “platform support” forum, I’ll move shortly this topic to the forum specific to custom indicators: the “probuilder forum”. This recommendation for forum use and a few others may be found in the yellow background box at bottom of this page, please have a quick look if not familiar with them, thanks.
List of all available forums to route topics: https://www.prorealcode.com/forums/
01/23/2023 at 6:28 PM #208018Ok, you need to click on the indicators button, either at top of chart if using PRT v12 (or even the good old v10.3), or at bottom left if using PRT v11. And there, instead of the simplified creation window, you need to use the creation by code, not forgetting the traditional “return” line at the end of the script.
Then you give your indicator a name, execute it, save it, it should appear as a separate window below price window. After it’s saved, it is now available in your indicators list. Then you need to add it to your price window, if you haven’t done it before, here is how in 1mn video:
https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-indicator-on-price-prorealtime/
123drawtext ("test", 0 , -30) anchor(top)return1 user thanked author for this post.
01/23/2023 at 6:38 PM #208020Sorry, was a bit out of practice with my coding, it’s working now thanks.
01/23/2023 at 9:57 PM #208026One last question, I have tried the search function but without success I’m afraid.
Is there a way of reading the chart name (eg the particular stock or forex pair) and using that to add a specific text message for that stock with a simple
if NAME = “TSLA” then
drawtext (etc)
endif
01/24/2023 at 9:52 AM #208046It’s not possible for code to read the chart. Additionally, the sole data type supported is the floating point numeric type.
01/24/2023 at 11:38 AM #208079Ok, thanks.
Might that be something to consider for future versions or would the structure of the charts mean it will never happen?
-
AuthorPosts
Find exclusive trading pro-tools on