Click here to Login

                                                   horizontal line


2011-04-23 04:58:27

How can i draw a horizontal line starting at a given date at a given price level?


2011-04-23 05:36:17


Best Answer
I will send you the script to create a horizontal line that starts at a given date in few days (after the release of the new version)
I will also send you the script you requested by email

2011-04-29 08:33:50


Here is the horizontal line script: (Tools -> Custom Drawing Tools)

double y = Functions.CursorPosition.Y;
y = Math.Round(y, 3);
double x = Functions.CursorPosition.X;
if(Functions.ClickPositions.Length > 0)
y = Functions.ClickPositions[0].Y;
y = Math.Round(y, 3);
x = Functions.ClickPositions[0].X;
Functions.SetSettings("Price", y);

Functions.SettingChanged = change;


Functions.PaneObject.DrawLine("line1", x, y, Functions.ChartData.EndIndex, y);
TextObj text = Functions.PaneObject.DrawText("text1", y.ToString(), x, y);
text.Location.VerticalAlignment = "bottom";

void change(object sender, SettingEventArgs e)
if(e.Name == "Price")
Functions.ClickPositions[0].Y = (double)e.Value;

Add one setting: Input - Price - Numeric
Right click on the bookmark panel to add a shortcut for this drawing item

2011-04-29 10:50:55


Thanks. Well done!

No more messages


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"


Trading Items
Rate of Change Horizontal Line
Horizontal Line - Changes by Value and Percentage
Drawdown Line
Least Squares Regression Line
Stock Bounces off its Previous Resistance or Support Line

How-to Lessons
How to draw an horizontal segment line using QS language
How to install the previous version of QuantShare
How to use the Fibonacci retracement drawing tool
How to plot the number of stock tweets per day
How to plot support and resistance lines automatically

Related Forum Threads
Positioning horizontal line
Horizontal line incorporated in indicator overlaid on main chart
Horizontal line on the intraday chart with the day's opening pric...
Horizontal line on indicator
Profit loss protection trailing stop line on chart .

Blog Posts
Custom Indicator: Accumulation Distribution Line
Detect chart patterns using the auto support/resistance indicator
Backtesting chart patterns using the auto support and resistance ...
How to Backtest Your Trading System for Each Industry
QuantShare Programming Language Tutorial

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2022
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.