Supply demand gaps and ohlcthis indicator calculates supply and demand zones,camerilla pivot points,gaps and OHLC
المؤشرات والاستراتيجيات
OPEX2025Credit to "ochlocracy" for the initial build of this.
Shows monthly and quarterly expirations
I have updated with 2025 dates
Enjoy
Improved Exhaustion Signal backtestTry this on higher tiemframes and be amazed.
Insane profitability...
youre welcome
Improved Exhaustion Signalextremely profitable indicator.
Tested in backtesting consistintly made 450k plus
Only works higher timeframes
OHLCPlots:
Daily Open: A line is drawn for the daily open, with its color indicating whether the current close is above (green) or below (red) the open.
Daily Close: A cross marker is placed at the daily close price (colored fuchsia).
Daily High and Low: Circles mark the daily high (green) and low (red).
Master Litecoin Futures Premium Percentage - CoinbaseMaster Litecoin Futures Premium Percentage - Coinbase
Close Below Previous Week Low on 4Halerts you when a stock closes below the previous week's low on the 4 hour timeframe.
⚜️SMB Golden Rate⚜️The ⚜️SMB Golden Rate⚜️ indicator is designed to automatically calculate key support and resistance levels across multiple timeframes and present them in a simple, user-friendly table. This tool helps traders make better trading decisions based on real-time market analysis.
Key Features
Automatic Support and Resistance Calculation:
Utilizes Heikin Ashi data to calculate support and resistance levels.
Multi-Timeframe Display:
Displays daily (Daily), 4-hour (4H), and hourly (1H) support and resistance levels in a detailed table.
Interactive Table:
Clearly organizes pivot levels (Pivot), supports, and resistances by timeframe.
Price Change Tracking:
Shows percentage changes relative to the previous day's closing price.
Fibonacci Levels:
Includes Fibonacci retracement levels to identify potential entry and exit points.
Customizable Timeframes:
Allows customization of timeframes for Fibonacci and other components to suit different trading strategies.
This indicator is ideal for:
Day Traders: Identify key support and resistance levels for intraday trading.
Swing Traders: Make better decisions around critical price ranges.
Scalpers: Find quick entry and exit points effectively.
Adding the Indicator to Your Chart:
Search for ⚜️SMB Golden Rate⚜️ in the "Indicators" section on TradingView and add it to your chart.
Support and Resistance Table:
Columns include values for Daily, 4H, and 1H timeframes.
Levels R3, R2, and R1 indicate resistances, while S3, S2, and S1 indicate supports.
Fibonacci Analysis:
Fibonacci levels are displayed as colored lines:
Red: Dangerous Zone
Orange: Confirmation Zone
Green: Ideal Entry Levels
Price Change Tracking:
A table displays the percentage price change compared to the previous day’s close.
This indicator is crafted to assist traders in making precise trading decisions by focusing on real-time market analysis. With multi-timeframe support, pivot levels, and Fibonacci tools, the ⚜️SMB Golden Rate⚜️ provides deep insights into price movements, helping you trade with confidence.
PVSRA Volume Suite CombinedLe volume en bleue reste a améliorer " exemple en 3d arrière plan ou a moitié transparent".
MACD + RSI LabelsThe indicator shows the BUY and SELl signals based on the MACD and RSI. The RSI is kept between 40 and 60.
MACD + RSI LabelsThis indicator shows the BUY and SELL signals based on the MACD and RSI signals. the RSI is kept between 40 and 60.
MACD + RSI LabelsThis indicator shows the buy and sell indicator on the chart when MACD crossing the signal line and RSI is above 40 or below 60
Geo. Geo.
This library provides a comprehensive set of geometric functions based on 2 simple types for point and line manipulation, point array calculations, some vector operations (Borrowed from @ricardosantos ), angle calculations, and basic polygon analysis. It offers tools for creating, transforming, and analyzing geometric shapes and their relationships.
View the source code for detailed documentation on each function and type.
═════════════════════════════════════════════════════════════════════════
█ OVERVIEW
This library enhances TradingView's Pine Script with robust geometric capabilities. It introduces the Point and Line types, along with a suite of functions for various geometric operations. These functionalities empower you to perform advanced calculations, manipulations, and analyses involving points, lines, vectors, angles, and polygons directly within your Pine scripts. The example is at the bottom of the script. ( Commented out )
█ CONCEPTS
This library revolves around two fundamental types:
• Point: Represents a point in 2D space with x and y coordinates, along with optional 'a' (angle) and 'v' (value) fields for versatile use. Crucially, for plotting, utilize the `.to_chart_point()` method to convert Points into plottable chart.point objects.
• Line: Defined by a starting Point and a slope , enabling calculations like getting y for a given x, or finding intersection points.
█ FEATURES
• Point Manipulation: Perform operations like addition, subtraction, scaling, rotation, normalization, calculating distances, dot products, cross products, midpoints, and more with Point objects.
• Line Operations: Create lines, determine their slope, calculate y from x (and vice versa), and find the intersection points of two lines.
• Vector Operations: Perform vector addition, subtraction, multiplication, division, negation, perpendicular vector calculation, floor, fractional part, sine, absolute value, modulus, sign, round, scaling, rescaling, rotation, and ceiling operations.
• Angle Calculations: Compute angles between points in degrees or radians, including signed, unsigned, and 360-degree angles.
• Polygon Analysis: Calculate the area, perimeter, and centroid of polygons. Check if a point is inside a given polygon and determine the convex hull perimeter.
• Chart Plotting: Conveniently convert Point objects to chart.point objects for plotting lines and points on the chart. The library also includes functions for plotting lines between individual and series of points.
• Utility Functions: Includes helper functions such as square root, square, cosine, sine, tangent, arc cosine, arc sine, arc tangent, atan2, absolute distance, golden ratio tolerance check, fractional part, and safe index/check for chart plotting boundaries.
█ HOW TO USE
1 — Include the library in your script using:
import kaigouthro/geo/1
2 — Create Point and Line objects:
p1 = geo.Point(bar_index, close)
p2 = geo.Point(bar_index , open)
myLine = geo.Line(p1, geo.slope(p1, p2))
// maybe use that line to detect a crossing for an alert ... hmmm
3 — Utilize the provided functions:
distance = geo.distance(p1, p2)
intersection = geo.intersection(line1, line2)
4 — For plotting labels, lines, convert Point to chart.point :
label.new(p1.to_chart_point(), " Hi ")
line.new(p1.to_chart_point(),p2.to_chart_point())
█ NOTES
This description provides a concise overview. Consult the library's source code for in-depth documentation, including detailed descriptions, parameter types, and return values for each function and method. The source code is structured with comprehensive comments using the `//@` format for seamless integration with TradingView's auto-documentation features.
█ Possibilities..
Library "geo"
This library provides a comprehensive set of geometric functions and types, including point and line manipulation, vector operations, angle calculations, and polygon analysis. It offers tools for creating, transforming, and analyzing geometric shapes and their relationships.
sqrt(value)
Square root function
Parameters:
value (float) : (float) - The number to take the square root of
Returns: (float) - The square root of the input value
sqr(x)
Square function
Parameters:
x (float) : (float) - The number to square
Returns: (float) - The square of the input value
cos(v)
Cosine function
Parameters:
v (float) : (series float) - The value to find the cosine of
Returns: (series float) - The cosine of the input value
sin(v)
Sine function
Parameters:
v (float) : (series float) - The value to find the sine of
Returns: (series float) - The sine of the input value
tan(v)
Tangent function
Parameters:
v (float) : (series float) - The value to find the tangent of
Returns: (series float) - The tangent of the input value
acos(v)
Arc cosine function
Parameters:
v (float) : (series float) - The value to find the arc cosine of
Returns: (series float) - The arc cosine of the input value
asin(v)
Arc sine function
Parameters:
v (float) : (series float) - The value to find the arc sine of
Returns: (series float) - The arc sine of the input value
atan(v)
Arc tangent function
Parameters:
v (float) : (series float) - The value to find the arc tangent of
Returns: (series float) - The arc tangent of the input value
atan2(dy, dx)
atan2 function
Parameters:
dy (float) : (float) - The y-coordinate
dx (float) : (float) - The x-coordinate
Returns: (float) - The angle in radians
gap(_value1, __value2)
Absolute distance between any two float values
Parameters:
_value1 (float) : First value
__value2 (float)
Returns: Absolute Positive Distance
phi_tol(a, b, tolerance)
Check if the ratio is within the tolerance of the golden ratio
Parameters:
a (float) : (float) The first number
b (float) : (float) The second number
tolerance (float) : (float) The tolerance percennt as 1 = 1 percent
Returns: (bool) True if the ratio is within the tolerance, false otherwise
frac(x)
frad Fractional
Parameters:
x (float) : (float) - The number to convert to fractional
Returns: (float) - The number converted to fractional
safeindex(x, limit)
limiting int to hold the value within the chart range
Parameters:
x (float) : (float) - The number to limit
limit (int)
Returns: (int) - The number limited to the chart range
safecheck(x, limit)
limiting int check if within the chartplottable range
Parameters:
x (float) : (float) - The number to limit
limit (int)
Returns: (int) - The number limited to the chart range
interpolate(a, b, t)
interpolate between two values
Parameters:
a (float) : (float) - The first value
b (float) : (float) - The second value
t (float) : (float) - The interpolation factor (0 to 1)
Returns: (float) - The interpolated value
gcd(_numerator, _denominator)
Greatest common divisor of two integers
Parameters:
_numerator (int)
_denominator (int)
Returns: (int) The greatest common divisor
method set_x(self, value)
Set the x value of the point, and pass point for chaining
Namespace types: Point
Parameters:
self (Point) : (Point) The point to modify
value (float) : (float) The new x-coordinate
method set_y(self, value)
Set the y value of the point, and pass point for chaining
Namespace types: Point
Parameters:
self (Point) : (Point) The point to modify
value (float) : (float) The new y-coordinate
method get_x(self)
Get the x value of the point
Namespace types: Point
Parameters:
self (Point) : (Point) The point to get the x-coordinate from
Returns: (float) The x-coordinate
method get_y(self)
Get the y value of the point
Namespace types: Point
Parameters:
self (Point) : (Point) The point to get the y-coordinate from
Returns: (float) The y-coordinate
method vmin(self)
Lowest element of the point
Namespace types: Point
Parameters:
self (Point) : (Point) The point
Returns: (float) The lowest value between x and y
method vmax(self)
Highest element of the point
Namespace types: Point
Parameters:
self (Point) : (Point) The point
Returns: (float) The highest value between x and y
method add(p1, p2)
Addition
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (Point) - the add of the two points
method sub(p1, p2)
Subtraction
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (Point) - the sub of the two points
method mul(p, scalar)
Multiplication by scalar
Namespace types: Point
Parameters:
p (Point) : (Point) - The point
scalar (float) : (float) - The scalar to multiply by
Returns: (Point) - the multiplied point of the point and the scalar
method div(p, scalar)
Division by scalar
Namespace types: Point
Parameters:
p (Point) : (Point) - The point
scalar (float) : (float) - The scalar to divide by
Returns: (Point) - the divided point of the point and the scalar
method rotate(p, angle)
Rotate a point around the origin by an angle (in degrees)
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to rotate
angle (float) : (float) - The angle to rotate by in degrees
Returns: (Point) - the rotated point
method length(p)
Length of the vector from origin to the point
Namespace types: Point
Parameters:
p (Point) : (Point) - The point
Returns: (float) - the length of the point
method length_squared(p)
Length squared of the vector
Namespace types: Point
Parameters:
p (Point) : (Point) The point
Returns: (float) The squared length of the point
method normalize(p)
Normalize the point to a unit vector
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to normalize
Returns: (Point) - the normalized point
method dot(p1, p2)
Dot product
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (float) - the dot of the two points
method cross(p1, p2)
Cross product result (in 2D, this is a scalar)
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (float) - the cross of the two points
method distance(p1, p2)
Distance between two points
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (float) - the distance of the two points
method Point(x, y, a, v)
Point Create Convenience
Namespace types: series float, simple float, input float, const float
Parameters:
x (float)
y (float)
a (float)
v (float)
Returns: (Point) new point
method angle(p1, p2)
Angle between two points in degrees
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (float) - the angle of the first point and the second point
method angle_between(p, pivot, other)
Angle between two points in degrees from a pivot point
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to calculate the angle from
pivot (Point) : (Point) - The pivot point
other (Point) : (Point) - The other point
Returns: (float) - the angle between the two points
method translate(p, from_origin, to_origin)
Translate a point from one origin to another
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to translate
from_origin (Point) : (Point) - The origin to translate from
to_origin (Point) : (Point) - The origin to translate to
Returns: (Point) - the translated point
method midpoint(p1, p2)
Midpoint of two points
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (Point) - The midpoint of the two points
method rotate_around(p, angle, pivot)
Rotate a point around a pivot point by an angle (in degrees)
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to rotate
angle (float) : (float) - The angle to rotate by in degrees
pivot (Point) : (Point) - The pivot point to rotate around
Returns: (Point) - the rotated point
method multiply(_a, _b)
Multiply vector _a with _b
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (Point) The result of the multiplication
method divide(_a, _b)
Divide vector _a by _b
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (Point) The result of the division
method negate(_a)
Negative of vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to negate
Returns: (Point) The negated point
method perp(_a)
Perpendicular Vector of _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The perpendicular point
method vfloor(_a)
Compute the floor of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The floor of the point
method fractional(_a)
Compute the fractional part of the elements from vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The fractional part of the point
method vsin(_a)
Compute the sine of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The sine of the point
lcm(a, b)
Least common multiple of two integers
Parameters:
a (int) : (int) The first integer
b (int) : (int) The second integer
Returns: (int) The least common multiple
method vabs(_a)
Compute the absolute of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The absolute of the point
method vmod(_a, _b)
Compute the mod of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
_b (float) : (float) The mod
Returns: (Point) The mod of the point
method vsign(_a)
Compute the sign of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The sign of the point
method vround(_a)
Compute the round of argument vector _a
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (Point) The round of the point
method normalize_y(p, height)
normalizes the y value of a point to an input height
Namespace types: Point
Parameters:
p (Point) : (Point) - The point to normalize
height (float) : (float) - The height to normalize to
Returns: (Point) - the normalized point
centroid(points)
Calculate the centroid of multiple points
Parameters:
points (array) : (array) The array of points
Returns: (Point) The centroid point
random_point(_height, _width, _origin, _centered)
Random Point in a given height and width
Parameters:
_height (float) : (float) The height of the area to generate the point in
_width (float) : (float) The width of the area to generate the point in
_origin (Point) : (Point) The origin of the area to generate the point in (default: na, will create a Point(0, 0))
_centered (bool) : (bool) Center the origin point in the area, otherwise, positive h/w (default: false)
Returns: (Point) The random point in the given area
random_point_array(_origin, _height, _width, _centered, _count)
Random Point Array in a given height and width
Parameters:
_origin (Point) : (Point) The origin of the area to generate the array (default: na, will create a Point(0, 0))
_height (float) : (float) The height of the area to generate the array
_width (float) : (float) The width of the area to generate the array
_centered (bool) : (bool) Center the origin point in the area, otherwise, positive h/w (default: false)
_count (int) : (int) The number of points to generate (default: 50)
Returns: (array) The random point array in the given area
method sort_points(points, by_x)
Sorts an array of points by x or y coordinate
Namespace types: array
Parameters:
points (array) : (array) The array of points to sort
by_x (bool) : (bool) Whether to sort by x-coordinate (true) or y-coordinate (false)
Returns: (array) The sorted array of points
method equals(_a, _b)
Compares two points for equality
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (bool) True if the points are equal, false otherwise
method max(origin, _a, _b)
Maximum of two points from origin, using dot product
Namespace types: Point
Parameters:
origin (Point)
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (Point) The maximum point
method min(origin, _a, _b)
Minimum of two points from origin, using dot product
Namespace types: Point
Parameters:
origin (Point)
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (Point) The minimum point
method avg_x(points)
Average x of point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The average x-coordinate
method avg_y(points)
Average y of point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The average y-coordinate
method range_x(points)
Range of x values in point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The range of x-coordinates
method range_y(points)
Range of y values in point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The range of y-coordinates
method max_x(points)
max of x values in point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The max of x-coordinates
method min_y(points)
min of x values in point array
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (float) The min of x-coordinates
method scale(_a, _scalar)
Scale a point by a scalar
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to scale
_scalar (float) : (float) The scalar value
Returns: (Point) The scaled point
method rescale(_a, _length)
Rescale a point to a new magnitude
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to rescale
_length (float) : (float) The new magnitude
Returns: (Point) The rescaled point
method rotate_rad(_a, _radians)
Rotate a point by an angle in radians
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to rotate
_radians (float) : (float) The angle in radians
Returns: (Point) The rotated point
method rotate_degree(_a, _degree)
Rotate a point by an angle in degrees
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to rotate
_degree (float) : (float) The angle in degrees
Returns: (Point) The rotated point
method vceil(_a, _digits)
Ceil a point to a certain number of digits
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to ceil
_digits (int) : (int) The number of digits to ceil to
Returns: (Point) The ceiled point
method vpow(_a, _exponent)
Raise both point elements to a power
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
_exponent (float) : (float) The exponent
Returns: (Point) The point with elements raised to the power
method perpendicular_distance(_a, _b, _c)
Distance from point _a to line between _b and _c
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
_b (Point) : (Point) The start point of the line
_c (Point) : (Point) The end point of the line
Returns: (float) The perpendicular distance
method project(_a, _axis)
Project a point onto another
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to project
_axis (Point) : (Point) The point to project onto
Returns: (Point) The projected point
method projectN(_a, _axis)
Project a point onto a point of unit length
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to project
_axis (Point) : (Point) The unit length point to project onto
Returns: (Point) The projected point
method reflect(_a, _axis)
Reflect a point on another
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to reflect
_axis (Point) : (Point) The point to reflect on
Returns: (Point) The reflected point
method reflectN(_a, _axis)
Reflect a point to an arbitrary axis
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to reflect
_axis (Point) : (Point) The axis to reflect to
Returns: (Point) The reflected point
method angle_rad(_a)
Angle in radians of a point
Namespace types: Point
Parameters:
_a (Point) : (Point) The point
Returns: (float) The angle in radians
method angle_unsigned(_a, _b)
Unsigned degree angle between 0 and +180 by given two points
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (float) The unsigned angle in degrees
method angle_signed(_a, _b)
Signed degree angle between -180 and +180 by given two points
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (float) The signed angle in degrees
method angle_360(_a, _b)
Degree angle between 0 and 360 by given two points
Namespace types: Point
Parameters:
_a (Point) : (Point) The first point
_b (Point) : (Point) The second point
Returns: (float) The angle in degrees (0-360)
method clamp(_a, _vmin, _vmax)
Restricts a point between a min and max value
Namespace types: Point
Parameters:
_a (Point) : (Point) The point to restrict
_vmin (Point) : (Point) The minimum point
_vmax (Point) : (Point) The maximum point
Returns: (Point) The restricted point
method lerp(_a, _b, _rate_of_move)
Linearly interpolates between points a and b by _rate_of_move
Namespace types: Point
Parameters:
_a (Point) : (Point) The starting point
_b (Point) : (Point) The ending point
_rate_of_move (float) : (float) The rate of movement (0-1)
Returns: (Point) The interpolated point
method slope(p1, p2)
Slope of a line between two points
Namespace types: Point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
Returns: (float) - The slope of the line
method gety(self, x)
Get y-coordinate of a point on the line given its x-coordinate
Namespace types: Line
Parameters:
self (Line) : (Line) - The line
x (float) : (float) - The x-coordinate
Returns: (float) - The y-coordinate
method getx(self, y)
Get x-coordinate of a point on the line given its y-coordinate
Namespace types: Line
Parameters:
self (Line) : (Line) - The line
y (float) : (float) - The y-coordinate
Returns: (float) - The x-coordinate
method intersection(self, other)
Intersection point of two lines
Namespace types: Line
Parameters:
self (Line) : (Line) - The first line
other (Line) : (Line) - The second line
Returns: (Point) - The intersection point
method calculate_arc_point(self, b, p3)
Calculate a point on the arc defined by three points
Namespace types: Point
Parameters:
self (Point) : (Point) The starting point of the arc
b (Point) : (Point) The middle point of the arc
p3 (Point) : (Point) The end point of the arc
Returns: (Point) A point on the arc
approximate_center(point1, point2, point3)
Approximate the center of a spiral using three points
Parameters:
point1 (Point) : (Point) The first point
point2 (Point) : (Point) The second point
point3 (Point) : (Point) The third point
Returns: (Point) The approximate center point
createEdge(center, radius, angle)
Get coordinate from center by radius and angle
Parameters:
center (Point) : (Point) - The center point
radius (float) : (float) - The radius of the circle
angle (float) : (float) - The angle in degrees
Returns: (Point) - The coordinate on the circle
getGrowthFactor(p1, p2, p3)
Get growth factor of spiral point
Parameters:
p1 (Point) : (Point) - The first point
p2 (Point) : (Point) - The second point
p3 (Point) : (Point) - The third point
Returns: (float) - The growth factor
method to_chart_point(point)
Convert Point to chart.point using chart.point.from_index(safeindex(point.x), point.y)
Namespace types: Point
Parameters:
point (Point) : (Point) - The point to convert
Returns: (chart.point) - The chart.point representation of the input point
method plotline(p1, p2, col, width)
Draw a line from p1 to p2
Namespace types: Point
Parameters:
p1 (Point) : (Point) First point
p2 (Point) : (Point) Second point
col (color)
width (int)
Returns: (line) Line object
method drawlines(points, col, ignore_boundary)
Draw lines between points in an array
Namespace types: array
Parameters:
points (array) : (array) The array of points
col (color) : (color) The color of the lines
ignore_boundary (bool) : (bool) The color of the lines
method to_chart_points(points)
Draw an array of points as chart points on the chart with line.new(chartpoint1, chartpoint2, color=linecolor)
Namespace types: array
Parameters:
points (array) : (array) - The points to draw
Returns: (array) The array of chart points
polygon_area(points)
Calculate the area of a polygon defined by an array of points
Parameters:
points (array) : (array) The array of points representing the polygon vertices
Returns: (float) The area of the polygon
polygon_perimeter(points)
Calculate the perimeter of a polygon
Parameters:
points (array) : (array) Array of points defining the polygon
Returns: (float) Perimeter of the polygon
is_point_in_polygon(point, _polygon)
Check if a point is inside a polygon
Parameters:
point (Point) : (Point) The point to check
_polygon (array)
Returns: (bool) True if the point is inside the polygon, false otherwise
method perimeter(points)
Calculates the convex hull perimeter of a set of points
Namespace types: array
Parameters:
points (array) : (array) The array of points
Returns: (array) The array of points forming the convex hull perimeter
Point
A Point, can be used for vector, floating calcs, etc. Use the cp method for plots
Fields:
x (series float) : (float) The x-coordinate
y (series float) : (float) The y-coordinate
a (series float) : (float) An Angle storage spot
v (series float) : (float) A Value
Line
Line
Fields:
point (Point) : (Point) The starting point of the line
slope (series float) : (float) The slope of the line
GOMTRY.
Double Bottom AlertAlerts you the second a double bottom condition is met, no need to wait for a closed candle
RSI/MACD Momentum ScalperThe RSI/MACD Momentum Scalper is a technical analysis indicator designed to help traders identify bullish and bearish momentum in the market using a combination of Relative Strength Index (RSI) and Moving Average Convergence Divergence (MACD). The indicator uses color-coded candles to visually represent the strength and direction of market trends, along with buy, sell, and take profit signals.
How to Use:
Green Candles: Indicate strong bullish momentum when both RSI is above 50 and MACD is above its signal line. This is a signal to consider entering long positions.
Red Candles: Indicate bearish momentum when both RSI is below 50 and MACD is below its signal line. This is a signal to consider entering short positions or exiting long positions.
Grey Candles: Represent a neutral or indecisive market when only one of the two conditions (RSI or MACD) is met. This suggests caution or waiting for a clearer signal.
Buy Signals: Plotted when the market transitions into a bullish state (both RSI and MACD turn bullish). These are shown as upward-facing triangles below the candles.
Sell Signals: Plotted when the market transitions into a bearish state (both RSI and MACD turn bearish). These are shown as downward-facing triangles above the candles.
Take Profit Signals: Triggered when the momentum changes from bullish or bearish to a neutral state, indicating potential points to lock in profits. These are shown as squares.
Why It's Useful:
Momentum Detection: Combines the strengths of RSI and MACD to provide a robust view of market momentum, helping traders avoid false signals.
Visual Clarity: The use of color-coded candles makes it easy to quickly assess the market's state, aiding in fast decision-making.
Comprehensive Signals: Provides not just entry (buy/sell) signals but also take profit signals, helping traders manage their trades more effectively.
Why It's Unique:
Dual Indicator Approach: By integrating both RSI and MACD, this indicator provides a more nuanced understanding of market conditions compared to using either indicator alone.
Customizable MA Types: Offers flexibility with different moving average types (EMA, DEMA, HMA) for MACD calculation, allowing users to tailor it to their trading style.
Take Profit Functionality: The inclusion of take profit signals is a unique feature that helps traders maximize their gains and minimize risks by signaling potential exit points when momentum weakens.
This indicator is especially useful for scalpers and short-term traders who need to quickly identify and act on shifts in market momentum.
siubo_EMA Strategy Trending//@version=5
indicator("EMA Strategy with Full Background Coverage", overlay=true)
// 定義EMA週期
ema10 = ta.ema(close, 10)
ema20 = ta.ema(close, 20)
ema30 = ta.ema(close, 30)
ema200 = ta.ema(close, 200)
// 定義多頭與空頭狀態
longCondition = ema10 > ema30 // 10日EMA在30日EMA之上(多頭)
shortCondition = ema10 < ema30 // 10日EMA在30日EMA之下(空頭)
// 更新背景顏色
bgcolor(longCondition ? color.new(color.green, 90) : shortCondition ? color.new(color.red, 90) : na)
// 繪製EMA線
plot(ema10, color=color.blue, title="EMA 10")
plot(ema20, color=color.orange, title="EMA 20")
plot(ema30, color=color.purple, title="EMA 30")
plot(ema200, color=color.gray, title="EMA 200")
Fortuna/4.20FC. Индикатор для поиска ценовых уровней. Он ищет 2 ценовых уровня.
Красный уровень это уровень максимального количества совпадений цены(качаний)
Синий уровень это второй(2) по количеству совпадений!
Simplified Buy/Sell StrategyThis Pine Script implements a Simplified Buy/Sell Strategy based on the Moving Average Crossover technique. Here's a breakdown of the functionality:
Description:
Purpose:
The script generates Buy and Sell signals on the chart to help traders identify potential entry and exit points based on short-term and long-term price trends.
Indicators Used:
Short Moving Average (Short MA): Calculates the average closing price over a shorter period (default: 5).
Long Moving Average (Long MA): Calculates the average closing price over a longer period (default: 10).
Buy Signal:
A buy signal is generated when the Short MA crosses above the Long MA. This suggests a potential upward trend in price.
Sell Signal:
A sell signal is generated when the Short MA crosses below the Long MA. This indicates a possible downward trend.
Visualization:
Buy signals are shown as green arrows below the price bars with the label "BUY."
Sell signals are displayed as red arrows above the price bars with the label "SELL."
The Short and Long MAs are plotted on the chart for visual confirmation of trends (blue for Short MA, orange for Long MA).
Customization:
Traders can adjust the lengths of the moving averages to fit different timeframes or assets using the input fields.
Trend Analysis: DJ 09Bullish trends when the short-term MA crosses above the long-term MA and RSI is rising.
Bearish trends when the short-term MA crosses below the long-term MA and RSI is falling.
Composite Indicator (Donchian + OBV)Composite Indicator (Donchian + OBV)
The Composite Indicator (Donchian + OBV) is a powerful tool designed to evaluate the strength of market breakouts and momentum trends , offering traders a comprehensive perspective on price action. This indicator combines the Donchian Channel with On-Balance Volume (OBV) to create a dynamic and easy-to-interpret metric scaled between -1 and 1 .
Key Features
Breakout Strength Analysis:
- The indicator assesses the strength of price breakouts relative to the upper and lower bounds of the Donchian Channel.
- Positive values close to 1 indicate a strong bullish breakout.
- Negative values close to -1 indicate a strong bearish breakout.
Momentum Detection with OBV:
- On-Balance Volume (OBV) tracks the cumulative buying and selling volume to gauge market momentum.
- The smoothed OBV trend ensures the momentum component aligns with price action, reducing noise.
Integrated Composite Value:
- Combines breakout strength and OBV momentum into a single metric for enhanced clarity.
- The final composite value highlights whether the market is bullish, bearish, or neutral.
Divergence Detection:
- Spot bullish divergences when the indicator rises while price falls, suggesting a potential upward reversal.
- Identify bearish divergences when the indicator falls while price rises, hinting at a potential downward reversal.
How It Works
Donchian Channel Analysis:
- Calculates the highest high and lowest low over a user-defined period to establish the upper and lower channels .
- Breakouts beyond these channels contribute to the breakout strength component.
OBV Momentum:
- Measures cumulative volume trends to validate price movements.
- Momentum is derived from the rate of change in smoothed OBV values.
Composite Calculation:
- Combines breakout strength and OBV momentum, normalized and scaled to -1 to 1 for clarity.
How to Use
Bullish Breakout:
- When the indicator value approaches 1 , it signals a strong upward breakout supported by positive OBV momentum.
- Example Action: Consider a Buy if price breaks the upper Donchian Channel with increasing OBV.
Bearish Breakout:
- When the indicator value approaches -1 , it indicates a strong downward breakout supported by negative OBV momentum.
- Example Action: Consider a Sell if price breaks the lower Donchian Channel with decreasing OBV.
Neutral Market:
- When the value is near 0 , the market is likely balanced with no significant breakout or momentum detected.
Divergence Opportunities:
- Bullish Divergence: Price makes lower lows, but the indicator trends upward → Potential upward reversal.
- Bearish Divergence: Price makes higher highs, but the indicator trends downward → Potential downward reversal.
Customization Options
Donchian Channel Length: Adjust the period for the upper and lower bounds.
OBV Smoothing Length: Modify the smoothing period for OBV to fine-tune momentum detection.
Scaling Adjustments: The composite value is automatically normalized for consistency across timeframes.
Ideal Use Cases
Breakout Trading: Identify and confirm strong breakouts in volatile markets.
Momentum Confirmation: Validate price movements with volume-based momentum.
Reversal Detection: Leverage divergences to spot potential market reversals.
Example Applications
Strong Bullish Signal:
- Price breaks the upper channel , and OBV shows increasing volume → Composite value near 1 .
- Action: Enter a Buy position and set a Stop Loss below the upper channel.
Strong Bearish Signal:
- Price breaks the lower channel , and OBV shows decreasing volume → Composite value near -1 .
- Action: Enter a Sell position and set a Stop Loss above the lower channel.
Neutral Market:
- Composite value near 0 suggests indecision or consolidation. Wait for a breakout.
Limitations
Best used alongside additional tools like RSI or MACD for filtering noise and improving decision-making.
Requires careful parameter tuning based on the asset and timeframe.
Final Thoughts
The Composite Indicator (Donchian + OBV) offers traders a versatile tool to navigate complex markets. By blending breakout analysis with volume-based momentum, this indicator provides an actionable edge for identifying high-probability opportunities and potential reversals.