Click here to Login





                                                   horizontal line

  0

0
Juliettpapa
2011-04-23 04:58:27


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

Regards
Joerg



QuantShare
2011-04-23 05:36:17

  0

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



QuantShare
2011-04-29 08:33:50

  0

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.FinishDrawing();
}

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

#functions#
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



Juliettpapa
2011-04-29 10:50:55

  0

Thanks. Well done!


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
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 use the Fibonacci retracement drawing tool
How to plot the number of stock tweets per day
How to plot support and resistance lines automatically
How to scale and move the chart Y-axis

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 Scan for Parallel Resistance and Support Lines
Quantitative Analysis: Price Channels









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.