Click here to Login

Trading Software Trading objects Features How-to Blog Search



Trendline

by QuantShare, 49 days ago
Share |

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.


Share This ->
Share |


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.

>>>> To get this item and hundreds of other items, click here to join and download the Best Trading Software for Free .



No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Write a review no reviews Number of downloads 15 downloads Notes Report an item


Type: Custom Drawing Tool

Object ID: 451


Country:
All

Market: All

Style:
Technical Analysis




Related Trading Objects



Country
Page 1
Trading the Equity Curve
by QuantShare, uploaded several months ago


No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 4 Notes Report an item
Opening Range Breakout Indicator
by QuantShare, uploaded several months ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 3 Notes Report an item
Wilder's Smoothing - Moving Average
by QuantShare, uploaded several months ago
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 9 Notes Report an item
Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object









Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects
Show All
Slope Angle of a Trendline (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 13 Notes Report an item
Close Price Above Cursor (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 10 Notes Report an item
Futures symbols (by Tom Huggens, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 388 Notes Report an item
Forex symbols (by Tom Huggens, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 556 Notes Report an item
USD/INR Exchange Rate - Historical Data (by Tom Huggens, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 15 Notes Report an item
Horizontal Line - Changes by Value and Percentage (by Caleb, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 7 Notes Report an item
Historical Stock Market Data (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads 1300 Notes Report an item
Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis


Forum Threads



Random Blog Posts

Trading software new features

Money Management: Optimize a trading system

Optimization of a trading system

How to create custom databases in your trading software

Technical Analysis Using Multiple Timeframes - Second Part

New features in QuantShare - Trading Software

Technical Analysis Using Multiple Timeframes

Short Index - Part 2

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
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