Click here to Login





How to plot a time-series that do not update the chart scale

Updated on 2011-07-06 05:18:45

Share |

Each time you plot a time-series, the chart scale is updated automatically so that each time-series fit within the chart.
If you plot a line at 80 and the displayed stock prices vary between 25 and 35, you will end up with a chart that has a 25-80 scale range.



One way to fix this is by instructing QuantShare to ignore a specific time-series in the scale calculation. This can be done by adding a specific style in the "Plot" function last parameter.

The previous chart was displayed using the following formula:
PlotCandleStick("Quotes", colorBrown|255|colorViolet|255|0, StyleOwnScale);
Plot(80, "Line-80", colorBlack, chartLine, StyleSymbolNone);


By using the "StyleNoScale" setting, we instruct QuantShare to ignore the "Line-80" time-series in the scale calculation. The new formula is:
PlotCandleStick("Quotes", colorBrown|255|colorViolet|255|0, StyleOwnScale);
Plot(80, "Line-80", colorBlack, chartLine, StyleSymbolNone|StyleNoScale);


The "|" operator means that we want to apply both "StyleSymbolNone" and "StyleNoScale" styles.



Line-80 is now hidden and it is displayed only when another non-hidden time-series (such as stock prices) reaches the level 80.








no reviews (Log in)







Other how-to articles




How to plot two different time frames in the same chart





How to scale and move the chart Y-axis





How to plot a stock using different periods in the same chart





How to plot the number of stock tweets per day





How to display the bar index of a stock on a chart





How to create a log scale chart





How to plot the relative performance of several stocks/indices





How to plot arrows below/above candlesticks on a chart





How to dynamically update the settings of an indicator







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 © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items