Yoshi AlertsRemake of infernixx's traders reality script.
Traders Reality indicator
This indicator serves as the Tradingview equivalent of an MT4 indicator suite.
It differentiates from existing TV indicators in its style and total feature set (most notably PVSRA and PVSRA Override)
It was originally designed for forex markets, and it will work for crypto as well, but it has not been tested on stocks.
List of features:
PVSRA Candles
Market boxes (NY/JP/ HK /UK/ FR and Brinks Boxes)
5/13/50/200/800 EMAs (cloud for 50EMA)
Pivot points (S/M/R 1,2,3; PP )
Yesterday and Last Week price range
Average Daily Range (Weekly and Monthly as well)
Daily Open
PVSRA Override
All of these are configurable in the indicator settings.
Usage instructions:
PVSRA Candle colors meaning:
Green (bull) and red (bear): Candles with volume >= 200% of the average volume of the 10 previous chart candles, and candles where the product of candle spread x candle volume is >= the highest for the 10 previous chart time candles.
Blue (bull) and blue-violet (bear): Candles with volume >= 150% of the average volume of the 10 previous chart candles
PVSRA Override
In order to get reliable bar coloring, we need accurate data. If you're on a chart with low volume on some obscure exchange, you may want to use another exchanges datafeed for the symbol you are on to calculate the PVSRA bar colors with. This lets you do exactly that. By default it's off, but you can turn it on and use INDEX:BTCUSD, or really any other chart you want. You can combine charts too, e.g. use BINANCE:BTCUSDT+COINBASE:BTCUSD.
PVSRA Alerts
Alerts can be made for PVSRA "vector"/"climax" candles:
1. Create Alert (Clock with + sign)
2. Set Condition: "Traders Reality",
3. Select "Alert on Vector Candle",
4. Set it to Once per Bar,
5. choose your notification options.
Market boxes
The market boxes times are configurable and will change depending on the exchange timezone. I recommend to pick your main exchange/chart and adjust the times so that they are correct. Technically you will need to shift the time from the exchanges' timezone to GMT . Default values should be good for UTC based exchanges in current US+UK summer time.
Concept
Fractal DimensionFractal dimension, as described by BCA-research. When the function reaches the lower boundary, the fractal dimension collapses. This indicates that the market participants, on different time frames, now are all betting on the same direction. The market is now overextended. However, the boundary value is arbitrary and can be modified.
Backtesting- IndicatorFor anyone interested, Here is an example of how to put backtesting results into an Indicator. This calculates the same values as you find in the Summary Screen of the built in Strategy backtester. This will use the same result size as the standard backtester i.e. 5 minute chart grabs roughly 1 month of data, 1 minute chart grabs 1 week of data, etc... I tried to keep this as self-contained as possible so I put most of the code for the results in the bottom of the Indicator. The results stop at the last completed trade signal i.e. a Buy has a Sell to it. This is the same indicator I posted earlier with the PCT Trailing StopLoss so you will see that code in here as well. As said in my previous posting, the indicator is just a simple EMA crossover to give it something to do and I would not recommend using this indicator on its own, but instead copy the code to your own indicator if you find it useful. I also left the code in so that you can switch back to a Strategy if you want to verify the results.
Additional Notes:
- The results are within an acceptable margin of error due to the fact that the Indicator is having to calculate based on when the Buy and Sell Signal occur as opposed to when actual trades occur like in the Strategy Backtester
- I was trying to find a way to set the number of Buy Signals to use i.e. show me the results from the past 100 trades but couldn't sort out the logic. I am open to suggestions. Also keep in mind I am not a coder by profession so if you have any ideas on that front, please explain it to me as though I am a 5 year old child and provide code examples if possible :)
- I included the Strategy results in the Screen Shots so that you can see where the results line up.
Additional Additional Note:
This is not financial advice. Use at your own risk.
Study forloop Star Diamond'Study forloop' pinescript Program to print star diamond
The Program Logic
I've taken the previous script and added a footer to it. instantly transformed into a diamond shape.
Flat Detect By Bollinger BandsThis simple script indicate the potential flat market zones, calculated based on the Bollinger Bands width.
It's showing the Bollinger Bands in red when the market is detected as flat.
You can adjust the Width Threshold with precision on the inputs settings.
Enjoy :)
ICT Killzones [28Trades]Indicator plots weekdays and killzones of the most important trading sessions.
The times of each killzone come from the education material of Inner Circle Trader.
Asia killzone: 00:00 - 05:00
London open killzone: 07:00 - 10:00
New York killzone: 12:00 - 14:00
London close killzone: 15:00 - 17:00
GMT+0
It's not depended on your tradingview account timescale/setting, so the killzones always stay at the right place in the chart whether your timesetting is UTC or UTC+5.
It's made so that it automatically detects if a market is closed during weekends. Because of this, it works well for crypto as well as forex markets. The difference between this indicator and others is that this one is plotted on the actual chart instead of an oscillator below the chart, which gives a much cleaner chart in my opinion.
Settings:
Show day of week
show killzones
Hide indicator above specific timeframe
Choose where to display the weekdays or killzones, top or bottom of the chart
Crypto Spot Market BotHello Friends.
This script is only for long positions.
How does the algorithm work ?
The Relative Momentum Index
Relative Strength İndex
Average Directional Movement İndex
Momentum
When rsi and adx produce signals in the same direction, the rmi indicator confirms the signal. After the Confirmed Signal, the buy-side transaction is entered , the closed according to the % of profit taking and stoploss specified on the algorithm in the entered transaction.
In the spot market, it is possible to make money even in a down trend
All shared charts run within a 1-hour time frame.
Note : The shared backtest results have been shared as of 9/9/2021 by calculating 50% balance and 2 pyramiding methods in an account of 1000 dollars. Keep in mind that this algorithm will want to try to average down in possible worst-case scenarios. 2% - %3take profit levels will provide consecutive gains in the spot market.
How should the adjustments be made?
Value variables should be made according to formula a and formula b values and backtest results. You can increase the frequency of transactions by lowering the adx and rsi values.
Alarm Features ;
Signal Alert
TakeProfit Alert
Stoploss Alert.
Overview :
Backtest Script Link :
Error Message -- DemoThis script is proof of concept to display an “error message” to provide user feedback when valid, but non-logical variables are input by the end user. In this example, the user enters a lower limit that is greater than the upper limit. The Pinescript user input box allows input types and min/max values, but it does not allow input conditions like (Upper > Lower) for each variable. This script evaluates the user input and determines if the variables are logical. If not, it will print an error box using the new Pinescript table function.
This is a demo only – there are no signals, strategies, or alerts. Hopefully, some pinescripters will find this idea useful and expand on the concept.
User inputs an Upper Limit that is lower than the Lower Limit – error message displayed.
User inputs logical Upper and Lower Limits (Upper Limit is greater than Lower Limit) – normal plots.
Examples of Rolling Average Using Automated AnchoringIn this study, I present a method to expose NaN values to development environment.
This exposure allows NaN values to be used by methods in scripts.
I also show how to use values, even NaN values, as anchors from which statistics can be computed from.
I demonstrate how to do this with constants and variables in methods for computing the cumulative/rolling average of a series.
I also show how to calculate the cumulative/rolling average from the start of a ticker series using the aforementioned methods.
Each method has a description on how some of their parts work as well as their constraints.
Method #1 - Can only be used for computing the rolling average on the ticker series.
Method #2 - The simple moving average from the Pine Script reference.
- Can be used to calculate the rolling average of the ticker series and number values of a series.
- This method seems to cause an error when there are many bars in the series.
Method #3 - The most versatile method due to the use of computing the rolling average using an array.
- Timeout will occur when computing the rolling average of an entire ticker series which is long.
- Timeout has not occurred when computing a rolling average of a series from NaN or non-NaN anchor points even when the series is long.
This is an attempt to get around the constraints of the built-in sma(source, length) function in which length cannot be dynamically adjusted.
Other Pine Script functions have that constraint which we can get around by defining our own functions.
Leledc levels (IS) LeveLeledc - Exhaustion levels (InSilico)
Method for zero confirmation support/resistance level detection using Leledc Exhaustion Bars
Study is extension/mod of glaz script ,its implementing simple but unorthodox use-case for "Leledc Exhaustion Bars"
More information on core function in source scripts page ->
P.s Written quickly and spontaneously
Silicone Re-calibrate ATRInspired by @bitmexstorm study Volatility-calibrated ATR
This study features two different ATR trail derivative concepts-Default one is called- "Silicone", and the alternative is called- "Mercurial. To decrease confusion during backtesting, trails plots with distinct color palette.
Options include the ability to apply a smoothening filter that affects both modes as well as an adaptive/fixed mode for the "Silicone" trail.
Parameters for trail dynamics/behavior is unlocked(!Parameters in publish version is far from optimized! Need serious testing! )
Candle Coloring reflects trail direction.
Feedback on optimal periods and multipliers is needed and appreciated