Trade-o-Scope: Multi-Asset Price TrackerTrade-o-Scope team presents the "Multi-Asset Price Tracker" indicator.
"Multi-Asset Price Tracker" is designed to help analyze price changes across multiple assets within time intervals you define.
Motivation:
Most screeners on the market track price changes over predefined periods, like 1H\4H\12H\1D\3D\7D\etc. Typically, they compare initial and current prices.
But what if you want to analyze assets' performance over arbitrary historical intervals?
Perhaps you want to spot which assets dropped most within 7 hours after a specific industry announcement? Or do you want to check which asset grew the most in January last year?
This is where the "Multi-Asset Price Tracker" shines. It lets you define arbitrary intervals and track price changes for selected assets.
Overview and functionality:
Define arbitrary time intervals in history for analyzing price changes.
Create up to 10 lists, each with up to 40 symbols to track. Populate lists with data from text files, Excel, or CSV. Lists are just multiline text strings, each line representing an individual symbol.
Switch between lists, with one active list at a time.
Specify up to 3 fixed symbols for additional analysis alongside active list symbols. You may use them as reference points to compare price changes of the symbols in the List.
Customize table appearance and position.
Set sorting criteria and direction for displayed values.
View the results in a table on the chart.
How it works:
"Multi-Asset Price Tracker" will track the symbol's price during the interval you define.
The indicator identifies each symbol's Start, Max, Min, and End prices during the interval. It then calculates relative changes: Start-to-Max, Start-to-Min, and Start-to-End.
The list of relative changes is ordered by the column chosen in settings and displayed on the chart.
List example (up to 10 Lists):
BINANCE:WLDUSDT.P
BINANCE:WOOUSDT.P
BINANCE:XEMUSDT.P
...
...
(up to 40 symbols per List)
Calculation example:
Symbol Start-price = $100
Symbol Max-price = $150
Symbol Min-price = $75
Symbol End-price = $110
Start-to-Max = 100% * (Max-price - Start-price) / Start-price = 100% * ($150 - $100) / $100 = 50%
Start-to-Min = 100% * (Min-price - Start-price) / Start-price = 100% * ($75 - $100) / $100 = -25%
Start-to-End = 100% * (End-price - Start-price) / Start-price = 100% * ($110 - $100) / $100 = 10%
Chart example:
In the provided chart, you can observe an example with a table generated by the indicator, along with manually added arrows and labels explaining the calculation process for an individual symbol from the list.
How to use:
1) Add "Multi-Asset Price Tracker" indicator to the chart
2) The indicator will ask you to define the start and the end of the interval using the mouse on the chart.
Voila! You'll see the table with sorted relative price changes based on default list values and settings.
3) Customize the indicator's settings:
Define the interval Start and End datetime.
Optionally, change the interval Start and End by clicking on the indicator name and dragging the vertical mark at the edges of the interval to a new position.
Define the Start and End price sources.
Choose a color to highlight the interval on the chart's background.
Set the table position, size, text size, and border size.
Specify the column for sorting and its direction.
Choose whether to sort chart symbols and fixed symbols together with list symbols or display them at the top of the table irrespective of their relative price change.
Enable fixed symbols if needed, and define up to 3 fixed symbols.
Define symbol lists, with up to 10 lists and 40 symbols each.
Select which List to make active - symbols from the active list will be calculated and displayed.
Multiassets
Mean Reversion Watchlist [Z score]Hi Traders !
What is the Z score:
The Z score measures a values variability factor from the mean, this value is denoted by z and is interpreted as the number of standard deviations from the mean.
The Z score is often applied to the normal distribution to “standardize” the values; this makes comparison of normally distributed random variables with different units possible.
This popular reversal based indicator makes an assumption that the sample distribution (in this case the sample of price values) is normal, this allows for the interpretation that values with an extremely high or low percentile or “Z” value will likely be reversal zones.
This is because in the population data (the true distribution) which is known, anomaly values are very rare, therefore if price were to take a z score factor of 3 this would mean that price lies 3 standard deviations from the mean in the positive direction and is in the ≈99% percentile of all values. We would take this as a sign of a negative reversal as it is very unlikely to observe a consecutive equal to or more extreme than this percentile or Z value.
The z score normalization equation is given by
In Pine Script the Z score can be computed very easily using the below code.
// Z score custom function
Zscore(source, lookback) =>
sma = ta.sma(source, lookback)
stdev = ta.stdev(source, lookback, true)
zscore = (source - sma) / stdev
zscore
The Indicator:
This indicator plots the Z score for up to 20 different assets ( Note the maximum is 40 however the utility of 40 plots in one indicator is not much, there is a diminishing marginal return of the number of plots ).
Z score threshold levels can also be specified, the interpretation is the same as stated above.
The timeframe can also be fixed, by toggling the “Time frame lock” user input under the “TIME FRAME LOCK” user input group ( Note this indicator does not repain t).
PGT: Pretty Good TraderLittle bit of background :
I am a broke college student on the East coast, and I have developed a hobby for creating trading algorithms. This is one of the better scripts that I have written. Unfortunately, as a broke college student, I don't have the disposable income to actually trade using real money. If you are interested in donating to my broke college student fund, please message me!
On to the script :
This script was written in pine version 3 and does not calculate_on_tick . This means that it does not repaint . The numbers you see are, to the best of my knowledge, accurate.
Because most scripts tend to overfit data to generate the "best looking data", I decided to create an algorithm that would be generalizable as possible to a diverse number of trading pairs. This script works on both crytpo markets(works best on smaller time frame) and stock markets(works best on larger time frames).
I am publishing this script to both gauge and generate interest in a Python trading bot which I have written which automatically buys and sells on different exchanges by using the predictive signals of this indicator.