Turtle Trading Risk Adjusted Position Size CalculatorTurtle Trading Risk Adjusted Position Size Calculator
Hello Traders !
Turtle Trading Risk Adjustment Calculator (inspired by the Turtle Traders Position sizing methods) aims to objectively help day traders allocate the appropriate position size per trade by scaling different instruments by their risk, as measured by their volatility via the ATR (default - Average of 14 period True Range). By doing so This volatility-based position sizing method normalizes risk across different asset classes.
Understanding The formula
Formula U normalizes positions sizes among any non FX asset, by representing a standard unit of risk as a fraction of volatility adjusted by a risk coefficient (note higher risk coeff values (high uncertainty) will lead to lower trade capital allocation i.e lower position size - Varying the risk coefficient is relevant in expressing uncertainty) and scaled to ones trading account size relative to 1 contract of the asset to be traded, This is referred to as the Dollar volatility, formula D.
Dollar volatility is a bit confusing but in essence it is simply a factor of the asset price such that quantity sums to ones Trading account balance or how many times larger ones trading account is than the assets current market price, or more formally The amount of value a $1 change in the contract would impact your trading account given you are current trading all you account equity.
Formula TVPP is my own adaptation of the Turtle Trading Position Sizing formulas and the standard value per pip formula adjusted for volatility, this iteration has the same logic as stated above although the formulas vary.
Hope this is Useful, Wishing you Luck in your Trading Journey - u got this !!
Statistics
Trendgetter: Trend Detection, Regime Change, Bias Filter by [CR]Trendgetter: Trend Detection, Regime Change, Bias Filter by Cryptorhythms
“If you are not a trend setter, at least be able to exploit the ones you see.”
― Jeffrey Fry
Intro
Cryptorhythms back again with a members only indicator for trend capture this time! Trendgetter is not crypto specific and can be applied to a variety of timeframes, markets, and tickers. Its meant to be a general purpose trading aid and bias filter, providing reliable trend, bias and regime change information.
Introduction
This indicator relies upon various methods related to probabilities/statistics, digital signal processing and data science to predict optimal fair local price given any financial time series data. The goal was to create a tool that isolates trends and captures their bias, making it easier to follow a noisy market. The focus is making high hit rate uncorrelated returns to your base market. The way in which this indicator is constructed is not based upon any previous public work, and was researched and refined over a period of 6 months of trading and testing based on my own personal trading experiences and observations of the market. I use novel techniques I developed in house to denoise the data and determine a local fair price.
Description
The parameters in this indicator are mostly fixed and do not lend themselves to overfitting. So when you find good settings, its probably legit and not a false positive. They were pre-determined based on my own testing and research to handle almost all possible combinations of price action for determining trends. By fixing some parameters, you automatically reduce the chances of overfitting to historical data. The pre determined levels were carefully chosen after many options were considered.
Not just a bias filtooor, fair price predictooor and regime change detectoooor though! TG also provides a price envelope feature which shows a likely fair price range that price will distribute itself upon. Above or below the envelope indicates the presence of a very strong trend . Within the envelope indicates consolidation , but still conforming to the bias. TG then uses a statistics-based approach to display a likely range that price could potentially travel over the near term which we called a price envelope.
An additional option provides background coloration when there is the potential for a regime change on the trend bias. This can be used as a feature to help you manage your trades risk. This is simply measured by an internal (non exposed) script value returning to a mean which triggers the color to appear.
Further Explanation of Settings
-Timeframe : Change the timeframe the indicator is calculated on allowing you to for instance use the 15m Trendgetter output while remaining on the 5 minute chart.
-Trend Capture : This is the "type" of trend you are trying to follow. The different options will attempt to find the trends at various levels of noise cancellation within the lookback period you specify. "Reactive" means it will quickly change its bias and capture smaller trends. "Slow" means it will filter more noise and capture larger trends. "Adaptive" is completely in its own class of behavior and was my attempt to mix both a slow and reactive profile into one setting, it uses a few market metrics like volume and volatility to adjust parameters on the fly.
-Sample Length : Bars to consider in the calculation. Using large numbers here is not going to help, but rather hurt your results. Generally 10-100 is the range you should use for the best results. The exact value will depend on the timeframe, volatility and market/asset you are trading, and you should experiment to find it. (There is no "one size fits all" for potential trading situations)
-Source : Data series used for calculation. I recommend hlcc4 or hl2 or hlc3 instead of just "close." This will help to pre process a noisy data series for the rest of the algo.
-Certainty Level : This setting effects how easily the indicator will confirm a new trend and change its bias. " Reactive" does just as it says and will confirm new regimes faster, but can also lead to false signals or "flip flop" in certain types of price action. "Slow" will change biases less frequently or in conjunction with large moves - but this level of certainty requires the sacrifice of reactivity meaning its a bit laggy (but thats ok when you are following a larger trend). "Medium" is as you would expect the middle ground between reactive and slow. Lastly "Adaptive" tends to fall between reactive and medium in its behavior typically, but it will somewhat adjust itself to suit the variability of market conditions.
-Price Envelope :
-----My own personally created price distribution spread (not monte carlo based)
-----Above or below the envelope indicates the presence of a very strong trend. You should not be fading a trend when its in this position!
-----Within the envelope indicates consolidation, but still conforming to the bias.
User Requests :
Of course we also listen to the needs of our members and added these features upon request.
-Added dark mode and light mode themes.
----Dark Mode is for dark/black charts and uses lighter colorations
----Light mode is for light/white charts and uses darker colorations
-More updates to display and color selection options such as background colors and fill colors.
AutoEma by RainbowLabsAutoEma by RainbowLabs, an innovative and powerful trading indicator that identifies the most profitable EMA crossover combinations for you.
This indicator employs a systematic approach to analyze various EMA crossover combinations and evaluates their performance based on backtesting results.
Multiple EMA combinations:
"5-10", "5-15", "5-20", "5-25", "5-30", "5-35", "5-40", "5-45", "5-50", "5-60", "5-70", "5-80", "5-90", "5-100", "5-110", "5-120", "5-130", "5-140", "5-150", "5-160", "5-170", "5-180", "5-190", "5-200", "7-10", "7-15", "7-20", "7-25", "7-30", "7-35", "7-40", "7-45", "7-50", "7-60", "7-70", "7-80", "7-90", "7-100", "7-110", "7-120", "7-130", "7-140", "7-150", "7-160", "7-170", "7-180", "7-190", "7-200", "9-10", "9-15", "9-20", "9-25", "9-30","9-35", "9-40", "9-45", "9-50", "9-60", "9-70", "9-80", "9-90", "9-100", "9-110", "9-120", "9-130", "9-140", "9-150", "9-160", "9-170", "9-180", "9-190", "9-200", "12-15", "12-20", "12-25", "12-30", "12-35", "12-40", "12-45", "12-50", "12-60", "12-70", "12-80", "12-90", "12-100", "12-110", "12-120", "12-130", "12-140", "12-150", "12-160", "12-170", "12-180", "12-190", "12-200", "15-20", "15-25", "15-30", "15-35", "15-40", "15-45", "15-50", "15-60", "15-70", "15-80", "15-90", "15-100", "15-110", "15-120", "15-130", "15-140", "15-150", "15-160", "15-170", "15-180", "15-190", "15-200", "20-25", "20-30", "20-35", "20-40", "20-45", "20-50", "20-60", "20-70", "20-80", "20-90", "20-100", "20-110", "20-120", "20-130", "20-140", "20-150", "20-160", "20-170", "20-180", "20-190", "20-200", "25-30", "25-35", "25-40", "25-45", "25-50", "25-60", "25-70", "25-80", "25-90", "25-100", "25-110", "25-120", "25-130", "25-140", "25-150", "25-160", "25-170", "25-180", "25-190", "25-200", "30-35", "30-40", "30-45", "30-50", "30-60", "30-70", "30-80", "30-90","30-100", "30-110", "30-120", "30-130", "30-140", "30-150", "30-160", "30-170", "30-180", "30-190", "30-200", "35-40", "35-45","35-50", "35-60", "35-70", "35-80", "35-90", "35-100", "35-110", "35-120", "35-130", "35-140", "35-150", "35-160", "35-170","35-180", "35-190", "35-200", "40-45", "40-50", "40-60", "40-70", "40-80", "40-90", "40-100", "40-110", "40-120", "40-130","40-140", "40-150", "40-160", "40-170", "40-180", "40-190", "40-200", "45-50", "45-60", "45-70", "45-80", "45-90", "45-100","45-110", "45-120", "45-130", "45-140", "45-150", "45-160", "45-170", "45-180", "45-190", "45-200", "50-60", "50-70", "50-80","50-90", "50-100", "50-110", "50-120", "50-130", "50-140", "50-150", "50-160", "50-170", "50-180", "50-190", "50-200", "55-60","55-70", "55-80", "55-90", "55-100", "55-110", "55-120", "55-130", "55-140", "55-150", "55-160", "55-170", "55-180", "55-190","55-200", "60-70", "60-80", "60-90", "60-100", "60-110", "60-120", "60-130", "60-140", "60-150", "60-160", "60-170", "60-180","60-190", "60-200", "70-80", "70-90", "70-100", "70-110", "70-120", "70-130", "70-140", "70-150", "70-160", "70-170", "70-180", "70-190", "70-200","80-90", "80-100", "80-110", "80-120", "80-130", "80-140", "80-150","80-160", "80-170", "80-180", "80-190", "80-200", "90-100", "90-110", "90-120","90-130", "90-140", "90-150", "90-160", "90-170", "90-180", "90-190", "90-200", "100-110","100-120", "100-130", "100-140", "100-150", "100-160", "100-170", "100-180", "100-190", "100-200", "125-130", "125-140", "125-150","125-160", "125-170","125-180", "125-190", "125-200","150-160", "150-170", "150-180", "150-190", "150-200"
With its built-in performance metrics, you can assess the efficiency of different EMA combinations in terms of expectancy, profit factor, percent profitable, and drawdown.
This version is LONG only.
The script consume a lot of CPU, so its SLOW to load, consider that still 300 times faster than check each ema cross one by hand
Futures/Spot Ratiowhat is Futures /Spot Ratio?
Although futures and spot markets are separate markets, they are correlated. arbitrage bots allow this gap to be closed. But arbitrage bots also have their limits. so there are always slight differences between futures and spot markets. By analyzing these differences, the movements of the players in the market can be interpreted and important information about the price can be obtained. Futures /Spot Ratio is a tool that facilitates this analysis.
what it does?
it compresses the ratio between two selected spot and futures trading pairs between 0 and 100. its purpose is to facilitate use and interpretation. it also passes a regression (Colorful Regression) through the middle of the data for the same purpose.
about Colorful Regression:
how it does it?
it uses this formula:
how to use it?
use it to understand whether the market is priced with spot trades or leveraged positions. A value of 50 is the breakeven point where the ratio of the spot and leveraged markets are equal. Values above 50 indicate excess of long positions in the market, values below 50 indicate excess of short positions. I have explained how to interpret these ratios with examples below.
RS Stage AnalysisThis script trying to detect different lifecycle of stock / Stages.
There is mainly 4 stages of stocks.
1) stage 1 - Accumulation = color = aqua
2) stage 2 - Advancing = color = green
3) stage 3 - Distribution = color = yellow
4) stage 4 - Declining = color = red
At some point the condition i wrote wont detect any stage.
Daily (%) - Percentage Above / Below Daily [HODLER]It is a common observation in the world of cryptocurrency that the prices of most digital currencies tend to follow the price movements of Bitcoin. This means that when the price of Bitcoin increases, the prices of other cryptocurrencies usually increase as well, and when the price of Bitcoin decreases, the prices of other cryptocurrencies also tend to decrease, particularly when Bitcoin is near its daily level.
Of course, this is not unique to Bitcoin but also occurs with stocks. You can use this indicator on any asset you choose. Simply select the asset you want to track in the indicator's settings.
In the example chart, you can see CFXBUSD on a 45-minute timeframe chart with the indicator displayed below that tracks Bitcoin on a daily timeframe, as bitcoin was set as the asset in the settings of the indicator. In the lower right corner of the indicator, it will display the price of the asset "Bitcoin" and the percentage by which it is either above or below the daily price (which is calculated in the same way as on the TradingView watchlist).
This indicator can be very useful when trading other assets to closely monitor Bitcoin's (or any other chosen) activity. You can use it to check if the price is above the daily close and if it closed higher or lower than the last bar. Additionally, you can check if it closed above certain moving averages.
A useful feature of this indicator is that you can set an offset percentage for your visuals to adjust for whether the asset is up or down.
However, it is important to note that not all cryptocurrencies are directly correlated with Bitcoin's price movements, and some may even have unique factors that can cause them to behave differently in the market.
If you have any questions or suggestions regarding this indicator, I would greatly appreciate it if you could let me know in the comments.
XLY/XLP RatioThe XLY/XLP ratio is a financial indicator that measures the ratio between the two ETFs (Exchange Traded Funds) Consumer Discretionary Select Sector SPDR Fund (XLY) and Consumer Staples Select Sector SPDR Fund (XLP). This ratio is often used by traders and investors as a measure of the relative success of companies in the consumer goods and consumer services sectors.
A higher XLY/XLP ratio indicates that consumer confidence is higher and people are more willing to spend their money on non-essential items, such as entertainment or luxury goods (discretionary spending). A lower XLY/XLP ratio, on the other hand, indicates that consumer confidence is lower and people are more willing to spend their money on essential items like food and household items (staple spending).
The interpretation of the XLY/XLP ratio depends on the current market situation and the analysis of the economic and political factors that may influence consumption. If the XLY/XLP ratio rises, it could be an indication of a growing economy and increasing consumer sentiment. However, if it falls, it could be an indication of a weakening economy or declining consumer confidence.
It is important to note that the XLY/XLP indicator should not be used as the sole indicator to make trading decisions. It is advisable to also consider other indicators, such as technical and fundamental analysis, before making a decision.
Gaps [Kioseff Trading]Hello!
This script "Gaps" is a continuation and improvement on a subset indicator included in the "Quartile Volume; Volume Aggregation; US Range Bars; Gaps)" script!
As advised by @thebearfib, the "Gaps" indicator is now standalone!
Features
Stat: Avg. Bars to Fill Up Gap
Stat: Avg. Bars to Fill Down Gap
Stat: Cumulative Up Gap % Increase
Stat: Cumulative Down Gap % Increase
Stat: Avg Up Gap % Increase
Stat: Avg Down Gap % Decrease
Nearest Unfilled Up Gaps and Down Gaps Displayed in Table
% Price Move Requirement, Including Dollar Amount, for Nearest Unfilled Gaps to Fill
Gaps Marked on Chart, Including Partially Filled Gaps and The % Amount a Partially Filled Gap Has Been Violated
Gaps Chart
The image above shows the data tables included in the indicator!
Settings
The image above shows various settings for the indicator!
The image above shows how partially filled gaps are marked using the default settings.
Exceeded price areas are shaded darker; however, by selecting the "No Partially Filled Gaps" option, the indicator will treat partially filled gaps differently.
The image above shows alternative behavior! Instead of the gap changing color it narrows in size.
The image above shows the indicator's behavior when selecting to show gap data in labels.
Therefore, when a gap is small and the box text is imperceptible, you can select to show the data in a label.
Additionally, you can select to display a "Gaps Chart".
The image above shows this feature enabled. The gaps chart shows the sequence of price gaps for the asset as candlesticks.
Thank you for checking this out; if you'd like other features included please let me know!
Highest/Lowest value since X time ago, various indicatorsThis script will count the bars back since the last time the current bar indicator value was either this low or this high.
It will provide the time in either, seconds, minutes, hours, days, weeks, months, or years.
please note:
There are currently no alerts setup for this script.
the length options only apply to the sources that have the "(MA)" in their name.
There is a horizontal line display issue which corrects once you adjust the amount of sources you want to use.
Once you select the amount of sources you would like to use, align the indicator so the horizontal lines match up with the table lines.
If find any bugs in the script, let me know.
Price Data LabelThis indicator gives you the ability to see historical data for each bar on the chart by simply hovering over the high of the bar, similar to the functionality of MarketSmith.
Data for each bar includes:
Open
High
Low
Close + Change
Percentage Change
Closing Range
Volume
Volume Percent based on 50 day average
Distance to 4 selectable moving averages
Example of stats on a historical bar:
* Note this only works on the last 500 historical bars. If you use bar replay it will work with 500 historical bars from the last bar.
* If you have multiple indicators on your chart, in order to see the data you will need to use visual order to bring to front. This can be done by clicking the three dots next to the indicator name and selecting visual order.
Pivots Benchmark For Indicators (MA / OSC) This measures the pivot of your source. the peaks and valleys. and, shows ou some neat statistics if you were to use those as your entry/exit points. I consider it a purist MA designers Acid Test. if you can get good numbers on this, (remember to deduct fees), you probably should feel confident in your indicator's quality. it isn't very forgiving.
170 themes Dark/Light
your choice of highlight colour for Best/Worst achievement values.
compare to open/close average, or a 3 length EMA on close.
display solo bench of your source.
help popup for indicator values, (hideable)
show/hide individual pivot distances, which source to measure as pivot
time to measure historical setting
number of pivots to keep in buffer
it does back test and runs live!
Closed Source for now, as it is a demo version i've made with partial capabilities.
it's part of a set of performance benchmarks i hope to have finished soon.
when i release the major components i've been building up to for 2 years,
this and everything else will be open sourced.
Correlation Coefficient TableThis is a sample PineSript code implementation using Correlation Coefficient. It uses the ta.correlation library of Pinescript and calculates the correlation based on user input length. The results are then plotted on a table. The corr value displays the actual correlation coefficient value while the Corr Status displays the interpretation of the correlation coefficient values.
The script takes the following input
Source Symbol - This is the base symbol which will be used in calculating correlation coefficient. In my case, since i am looking more often on crypto. I defaulted it to BTCUSDT
Symbol 1 - Symbol 5 - These are the coins that will be compared to our base symbol for correlation.
Source - You can select on which price source you want to be calculated. By default this is set to candle close price.
Length - The number of price bar to look back and retrieve correlation coefficient. Set to 20 bars by default.
Table Settings - Since the correlation coefficient are displayed on a table. An option to customize the table settings are presented.
The Correlation Status column was based on this Interpretation:
For more information, read this article www.tradingview.com
Global (World) Monetary Supply M2 (measured in USD)This is the Global Monetary Supply M2 of the richest and most populous countries that have info from at least 2008
It is measured in USD (converting the M2 of each of the countries respective currencies and virtually converting them into USD)
This is less than the global liquidity as it does not include the countries' assets in other currencies (on their balance sheets), it only focuses on the monetary supply of each of the countries own currencies.
DataChartLibrary "DataChart"
Library to plot scatterplot or heatmaps for your own set of data samples
draw(this)
draw contents of the chart object
Parameters:
this : Chart object
Returns: current chart object
init(this)
Initialize Chart object.
Parameters:
this : Chart object to be initialized
Returns: current chart object
addSample(this, sample, trigger)
Add sample data to chart using Sample object
Parameters:
this : Chart object
sample : Sample object containing sample x and y values to be plotted
trigger : Samples are added to chart only if trigger is set to true. Default value is true
Returns: current chart object
addSample(this, x, y, trigger)
Add sample data to chart using x and y values
Parameters:
this : Chart object
x : x value of sample data
y : y value of sample data
trigger : Samples are added to chart only if trigger is set to true. Default value is true
Returns: current chart object
addPriceSample(this, priceSampleData, config)
Add price sample data - special type of sample designed to measure price displacements of events
Parameters:
this : Chart object
priceSampleData : PriceSampleData object containing event driven displacement data of x and y
config : PriceSampleConfig object containing configurations for deriving x and y from priceSampleData
Returns: current chart object
Sample
Sample data for chart
Fields:
xValue : x value of the sample data
yValue : y value of the sample data
ChartProperties
Properties of plotting chart
Fields:
title : Title of the chart
suffix : Suffix for values. It can be used to reference 10X or 4% etc. Used only if format is not format.percent
matrixSize : size of the matrix used for plotting
chartType : Can be either scatterplot or heatmap. Default is scatterplot
outliersStart : Indicates the percentile of data to filter out from the starting point to get rid of outliers
outliersEnd : Indicates the percentile of data to filter out from the ending point to get rid of outliers.
backgroundColor
plotColor : color of plots on the chart. Default is color.yellow. Only used for scatterplot type
heatmapColor : color of heatmaps on the chart. Default is color.red. Only used for heatmap type
borderColor : border color of the chart table. Default is color.yellow.
plotSize : size of scatter plots. Default is size.large
format : data representation format in tooltips. Use mintick.percent if measuring any data in terms of percent. Else, use format.mintick
showCounters : display counters which shows totals on each quadrants. These are single cell tables at the corners displaying number of occurences on each quadrant.
showTitle : display title at the top center. Uses the title string set in the properties
counterBackground : background color of counter table cells. Default is color.teal
counterTextColor : text color of counter table cells. Default is color.white
counterTextSize : size of counter table cells. Default is size.large
titleBackground : background color of chart title. Default is color.maroon
titleTextColor : text color of the chart title. Default is color.white
titleTextSize : text size of the title cell. Default is size.large
addOutliersToBorder : If set, instead of removing the outliers, it will be added to the border cells.
useCommonScale : Use common scale for both x and y. If not selected, different scales are calculated based on range of x and y values from samples. Default is set to false.
plotchar : scatter plot character. Default is set to ascii bullet.
ChartDrawing
Chart drawing objects collection
Fields:
properties : ChartProperties object which determines the type and characteristics of chart being plotted
titleTable : table containing title of the chart.
mainTable : table containing plots or heatmaps.
quadrantTables : Array of tables containing counters of all 4 quandrants
Chart
Chart type which contains all the information of chart being plotted
Fields:
properties : ChartProperties object which determines the type and characteristics of chart being plotted
samples : Array of Sample objects collected over period of time for plotting on chart.
displacements : Array containing displacement values. Both x and y values
displacementX : Array containing only X displacement values.
displacementY : Array containing only Y displacement values.
drawing : ChartDrawing object which contains all the drawing elements
PriceSampleConfig
Configs used for adding specific type of samples called PriceSamples
Fields:
duration : impact duration for which price displacement samples are calculated.
useAtrReference : Default is true. If set to true, price is measured in terms of Atr. Else is measured in terms of percentage of price.
atrLength : atrLength to be used for measuring the price based on ATR. Used only if useAtrReference is set to true.
PriceSampleData
Special type of sample called price sample. Can be used instead of basic Sample type
Fields:
trigger : consider sample only if trigger is set to true. Default is true.
source : Price source. Default is close
highSource : High price source. Default is high
lowSource : Low price source. Default is low
tr : True range value. Default is ta.tr
Global Monetary Supply M2 Vs the Global GDP This indicator compares the Global (world) Monetary Supply (measured in USD) compared to the Global GDP.
This can be useful to measure the "money printing speed" of the world compare to the "world gdp growth", the higher the slope (angle of growth) the more money printing.
It includes the exact same countries of the Global M2 indicator (done by me), to make fair the comparison, which has the richest and most populous countries so to have a clear overview.
There tough a few very populated countries excluded, the details can be found on the Global M2 indicator script and reason for exclusion.
Enjoy!
Feature ScalingLibrary "Feature_Scaling"
FS: This library helps you scale your data to certain ranges or standarize, normalize, unit scale or min-max scale your data in your prefered way. Mostly used for normalization purposes.
minmaxscale(source, min, max, length)
minmaxscale: Min-max normalization scales your data to set minimum and maximum range
Parameters:
source
min
max
length
Returns: res: Data scaled to the set minimum and maximum range
meanscale(source, length)
meanscale: Mean normalization of your data
Parameters:
source
length
Returns: res: Mean normalization result of the source
standarize(source, length, biased)
standarize: Standarization of your data
Parameters:
source
length
biased
Returns: res: Standarized data
unitlength(source, length)
unitlength: Scales your data into overall unit length
Parameters:
source
length
Returns: res: Your data scaled to the unit length
TableBuilderLibrary "TableBuilder"
A helper library to make it simpler to create tables in pinescript
This is a simple table building library that I created because I personally feel that the built-in table building method is too verbose. It features chaining methods and variable arguments.
There are many features that are lacking because the implementation is early, and there may be antipatterns because I am not familiar with the runtime behavior like pinescript. If you have any comments on code improvements or features you want, please comment :D
Hurst Exponent Trend filterHello Traders !!
Hurst Exponent Trend filter utalises the Hurst Exponent and VAWMA (one of my other unique indicators - check my script publishings to use) to categorise the market and decide whether its Trending, H > 0.5, In random Geometric Brownian Motion (GBM) H = 0.5 or Mean reverting (Contrarian), H < 0.5, When Trending a Trend following indicator -The VAWMA- is color highlighted, By doing so, theoreticaly price noise is eleimnated leaving statsitcaly true zones of price action Trend.
What is The Hurst Exponent ?
Developed by The Hydrologist Edwin Harlod Hurst, The Hurst Exponent measures auto correlation in time series sets, Its first applicartions were in the natural world, e.g. in measureing the volume of water in a river.
Although since then it has had applications in Finance, this may be largly due to autocorrelation functions being usefull tools in univaritae time series anaylyis.
The Hurst Exponent (H) aims to segment the market into three differnet states, Trending (H > 0.5), Random Geometric Brownian Motion (H = 0.5) and Mean Reverting / Contrarian (H < 0.5). In my interpritation this can be used as a trend filter that iliminates market noise, which may be achived by only focusing on trending zones.
How to Interprit the Indicator :
Focusing on the Above image, When H > 0.5 A trend is presnet, to decide the directional bias, both VAWMA`s position is checked, given the fast VAWMA > slow VAWMA and the current close > the fast VAWMA a bulish bias is present, signafied by a vibrant green fill between the fast VAWMA and price action. note the exact opposite logic for a bearish bias and H > 0.5 (signafied by a vibrant red fill). .
I will continue to update this Trading Indicator.
PS : Thats given I can hopfully remmember
Happy Trading !!
SILLibrary "SIL"
mean_src(x, y)
calculates moving average : x is the source of price (OHLC) & y = the lookback period
Parameters:
x
y
stan_dev(x, y, z)
calculates standard deviation, x = source of price (OHLC), y = the average lookback, z = average given prior two float and intger inputs, call the f_avg_src() function in f_stan_dev()
Parameters:
x
y
z
vawma(x, y)
calculates volume weighted moving average, x = source of price (OHLC), y = loookback period
Parameters:
x
y
gethurst(x, y, z)
calculates the Hurst Exponent and Hurst Exponent average, x = source of price (OHLC), y = lookback period for Hurst Exponent Calculation, z = lookback period for average Hurst Exponent
Parameters:
x
y
z
Stock Dissect DashboardI developed this script, to help me in my analysis process of Stocks.
In it I have combined several things that I look at when evaluating a company.
First, there is the Macro part, where I have added the most important (at least for me) macro indicators, such as inflation, interest rates, initial jobless claims etc.
Under the last is the latest reported value, next we have the previous, and next to them is the change.
Underneath it is the technical part.
I have added the 1-Week, 1-Month, 3-Month, and 1-Year returns. This way I can easily see the performance of the stock over time.
We have a market regime indicator, which tells us whether the stock is Trending, Mean-Reverting, or Neutral.
Also, I've added the RSI and 50 and 200 Day Moving Averages for additional analysis
At the bottom, I've included some of the fundamentals that I look at in my analysis process. We have the PE and PB ratio, as well as the debt-to-equity and profit margins.
I hope you guys like it and saves you as much time and energy as it did for me.
Happy trading!
Multi-Asset Month/Month % change 10yr Averages10 Year Averages of Month-on-Month % change: Shows current asset, and 3x user input assets
-For comparing seasonal tendencies among different assets.
-Choose from a variety of monthly average measures as source: sma(close, length), sma(ohlc4, length); as well as sma's of vwap, vwma, volume, volatility. (sma = simple moving average).
-Averages based on month cf previous month: i.e. Feb % = Feb compared to Jan; Jan % = Jan compared to prev year's Dec. Average of the last 10yrs of these values is the printed value.
-Plot on current year (2023), or previous year (2022). If Plotting on current year, and a month of year has not yet occured, a 9yr average will be printed.
/// notes ///
-daily bars in month is a global setting; so choose assets which have similar trading days per month. i.e. Crypto: length = 30 (days per month); Stocks/FX/Indices: length = 21 (days per month).
-only plots on Daily timeframe.
10yr Avgs; Plotting with Year = 2022; using sma(close, 21) as source for average M/M change
basilPort Portfolio Tracker Pro [basilChart]This script is helps giving detailed information about the portfolio.
Prominent features of this portfolio tracking indicator are:
- Chart of your portfolio: This portfolio tracker let’s you view the chart of your portfolio real-time.
- Visualized Profit/Loss: Indicator will let you know of your profit and loss on the chart.
- In-Depth Monitoring: Most Gained 1st, 2nd, 3rd and Most Lost 1st, 2nd, 3rd.
- All Time Highs: Let’s us view All Time Highs on the portfolio chart for each equity on the chart.
- 40 Different Symbols: Supports monitoring 40 different symbols at the same time, real-time.
- 10 Pair Detailed View: For the first 10 symbol in our portfolio, indicator supports viewing detailed info about each of them. Such as: Price, Cost, Qty, Profit Percentage, Chart TF Profit Percentage, Weight
basilPort Portfolio Tracker Pro indicator can be used to:
- Track your investments: The basilPort Portfolio Tracker allows you to enter all your investments and their associated details, such as the ticker symbol, purchase price, and quantity. It then calculates your total portfolio value, including gains and losses.
- Monitor portfolio performance: Provides an overview of your portfolio's performance over time. You can see how your portfolio is performing on a daily, weekly, or monthly basis, and compare it to the performance of the overall market.
- Analyze asset allocation: Helps you analyze your portfolio's asset allocation, which is the percentage of your portfolio invested in different symbols. You can use this information to adjust your portfolio and diversify your holdings.
- Set investment goals: You can use the Portfolio Tracker to set investment goals and track your progress towards achieving them. For example, you can set a goal of achieving a certain rate of return or accumulating a specific amount of wealth by a certain date.
Overall, the Portfolio Tracker is a useful tool for investors who want to monitor their portfolio's performance, evaluate their investment strategies, and make informed investment decisions.
Best and worst 3 performers in our portfolio:
From Data Window, script let’s us see the best and worst 3 performers in our portfolio. To know how to read it we follow this pattern:
- Check 1st Gained value.
- Find the nth symbol from script’s Inputs tab.
- Check 1st Gained to see its Profit Percentage.
An example scenario to reading Data Window is explained at the very end of the description.
Using the script:
- Add this script to the chart from indicators tab
- Set starting date for the basilGrid Portfolio Tracker Pro either by dragging and dropping the vertical line or by the date-time picker from indicator Inputs tab.
- Set symbols and enable them to monitor with this indicator.
- Set quantity and price information for the symbols you have selected.
- Set visual settings to tailor your experience.
basilPort Portfolio Tracker is an indicator that allows you to track and analyze the performance of your investment portfolio over time. It's a helpful tool for investors who want to monitor their holdings and evaluate their investment strategies.
In this example we used pair BTCUSDT 1h timeframe, our settings are:
Inputs Tab:
- Start Date: 2022-12-13 13:00
- Show All Time Highs: Unchecked
- Show Pair Data (First 10): Checked
- Show Total Data: Checked
Symbols:
- BINANCE:ETHUSDT Qty 4.2 Price 1 332
- BINANCE:BTCUSDT Qty 0.5 Price 17 469
- BINANCE:BNBUSDT Qty 20 Price 270
- BINANCE:AVAXUSDT Qty 200 Price 13.61
- BATS:PYPL Qty 50 Price 78.5
- BATS:AMZN Qty 40 Price 95.4
- BATS:ETSY Qty 40 Price 135.64
For example, if you check Data Window, you'll see the following:
An example scenario:
- Bought Portfolio Value 39142.98 => The cost of the portfolio
- Current Portfolio Value 39142.98 => The current value of the portfolio
- 1st Gained 2.00 => The most gained symbol's index. (Checking the Symbols what we see on the 2nd spot is this symbol, we can see this value indicates BINANCE:BTCUSDT)
- 1st Gained 28.09 => Means BINANCE:BTCUSDT is +%28.09
- 2nd Gained 4.00 => Again, after checking the Symbols, we now know what this value indicates. It is AVAXUSDT.
- 2nd Gained 18.59 => Means BINANCE:AVAXUSDT is +%18.59
..
And so on to Lost section. Only difference between Gained and Lost section indicates Lost equities.
This script's purpose is to make easier to have more control over the portfolio. With in depth data that’ll help with decision-making.