This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
Here is the second custom drawing tool. The first one can be downloaded here Close Price Above Cursor, it displays the selected security's price above the mouse cursor.
The current object draws a trendline. A trendline is composed of two or more points; it is often used in trading as a support or resistance line. Trendlines are an important tool used by traders in technical analysis to identify trends.
This trendline object is almost similar to the default QuantShare trendline, except that it displays the bars and Y distance during drawing.
The object requires two clicks. The script first detects the number of clicks. If this number is equal to one, then we draw a trend line that starts from the first click location and ends at the cursor location.
PointPosition p1 = Functions.ClickPositions[0];
PointPosition p2 = Functions.CursorPosition;
LineObj line = Functions.PaneObject.DrawLine("", p1.X, p1.Y, p2.X, p2.Y);
At the same time, we also draw the number of bars and the Y distance between these two points:
double distance = Math.Abs(p1.X - p2.X);
double distanceY = Math.Round(Math.Abs(p1.Y - p2.Y), 2);
TextObj text = Functions.PaneObject.DrawText("text", distance + ":" + distanceY, p1.X, p1.Y);
If the number of clicks is equal to two, then we draw a trend line that starts from the first click location and ends at the second click location.
PointPosition p1 = Functions.ClickPositions[0];
PointPosition p2 = Functions.ClickPositions[1];
LineObj line = Functions.PaneObject.DrawLine("", p1.X, p1.Y, p2.X, p2.Y);
line.Line.Color = (Color)Functions.GetSettings("Line Color");
Functions.FinishDrawing();
The "GetSettings" function retrieves a custom color for the trendline. You will need to add a setting first. The color can be defined by right clicking on the drawing tool.
To specify that the drawing process of the trendline is complete, we simply call the "FinishDrawing" method.
You have to log in to bookmark this object What is this?
>>>> More trading objects? click here to search for trading sytems, downloaders, screens, custom drawing tools, indicators... by country, market or style.