Click here to Login





                                                   Plotting text on a chart

Back to threads - Tags: --
  0

0
Dave W.
2013-03-27 03:21:14


Hi. I want to plot some text on a chart, probably using a statement like this:


PrintChart(c, "", bottomleft, colorWhite, colorTransparent, colorBlack, 255);

Two questions:
1. What constants are available to substitute for "bottomleft"? I couldn't find a list of these constants in the programming guide.
2. Is there a method that provides more granularity over when on the chart the information I want to plot is shown, e.g., using x,y coordinates?

Thanks for your help.



QuantShare
2013-03-27 10:37:01

  0

Hi,

1/ If you put your mouse cursor just after "bottomleft" and press CONTROL+SPACE, you will see the list of available options.
(BottomLeft, BottomRight, TopLeft, TopRight)

2/ After you use "PrintChart", use the "UpdatePrintSettings" function to add/update "PrintChart" settings.

Example:
UpdatePrintSettings("PositionX", 1, 50);




Dave W.
2013-03-27 15:59:48

  0

Ok, nice. That works. Thanks.

One follow-up question. So I have the following code to set the X,Y coordinates and they are working fine:

UpdatePrintSettings("PositionX", 1, 1); //Set horizontal position of text
UpdatePrintSettings("PositionY", 1, 40); //Set vertical position of text

When I bring up the information on the UpdatePrintSettings command, it doesn't show me anything about what the "1" values represent in the 2nd field above (and putting my cursor after the "1" and getting the available help doesn't seem to provide the list of valid values). All the help says is "NUMBER rule". Is there somewhere I can get a list of the valid values and their functions?

Thanks.
Dave



QuantShare
2013-03-27 21:54:13

  0

Hi,

You can find information in the documentation file. However, that file is not yet updated with recent additions like the "UpdatePrintSettings".

If the rule (2nd parameter) is true (1) on the selected bar then "PositionX" or "PositionY" is updated. Otherwise the "UpdatePrintSettings" is not applied.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Relative Performance/Return Chart - Compare Several Assets/Stocks
Chart Patterns: Double Top and Double Bottom
Relative Performance Chart - Dynamic assets and index
Relative Performance/Return Chart - Compare Several Assets/Stocks...
Plot Economic Indicators on a Chart

How-to Lessons
How to plot arrows below/above candlesticks on a chart
How to display two stocks on the same chart
How to download new quotes when selecting a chart
How to plot two different time frames in the same chart
How to display notes/commentaries on a chart

Related Forum Threads
Better Plotting for Sell Arrows on Chart
Plot text and variable in the same line
TO SHARE: Candlestick chart with a few interesting features
NIFTY CHART
Margin @ top of chart

Blog Posts
A simple but useful way to display distances in a chart
Compare Multiple Securities in a Single Chart
How to Backtest a Strategy from a Chart
How to Calculate and Display the Bid/Ask Spread on a Chart
Custom Shortcuts - Move a Chart to Display the Last Quotes/Data









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.