lib_pivotLibrary "lib_pivot"
Object oriented implementation of Pivot methods.
method tostring(this)
Converts HLData to a json string representation
Namespace types: HLData
Parameters:
this (HLData) : HLData
Returns: string representation of Pivot
method tostring(this, date_format)
Namespace types: Pivot
Parameters:
this (Pivot)
date_format (simple string)
method tostring(this, date_format)
Namespace types: Pivot
Parameters:
this (Pivot )
date_format (simple string)
method get_color(this, mode)
Namespace types: PivotColors
Parameters:
this (PivotColors)
mode (int)
method get_label_text(this)
Namespace types: Pivot
Parameters:
this (Pivot)
method direction(this)
Namespace types: Pivot
Parameters:
this (Pivot)
method same_direction_as(this, other)
Namespace types: Pivot
Parameters:
this (Pivot)
other (Pivot)
method exceeds(this, price)
Namespace types: Pivot
Parameters:
this (Pivot)
price (float)
method exceeds(this, other)
Namespace types: Pivot
Parameters:
this (Pivot)
other (Pivot)
method exceeded_by(this, price)
Namespace types: Pivot
Parameters:
this (Pivot)
price (float)
method exceeded_by(this, other)
Namespace types: Pivot
Parameters:
this (Pivot)
other (Pivot)
method retracement_ratio(this, lastPivot, sec_lastPivot)
Namespace types: Pivot
Parameters:
this (Pivot)
lastPivot (Pivot)
sec_lastPivot (Pivot)
ratio_target(sec_lastPivot, lastPivot, target_ratio)
Parameters:
sec_lastPivot (Pivot)
lastPivot (Pivot)
target_ratio (float)
method update(this, ref_highest, ref_lowest)
Namespace types: HLData
Parameters:
this (HLData)
ref_highest (float)
ref_lowest (float)
method update(this, bar_time, bar_idx, price, prev)
Namespace types: Pivot
Parameters:
this (Pivot)
bar_time (int)
bar_idx (int)
price (float)
prev (Pivot)
method create_next(this, bar_time, bar_idx, price)
Namespace types: Pivot
Parameters:
this (Pivot)
bar_time (int)
bar_idx (int)
price (float)
HLData
HLData wraps the data received from ta.highest, ta.highestbars, ta.lowest, ta.lowestbars, as well as the reference sources
Fields:
length (series int) : lookback length for pivot points
highest_offset (series int) : offset to highest value bar
lowest_offset (series int) : offset to lowest value bar
highest (series float) : highest value within lookback bars
lowest (series float) : lowest value within lookback bars
new_highest (series bool) : update() will set this true if the current candle forms a new highest high at the last (current) bar of set period (length)
new_lowest (series bool) : update() will set this true if the current candle forms a new lowest low at the last (current) bar of set period (length)
new_highest_fractal (series bool) : update() will set this true if the current candle forms a new fractal high at the center of set period (length)
new_lowest_fractal (series bool) : update() will set this true if the current candle forms a new fractal low at the center of set period (length)
PivotColors
Pivot colors for different modes
Fields:
hh (series color) : Color for Pivot mode 2 (HH)
lh (series color) : Color for Pivot mode 1 (LH)
hl (series color) : Color for Pivot mode -1 (HL)
ll (series color) : Color for Pivot mode -2 (LL)
Pivot
Pivot additional pivot data around basic Point
Fields:
point (Point type from robbatt/lib_plot_objects/5)
mode (series int) : can be -2/-1/1/2 for LL/HL/LH/HH
price_movement (series float) : The price difference between this and the previous pivot point in the opposite direction
retracement_ratio (series float) : The ratio between this price_movement and the previous
prev (Pivot)
I'll
FFH Market structure v1The indicator determines the trend, its direction, confirmed trend, trend breakout levels (BoS), sideways ranges, volume profile point of control levels (vPoC) - all of this is conveniently displayed on the chart and helps complement your technical analysis.
The main idea of the script is to trade volume profile levels (vPoC) by identifying trends and sideways ranges. The script detect them and provides signals as soon as it detects a reaction from a volume level. You then complement these signals with your own technical analysis and make a decision to enter a trade. The script was developed solely to facilitate trading and address the issue of convenient visualization. Structure breakout levels are displayed as additional confirmations for making trading decisions. If we form a sideways range below/above such a trading level, it is a strong signal for me.
For sideways ranges, a volume level is calculated (vPoC), which also serves as input information for the signal engine. Signals are generated based on volume levels, with the calculation of stop loss (SL) and take profit (TP) levels. The SL is set at a certain percentage of the range boundaries or the previous high/low, as specified by a parameter. Targets are calculated intelligently based on trend reversal levels and volume levels.
The indicator parameters are individually tailored to each coin. The number of bars to determine the high/low is adjusted, as well as the allowable price deviation for defining the range boundaries on the first level. There are three modes for determining the sideways range, and data sources for highs/lows can be chosen (high/low/candle close, etc.). To make it more convenient for you to work with the indicator, there is an algorithm for automatic parameter adjustment built-in.
Currently script _only_ works for:
* BTC on 1-hour, 4-hour, and 1-day timeframes.
* ETC on 1-hour, 4-hour, and 1-day timeframes.
* Any altcoin on a 1-day timeframe.
The script will be beneficial to both novice traders, helping them understand market structure, sideways ranges, and identifying structure breakouts, as well as experienced traders, facilitating the process of plotting market structure elements on the chart and making trading decisions.
In any case, this script is not an investment idea.
All trading decisions you make based on the script are made independently and at your own risk.
lib_trackingLibrary "lib_tracking"
tracking highest and lowest with anchor point to track over dynamic periods, e.g. to track a Session HH/LL live and get the bar/time of the LTF wick that matches the HTF HH/LL
// DESIGN DECISION
// why anchored replacements for ta.highest / ta.highestbars / ta.lowest / ta.lowestbars:
// 1. they require a fixed length/lookback which makes it easier to calculate, but
// 2. this prevents us from tracking the HH/LL of a changing timeframe, e.g. live tracking the HH/LL of a running session or unfinished higher timeframe
// 3. tracking with anchor/start/reset flag allows to persist values until the next start/reset, so no other external storage is required
track_highest(value, reset, track_this_bar)
Parameters:
value (float)
reset (bool) : boolean flag to restart tracking from this point (a.k.a anchor)
track_this_bar (bool) : allows enabling and disabling of tracking, e.g. before a session starts or after it ends, values can be kept until next reset.
track_lowest(value, reset, track_this_bar)
Parameters:
value (float)
reset (bool) : boolean flag to restart tracking from this point (a.k.a anchor)
track_this_bar (bool) : allows enabling and disabling of tracking, e.g. before a session starts or after it ends, values can be kept until next reset.
track_hl_htf(htf, value_high, value_low)
Parameters:
htf (string) : the higher timeframe in pinescript string notation
value_high (float)
value_low (float)
Returns:
Average Highest High and Lowest Low Swinger StrategyThis is a full price action strategy designed for trending markets such as crypto and stocks.
Its purely made on calculations for the highest high and lowest low using 2 different length , a faster and a slower one.
With those we make multiple averages.
Rules for entry:
For long: our close of the candle is above both the average using fast and slow line
For short: our close of the candle is below both the average using fast and slow line
Rules for exit
We always exit when we have an opposite order
Caution
This strategy use no risk management system, so be careful with it
If you have any questions, let me know
Pivot Points High Low MTF [Anan]█ OVERVIEW
Pivot Points High Low with Multi Time Frames support and bull/bear signal depends on pivot average
█ FEATURES
- Fully control of pivot (Source / Length Left / Length Right)
- Show HH, LL, LH, HL price on candles
- Show Avg Pivot High Low.
- Show Bull/Bear Labels.
- Control of signal accuracy (default: 0.5%)
- Show Pivot High Low Levels as a Fractal Chaos Channel.
- Multi-timeframe Table with support of Pivot High Low and pivot Average.
- BreakOut and BreakDown Labels in the table.
- Full control of displaying any row or any column.
- Full control of Table position and Size and Colors.
Pivot Points [CB]Automatically label pivots as HH/LH and HL/LL.
The criteria for determining pivot points can be configured.
Moving High & Low (2 Time Frames)===========
Moving High & Low (2 Time Frames)
===========
A simple line set indicator displaying the highs and lows of the previous selected timeframe upon a lower timeframe chart (2 line sets available).
e.g. Displaying the Highs & Lows of the last week and/or month on the 1D chart
-----------
Useful for 2 very different approaches to trading markets -
Finding Breakout Points:
For example - When candlestick closes above or below highs from previous week/month it may be a good time to go long as if the trend continues it may well go on for a long time making lots of pips along the way!
Finding SAR points within a range:
For example - When price starts ranging within horizontal line sets that aren't moving either way too much it may be a good idea to place long/short orders at appropriate key levels dictated by these range extremities, anticipating the price to reach these levels and deflect (Stop & Reverse) back the other way.
Either way we would recommend you NOT use this indicator alone, this is very much a confirmation tool or as an aid to find key levels of support/resistance.
Good Luck and Happy Trading!
Pivot Points High Low (HH/HL/LH/LL) [Anan]Hello Friends,
This is my own version of ( Pivot Hilo Support n Resistance Levels R3-3 by JustUncleL )
- V4 Pinescript
- Removed MA dependency filters
- Add some arrows
Higher Highs / Lower Lows - m,H,D,W,M w/ Alerts by ZekisA simple but very useful indicator that plots higher highs and lowers lows and that can be reset each hour, day, week or month, so it can plot new HH and new LL only in that range.
It can be used as it it, combined with other indicators or for TA (it's an entire story about highs and lows, google and youtube are your friends).
Alerts for HH/LL and for the first in the series plotted with Long and Short labels.
Use with caution!
Enjoy!
@Zekis