Vector2DrawQuadLibrary "Vector2DrawQuad"
functions to handle vector2 Quad drawing operations.
new(a, b, c, d, xloc, bg_color, line_color, line_style, line_width)
Draws a quadrilateral with background fill.
Parameters:
a : v2 . Vector2 object, in the form `(x, y)`.
b : v2 . Vector2 object, in the form `(x, y)`.
c : v2 . Vector2 object, in the form `(x, y)`.
d : v2 . Vector2 object, in the form `(x, y)`.
xloc : string . Type of axis unit, bar_index or time.
bg_color : color . Color of the background.
line_color : color . Color of the line.
line_style : string . Style of the line.
line_width : int . Width of the line.
Returns: Quad object.
copy(this)
Copy a existing quad object.
Parameters:
this : Quad . Source quad.
Returns: Quad.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source quad).
Parameters:
this : Quad . Source quad.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Quad.
set_position_a(this, position)
Set the position of corner `a` (modifies source quad).
Parameters:
this : Quad . Source quad.
position : Vector2 . New position.
Returns: Source Quad.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source quad).
Parameters:
this : Quad . Source quad.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Quad.
set_position_b(this, position)
Set the position of corner `b` (modifies source quad).
Parameters:
this : Quad . Source quad.
position : Vector2 . New position.
Returns: Source Quad.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source quad).
Parameters:
this : Quad . Source quad.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Quad.
set_position_c(this, position)
Set the position of corner `c` (modifies source quad).
Parameters:
this : Quad . Source quad.
position : Vector2 . New position.
Returns: Source Quad.
set_position_d(this, x, y)
Set the position of corner `d` (modifies source quad).
Parameters:
this : Quad . Source quad.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Quad.
set_position_d(this, position)
Set the position of corner `d` (modifies source quad).
Parameters:
this : Quad . Source quad.
position : Vector2 . New position.
Returns: Source Quad.
set_style(this, bg_color, line_color, line_style, line_width)
Update quad style options (modifies Source quad).
Parameters:
this : Quad . Source quad.
bg_color : color . Color of the background.
line_color : color . Color of the line.
line_style : string . Style of the line.
line_width : int . Width of the line.
Returns: Source Quad.
set_bg_color(this, bg_color)
Update quad style options (modifies Source quad).
Parameters:
this : Quad . Source quad.
bg_color : color . Color of the background.
Returns: Source Quad.
set_line_color(this, line_color)
Update quad style options (modifies Source quad).
Parameters:
this : Quad . Source quad.
line_color : color . Color of the line.
Returns: Source Quad.
set_line_style(this, line_style)
Update quad style options (modifies Source quad).
Parameters:
this : Quad . Source quad.
line_style : string . Style of the line.
Returns: Source Quad.
set_line_width(this, line_width)
Update quad style options (modifies Source quad).
Parameters:
this : Quad . Source quad.
line_width : int . Width of the line.
Returns: Source Quad.
move(this, x, y)
Move quad by provided amount (modifies source quad).
Parameters:
this : Quad . Source quad.
x : float . Amount to move the vertices of the quad in the x axis.
y : float . Amount to move the vertices of the quad in the y axis.
Returns: Source Quad.
move(this, amount)
Move quad by provided amount (modifies source quad).
Parameters:
this : Quad . Source quad.
amount : Vector2 . Amount to move the vertices of the quad in the x and y axis.
Returns: Source Quad.
rotate_around(this, center, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this : Quad . Source quad.
center : Vector2 . Center coordinates of the rotation.
angle : float . Value of angle in degrees.
Returns: Source Quad.
rotate_around(this, center_x, center_y, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this : Quad . Source quad.
center_x : int . Center coordinates of the rotation.
center_y : float . Center coordinates of the rotation.
angle : float . Value of angle in degrees.
Returns: Source Quad.
Draw
Vector2DrawTriangleLibrary "Vector2DrawTriangle"
Functions to draw a triangle and manipulate its properties.
new(a, b, c, xloc, bg_color, line_color, line_style, line_width)
Draws a triangle with background fill using line prototype.
Parameters:
a : v2 . Vector2 object, in the form `(x, y)`.
b : v2 . Vector2 object, in the form `(x, y)`.
c : v2 . Vector2 object, in the form `(x, y)`.
xloc : string . Type of axis unit, bar_index or time.
bg_color : color . Color of the background.
line_color : color . Color of the line.
line_style : string . Style of the line.
line_width : int . Width of the line.
Returns: Triangle object.
copy(this)
Copy a existing triangle object.
Parameters:
this : Triangle . Source triangle.
Returns: Triangle.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Triangle.
set_position_a(this, position)
Set the position of corner `a` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
position : Vector2 . New position.
Returns: Source Triangle.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Triangle.
set_position_b(this, position)
Set the position of corner `b` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
position : Vector2 . New position.
Returns: Source Triangle.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
x : int . Value at the x axis.
y : float . Value at the y axis.
Returns: Source Triangle.
set_position_c(this, position)
Set the position of corner `c` (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
position : Vector2 . New position.
Returns: Source Triangle.
set_style(this, bg_color, line_color, line_style, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this : Triangle . Source triangle.
bg_color : color . Color of the background.
line_color : color . Color of the line.
line_style : string . Style of the line.
line_width : int . Width of the line.
Returns: Source Triangle.
set_bg_color(this, bg_color)
Update triangle style options (modifies Source triangle).
Parameters:
this : Triangle . Source triangle.
bg_color : color . Color of the background.
Returns: Source Triangle.
set_line_color(this, line_color)
Update triangle style options (modifies Source triangle).
Parameters:
this : Triangle . Source triangle.
line_color : color . Color of the line.
Returns: Source Triangle.
set_line_style(this, line_style)
Update triangle style options (modifies Source triangle).
Parameters:
this : Triangle . Source triangle.
line_style : string . Style of the line.
Returns: Source Triangle.
set_line_width(this, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this : Triangle . Source triangle.
line_width : int . Width of the line.
Returns: Source Triangle.
move(this, x, y)
Move triangle by provided amount (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
x : float . Amount to move the vertices of the triangle in the x axis.
y : float . Amount to move the vertices of the triangle in the y axis.
Returns: Source Triangle.
move(this, amount)
Move triangle by provided amount (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
amount : Vector2 . Amount to move the vertices of the triangle in the x and y axis.
Returns: Source Triangle.
rotate_around(this, center, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
center : Vector2 . Center coordinates of the rotation.
angle : float . Value of angle in degrees.
Returns: Source Triangle.
rotate_around(this, center_x, center_y, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this : Triangle . Source triangle.
center_x : int . Center coordinates of the rotation.
center_y : float . Center coordinates of the rotation.
angle : float . Value of angle in degrees.
Returns: Source Triangle.
Plotchar - How to draw external symbols on a chartHey everyone
It's been a while :) but still on holidays and working on the website. I'll resume the scripts sharing shortly once I'll get back home
For today, I wanted to share a very useful script that is going to make you a top of money 100% guaranteed and you'll even have a Lamborghini delivered at your place by tomorrow... (imagine some followers would believe me for this)
This "script" is a proof of concept that you can draw external Unicode symbols on a chart.
If you're tired with the plotshape shapes by default, you can use some others - I usually find mine there emojipedia.org
What are the use cases?
- Draw a dead skeleton when your stop-loss is hit
- Draw a winning cup when your take profit is hit
- Draw a coffin when you run out of capital
FAQ
Q: Does this script has any interest?
A: I'm not sure myself
Q: Will you make money using it?
A: I'm not a financial advisor but ... very likely NO
Q: Is it cool though?
A: Hell yeah!!
Be sure to hit the thumbs up so that I'll share real scripts the next times and not "joke scripts". I promise it's the first and last time I'm sharing such a script
Dave
____________________________________________________________
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
draw line at bar on condition, up to 40 bars in lengthDraws line at bar on condition, up to 40 bars in length.
Well, that's not a line, but a set of `—` characters. But it looks like a line, so it is line.