Click here to Login





How to create a hatched area in a chart

Updated on 2011-12-31 03:43:48

Share |

Steps:

- Right click on a chart then click on "Create new pane"
- Right click on the new pane then click on "Edit formula"
- Type the following lines to add a moving average indicator

a = sma(close, 30);
plot(a, "SMA", colorRed, ChartLine, StyleOwnScale);


- To create a hatched area, we must use the "SetHatchBrush" function.

Type the function just after the indicator you want to update.

Example Chart 1:

SetHatchBrush("BackwardDiagonal", colorRed);




Example Chart 2:

SetHatchBrush("SmallGrid", colorRed|100);




By adding "|100" next to "colorRed", we instruct QuantShare to set the opacity of the red color to 100 (0 = transparent, 255 = opaque)

To list the different hatch brushes, set the mouse cursor after "SetHatchBrush(" then use the CONTROL+SPACE shortcut.

There are more than 50 hatch brushes, including:
Cross
DarkDownwardDiagonal
DashedHorizontal
Divot
DottedDiamond
LargeCheckerBoard
Percent25








no reviews (Log in)







Other how-to articles




How to create a log scale chart





How to create a chart with a black background





How to create a custom trendline





How to remove a chart pane's margins





How to create a custom trading indicator





How to create histogram charts





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





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





How to create a formula







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.