Swing ComparatorHere I bring you an array of methods to compare the swings and consistency between assets.
This indicator is excellent for swing traders and scalpers looking to maximize their profits by examining which of two closely related pairs provides greater price fluctuation during given period.
This indicator works against two assets, which are to be configured in settings.
This indicator has 5 particular plots for you to examine, each which can be considered for you to contemplate which pair for you to next perform a trade on.
First off, let's start with the blue.
The blue is simply a pearson correlation coefficient, thankfully now included in tradingview. This provides a value of 1 as values show to be close correlation, 0 showing no correlation, and -1 showing negative correlation - meaning an increase in one pair correlates to a decrease in another pair. This will turn green when greater than 0.975, showing a very strong relationship between the two pairs, and red when below -0.975. This is the only plot to be interpreted on a scale from -1 to +1.
Next, we have the purple and yellow background plots, followed by the white and green moving averages. Though similar, these are all slightly different.
For each of these 4 plots, a value greater than 0 indicates greater price swings for your Symbol #1, while a value less than 0 indicates greater price swings for Symbol #2.
These calculations are performed on a per bar basis, meaning you're likely going to be examining bars longer than what you'll normally be trading on. Use confluence, as well as your own judgement for this.
For example, if symbol #1 provides a bar with an open value 1% greater or less than close, providing a 1% swing on a given bar, but symbol #2 provides 2%, the indicator will fall down toward the negative, as Symbol #2 had the greater swing.
First, yellow focuses on only open/close bar values, and thus the body of the candlestick.
Purple, on the other hand, focuses on the wicks of the candle - thus, the high/low values. I've opted to make these two different values as a wick focuses on the embodiment within the time period, and body focuses on the open/close instant.
Next, the green is an extended EMA of the purple - High/Low ratio. This is important to examine trend overtime, and reduce unneeded noise.
Lastly, the white is simply difference in the standard deviation of the particular bars, between the two symbols you have selected. The tends to usually tie up with the green pretty well.
Considering this is going to by nature be very noisy datasets, I have included in settings the option to extend an EMA for everything. They have their default settings, but if you'd like to examine the trend without an EMA, feel free to set it to 1 to eliminate its effects.
I have additionally added the ability to introduce clipping, as well as scale the correlation coefficient to remain visible when examining very short term time scales. In the future, I hope to properly normalize all plots to remain within a -1 to +1 basis. Please be patient as I have multiple projects ongoing.
Suggestions and constructive criticism are very well encouraged.
Anyone is welcome to utilize this in their code, as well, i just ask you provide credit.
As you reduce to time frames less than a day, you will likely have to reduce the coefficient min/max closer to 0.025, or just hide it entirely.
TODO:
Make it look better. Sorry, folks.
Introduce latency between pairs.
Examine significance of a coefficient of determination
Remove static weights and introduce z-score and linear normalization.
Consider adding room for a 3rd pair. This could get ugly, however.
M-oscillator
Bitmex BTC Perpetual Premium and FundingThis script tracks the premium (default red line) and the funding rate (default yellow area) of the Bitmex XBTUSD pair perpetual contract.
The calculations are based on the 8H TWAP of interest rates and premium index from Bitmex.
Buy / Sell alert indicator [Crypto_BCT]Hello everyone!
I bring to your attention a indicator to determine the point of buy and sell purchase.
It is based on oscillators and a moving average.
It can be used to work with bots, for example 3COMMAS DCA bot.
Signal Condition Settings:
ATR
The current candle is larger than the ATR for this period
EMA
The signal is necessarily below (for buy) and above (for sell) the EMA of the specified period
(Buy) RSI low
The RSI index is below this value
(Sell) RSI High
The RSI index is higher than this value
(Buy) MFI low
The MFI index is below this value
(Sell) MFI High
The MFI index is higher than this value
(Buy) CCI low
CCI index is below this value
(Sell) CCI High
The CCI index is higher than this value
(Buy) Lowest bar from
The closing of the current bar is lower than the closing of the bars back in this range
(Sell) Highest bar from
The closing of the current bar is higher than the closing of bars in this range
(Buy) Lowest EMA bar ago
During a given distance back, the EMA value only decreased
(Sell) Highest EMA bar ago
At a given distance back, the EMA value only increased
I hope it will be useful!
Sell alert [Crypto_BCT]Hello everybody!
I bring to your attention an indicator for determining the point of sell.
It is based on oscillators and a moving average.
Signal Condition Settings:
ATR
The current candle is larger than the ATR for this period
EMA
The signal must be above the EMA of the specified period
MFI High
The MFI index is higher than this value
CCI High
The CCI index is higher than this value
RSI High
The RSI index is higher than this value
Highest bar from
The closing of the current bar is higher than the closing of bars in this range
Highest EMA bar ago
At a given distance back, the EMA value only increased
I hope it will be useful!
Wave Trend OscillatorThis is a very standard version of the Wave Trend Oscillator.
The Channel and Average values are displayed as lines, most people display them as areas.
The Channel and Average difference is displayed as a histogram, most people display it as a tiny noisy area.
I was unable to find a standard version of the Wave Trend Oscillator.
The colorful hyped up versions of this indicator made me feel like a clown while using them.
I have essentially copied the style of the MACD with this indicator, to keep things professional.
With this WTO, you can change the timeframe and source.
You can also change the histogram average length and multiplier, making it usable.
The typical way that people display the histogram is completely unusable and just for appearance.
Now it does a decent job showing when the momentum of the WTO's downward movement is slowing down, just like how the MACD histogram works.
This indicator is essentially a normalized MACD, though they are calculated differently.
The Wave Trend Oscillator is useful for spotting/monitoring changed in mid-trend momentum.
In my experience, divergence in this indicator is a strong signal.
If the MACD is too slow for you, then this is a great alternative; without all the extra fluff people usually add to it.
Buy alert [Crypto_BCT]Hello everyone!
I bring to your attention a simple indicator to determine the point of purchase.
It is based on oscillators and a moving average.
It can be used to work with bots, for example 3COMMAS DCA bot.
Signal Condition Settings:
ATR
The current candle is larger than the ATR for this period
EMA
The signal is necessarily below the EMA of the specified period
MFI low
The MFI index is below this value
CCI low
CCI index is below this value
RSI low
The RSI index is below this value
Lowest bar from
The closing of the current bar is lower than the closing of the bars back in this range
Lowest EMA bar ago
During a given distance back, the EMA value only decreased
I hope it will be useful!
test - wave collapseexperimental:
translates a gaussian wave to collapse from high/low peaks, slice of a pun intended to the cat in the box :)
Currency StrengthThis script measures the strength of the 6 major currencies USD, EUR, GBP, CAD, AUD and JPY.
Simply, it averages the RSI values of a currency vs the 5 other currencies in the basket, and displays each average RSI value in a table with color coding to quickly identify the strongest and weakest currencies over the past 14 bars (or user defined length).
The Dir. value looks at the difference in average RSI value between current and X bars back (user defined), telling you whether the combined RSI value has gone up or down in the last X bars.
Using the average RSI allows us to get a sense of the currency strength vs an equally weighted basket of the other majors, as opposed to using Indexes which are heavily weighted to 1 or 2 currencies.
The table doesn't load super fast as we are making 15 Security requests to get the values for each pair (where possible we reverse the values of the pair to reduce Security requests, e.g. we don't need to request EURUSD and USDEUR, we reverse the value to calculate the USD RSI).
Volume Zone Oscillator (VZO)My interpretation of Walid Khalil's Volume Zone Oscillator (VZO) as published in the 2009 International Federation of Technical Analysis Journal.
This VZO indicator is also the same as Danielle Shay's popular Simpler Trading TurboVZO indicator.
ABOUT:
The oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
HOW TO USE THE INDICATOR:
The default period is 14 but can be adjusted after backtesting.
The VZO points to a positive trend when it rises above and maintains the 5% level, and a negative trend when it falls below the 5% level and fails to turn higher. Oscillations between the 5% and 40% levels mark a bullish trend zone, while oscillations between -40% and 5% mark a bearish trend zone. Meanwhile, readings above 40% signal an overbought condition, while readings above 60% signal an extremely overbought condition. Alternatively, readings below -40% indicate an oversold condition, which becomes extremely oversold below -60%.
Kahlil recommends confirming VZO signals with a 14-period average directional index (ADX), with values greater than 18 pointing to a trending market - search Tradingview's built-in indicators for the Directional Movement Index (DMI).
INTRADAY SCALPING:
Whilst the VZO is already smoothed with an exponential moving average, the indicator settings include an additional 'smoothing' function to remove any excess 'noise' in the plots for intraday use.
[Sextan] Delta-RSI Oscillator BacktestLevel: 1
NOTE: This is a request by @scantor516 to backtest Delta-RSI Oscillator by tbiktag with my Sextan framework. You can backtest many of my indicators in minutes now! Of course,you can define your own indicator in the highlighted area in compliance with the uniform format, which guarantee when you use "Indicator on Indicator" function, it would not produce any error.
Courtesy of tbiktag for his Delta-RSI Oscillator Strategy
Background
Backtesting of technical indicators and strategies is the most common way to understand a quantitative strategy. However, the complicated configuration and adaptation work of backtesting many quantitative tools makes many traders who do not understand the code daunted. Moreover, although I have written a lot of strategies, I am still not very satisfied with the backtest configuration and writing efficiency. Therefore, I have been thinking about how to build a backtesting framework that can quickly and easily evaluate the backtesting performance of any indicator with a "long/short entry" indicator, that is, a "simple backtesting tool for dummies". The performance requirements should be stable, and the operation should be simple and convenient. It is best to "copy", "paste", and "a few mouse clicks" to complete the quick backtest and evaluation of a new indicator.
Luckily, I recently realized that TradingView provides an "Indicator on Indicator" feature, which is the perfect foundation for doing "hot swap" backtesting. My basic idea is to use a two-layer design. The first layer is the technical indicator signal source that needs to be embedded, which is only used to provide buy and sell signals of custom strategies; the second layer is the trading system, which is used to receive the output signals of the first layer, and filter the signals according to the agreed specifications. , Take Profit, Stop Loss, draw buy and sell signals and cost lines, define and send custom buy and sell alert messages to mobile phones, social software or trading interfaces. In general, this two-layer design is a flexible combination of "death and alive", which can meet the needs of most traders to quickly evaluate the performance of a certain technical indicator. The first layer here is flexible. Users can insert their own strategy codes according to my template, and they can draw buy and sell signals and output them to the second layer. The second layer is fixed, and the overall framework is solidified to ensure the stability and unity of the trading system. It is convenient to compare different or similar strategies under the same conditions. Finally, all trading signals are drawn on the chart, and the output strategy returns. test report.
The main function:
The first layer: "{Sextan} Your Indicator Source", the script provides a template for personalized strategy input, and the signal and definition interfaces ensure full compatibility with the second layer. Backtesting is performed stably in the backtesting framework of the layer. The first layer of this script is also relatively simple: enter your script in the highlighted custom script area, and after ensuring the final buy and sell signals long = bool condition, short = bool condition, the design of the first layer is considered complete. Input it into the PINE script editor of TradingView, save it and add it to the chart, you can see the pulse sequence in yellow (buy) and purple (sell) on the sub-picture, corresponding to the main picture, you can subjectively judge that the quality of the trading point of the strategy is good Bad.
The second layer: "{Sextan} PINEv4 Sextans Backtest Framework". This script is the standardized trading system strategy execution and alarm, used to generate the final report of the strategy backtest and some key indicators that I have customized that I find useful, such as: winning rate , Odds, Winning Surface, Kelly Ratio, Take Profit and Stop Loss Thresholds, Trading Frequency, etc. are evaluated according to the Kelly formula. To use the second layer, first load it into the TrainingView chart, no markers will appear on the chart, since you have not specified any strategy source signals, click on the gear-shaped setting next to the "{Sextan} PINEv4 Sextans BTFW" header button, you can open the backtest settings, the first item is to select your custom strategy source. Because we have added the strategy source to the chart in the previous step, you can easily find an option "{Sextan} Your Indicator Source: Signal" at the bottom of the list, this is the strategy source input we need, select and confirm , you can see various markers on the main graph, and quickly generate a backtesting profit graph and a list of backtesting reports. You can generate files and download the backtesting reports locally. You can also click the gear on the backtest chart interface to customize some conditions of the backtest, including: initial capital amount, currency type, percentage of each order placed, amount of pyramid additions, commission fees, slippage, etc. configuration. Note: The configuration in the interface dialog overrides the same configuration implemented by the code in the backtest script.
How to output charts:
The first layer: "{Sextan} Your Indicator Source", the output of this script is the pulse value of yellow and purple, yellow +1 means buy, purple -1 means sell.
The second layer: PINEv4 Sextans Backtest Framework". The output of this script is a bit complicated. After all, it is the entire trading system with a lot of information:
1. Blue and red arrows. The blue upward arrow indicates long position, the red downward arrow indicates short position, and the horizontal bar at the end of the purple arrow indicates take profit or stop loss exit.
2. Red and green lines. This is the holding cost line of the strategy, green represents the cost of holding a long position, and red represents the cost of holding a short position. The cost line is a continuous solid line and the price action is relatively close.
3. Green and yellow long take profit and stop loss area and green and yellow long take profit and stop loss fork. Once a long position is held, there is a conditional order for take profit and stop loss. The green horizontal line is the long take profit ratio line, and the yellow is the long stop loss ratio line; the green cross indicates the long take profit price, and the yellow cross indicates the long position. Stop loss price. It's worth noting that the prongs and wires don't necessarily go together. Because of the optimization of the algorithm, for a strong market, the take profit will occur after breaking the take profit line, and the profit will not be taken until the price falls.
4. The purple and red short take profit and stop loss area and the purple red short stop loss fork. Once a short position is held, there will be a take profit and stop loss conditional order, the red is the short take profit ratio line, and the purple is the short stop loss ratio line; the red cross indicates the short take profit price, and the purple cross indicates the short stop loss price.
5. In addition to the above signs, there are also text and numbers indicating the profit and loss values of long and short positions. "L" means long; "S" means short; "XL" means close long; "XS" means close short.
TradingView Strategy Tester Panel:
The overview graph is an intuitive graph that plots the blue (gain) and red (loss) curves of all backtest periods together, and notes: the absolute value and percentage of net profit, the number of all closed positions, the winning percentage, the profit factor, The maximum trading loss, the absolute value and ratio of the average trading profit and loss, and the average number of K-lines held in all trades.
Another is the performance summary. This is to display all long and short statistical indicators of backtesting in the form of a list, such as: net profit, gross profit, Sharpe ratio, maximum position, commission, times of profit and loss, etc.
Finally, the transaction list is a table indexed by the transaction serial number, showing the signal direction, date and time, price, profit and loss, accumulated profit and loss, maximum transaction profit, transaction loss and other values.
Remarks
Finally, I will explain that this is just the beginning of this model. I will continue to optimize the trading system of the second layer. Various optimization feedback and suggestions are welcome. For valuable feedback, I am willing to provide some L4/L5 technical indicators as rewards for free subscription rights.
[Sextan] Fisher Transform BacktestLevel: 1
NOTE: This is a request by @Uni_ve12se to backtest Ehlers Fisher Transform by cheatcountry with my Sextan framework. I ONLY take 5 minutes to perform it and how much time would you cost for this work? You can backtest many of my indicators in minutes now! Of course,you can define your own indicator in the highlighted area in compliance with the uniform format, which guarantee when you use "Indicator on Indicator" function, it would not produce any error.
Courtesy of cheatcountry for his Ehlers Fisher Transform indicator
Background
Backtesting of technical indicators and strategies is the most common way to understand a quantitative strategy. However, the complicated configuration and adaptation work of backtesting many quantitative tools makes many traders who do not understand the code daunted. Moreover, although I have written a lot of strategies, I am still not very satisfied with the backtest configuration and writing efficiency. Therefore, I have been thinking about how to build a backtesting framework that can quickly and easily evaluate the backtesting performance of any indicator with a "long/short entry" indicator, that is, a "simple backtesting tool for dummies". The performance requirements should be stable, and the operation should be simple and convenient. It is best to "copy", "paste", and "a few mouse clicks" to complete the quick backtest and evaluation of a new indicator.
Luckily, I recently realized that TradingView provides an "Indicator on Indicator" feature, which is the perfect foundation for doing "hot swap" backtesting. My basic idea is to use a two-layer design. The first layer is the technical indicator signal source that needs to be embedded, which is only used to provide buy and sell signals of custom strategies; the second layer is the trading system, which is used to receive the output signals of the first layer, and filter the signals according to the agreed specifications. , Take Profit, Stop Loss, draw buy and sell signals and cost lines, define and send custom buy and sell alert messages to mobile phones, social software or trading interfaces. In general, this two-layer design is a flexible combination of "death and alive", which can meet the needs of most traders to quickly evaluate the performance of a certain technical indicator. The first layer here is flexible. Users can insert their own strategy codes according to my template, and they can draw buy and sell signals and output them to the second layer. The second layer is fixed, and the overall framework is solidified to ensure the stability and unity of the trading system. It is convenient to compare different or similar strategies under the same conditions. Finally, all trading signals are drawn on the chart, and the output strategy returns. test report.
The main function:
The first layer: "{Sextan} Your Indicator Source", the script provides a template for personalized strategy input, and the signal and definition interfaces ensure full compatibility with the second layer. Backtesting is performed stably in the backtesting framework of the layer. The first layer of this script is also relatively simple: enter your script in the highlighted custom script area, and after ensuring the final buy and sell signals long = bool condition, short = bool condition, the design of the first layer is considered complete. Input it into the PINE script editor of TradingView, save it and add it to the chart, you can see the pulse sequence in yellow (buy) and purple (sell) on the sub-picture, corresponding to the main picture, you can subjectively judge that the quality of the trading point of the strategy is good Bad.
The second layer: "{Sextan} PINEv4 Sextans Backtest Framework". This script is the standardized trading system strategy execution and alarm, used to generate the final report of the strategy backtest and some key indicators that I have customized that I find useful, such as: winning rate , Odds, Winning Surface, Kelly Ratio, Take Profit and Stop Loss Thresholds, Trading Frequency, etc. are evaluated according to the Kelly formula. To use the second layer, first load it into the TrainingView chart, no markers will appear on the chart, since you have not specified any strategy source signals, click on the gear-shaped setting next to the "{Sextan} PINEv4 Sextans BTFW" header button, you can open the backtest settings, the first item is to select your custom strategy source. Because we have added the strategy source to the chart in the previous step, you can easily find an option "{Sextan} Your Indicator Source: Signal" at the bottom of the list, this is the strategy source input we need, select and confirm , you can see various markers on the main graph, and quickly generate a backtesting profit graph and a list of backtesting reports. You can generate files and download the backtesting reports locally. You can also click the gear on the backtest chart interface to customize some conditions of the backtest, including: initial capital amount, currency type, percentage of each order placed, amount of pyramid additions, commission fees, slippage, etc. configuration. Note: The configuration in the interface dialog overrides the same configuration implemented by the code in the backtest script.
How to output charts:
The first layer: "{Sextan} Your Indicator Source", the output of this script is the pulse value of yellow and purple, yellow +1 means buy, purple -1 means sell.
The second layer: PINEv4 Sextans Backtest Framework". The output of this script is a bit complicated. After all, it is the entire trading system with a lot of information:
1. Blue and red arrows. The blue upward arrow indicates long position, the red downward arrow indicates short position, and the horizontal bar at the end of the purple arrow indicates take profit or stop loss exit.
2. Red and green lines. This is the holding cost line of the strategy, green represents the cost of holding a long position, and red represents the cost of holding a short position. The cost line is a continuous solid line and the price action is relatively close.
3. Green and yellow long take profit and stop loss area and green and yellow long take profit and stop loss fork. Once a long position is held, there is a conditional order for take profit and stop loss. The green horizontal line is the long take profit ratio line, and the yellow is the long stop loss ratio line; the green cross indicates the long take profit price, and the yellow cross indicates the long position. Stop loss price. It's worth noting that the prongs and wires don't necessarily go together. Because of the optimization of the algorithm, for a strong market, the take profit will occur after breaking the take profit line, and the profit will not be taken until the price falls.
4. The purple and red short take profit and stop loss area and the purple red short stop loss fork. Once a short position is held, there will be a take profit and stop loss conditional order, the red is the short take profit ratio line, and the purple is the short stop loss ratio line; the red cross indicates the short take profit price, and the purple cross indicates the short stop loss price.
5. In addition to the above signs, there are also text and numbers indicating the profit and loss values of long and short positions. "L" means long; "S" means short; "XL" means close long; "XS" means close short.
TradingView Strategy Tester Panel:
The overview graph is an intuitive graph that plots the blue (gain) and red (loss) curves of all backtest periods together, and notes: the absolute value and percentage of net profit, the number of all closed positions, the winning percentage, the profit factor, The maximum trading loss, the absolute value and ratio of the average trading profit and loss, and the average number of K-lines held in all trades.
Another is the performance summary. This is to display all long and short statistical indicators of backtesting in the form of a list, such as: net profit, gross profit, Sharpe ratio, maximum position, commission, times of profit and loss, etc.
Finally, the transaction list is a table indexed by the transaction serial number, showing the signal direction, date and time, price, profit and loss, accumulated profit and loss, maximum transaction profit, transaction loss and other values.
Remarks
Finally, I will explain that this is just the beginning of this model. I will continue to optimize the trading system of the second layer. Various optimization feedback and suggestions are welcome. For valuable feedback, I am willing to provide some L4/L5 technical indicators as rewards for free subscription rights.
[Sextan] M-Oscillator BacktestLevel: 1
NOTE: This is a request by @scantor516 to backtest M-Oscillator by Mango2Juice with my Sextan framework. I ONLY take 5 minutes to perform it and how much time would you cost for this work?
Courtesy of Mango2Juice for M-Oscillator script.
You can backtest many of my indicators in minutes now! Of course,you can define your own indicator in the highlighted area in compliance with the uniform format, which guarantee when you use "Indicator on Indicator" function, it would not produce any error.
Background
Backtesting of technical indicators and strategies is the most common way to understand a quantitative strategy. However, the complicated configuration and adaptation work of backtesting many quantitative tools makes many traders who do not understand the code daunted. Moreover, although I have written a lot of strategies, I am still not very satisfied with the backtest configuration and writing efficiency. Therefore, I have been thinking about how to build a backtesting framework that can quickly and easily evaluate the backtesting performance of any indicator with a "long/short entry" indicator, that is, a "simple backtesting tool for dummies". The performance requirements should be stable, and the operation should be simple and convenient. It is best to "copy", "paste", and "a few mouse clicks" to complete the quick backtest and evaluation of a new indicator.
Luckily, I recently realized that TradingView provides an "Indicator on Indicator" feature, which is the perfect foundation for doing "hot swap" backtesting. My basic idea is to use a two-layer design. The first layer is the technical indicator signal source that needs to be embedded, which is only used to provide buy and sell signals of custom strategies; the second layer is the trading system, which is used to receive the output signals of the first layer, and filter the signals according to the agreed specifications. , Take Profit, Stop Loss, draw buy and sell signals and cost lines, define and send custom buy and sell alert messages to mobile phones, social software or trading interfaces. In general, this two-layer design is a flexible combination of "death and alive", which can meet the needs of most traders to quickly evaluate the performance of a certain technical indicator. The first layer here is flexible. Users can insert their own strategy codes according to my template, and they can draw buy and sell signals and output them to the second layer. The second layer is fixed, and the overall framework is solidified to ensure the stability and unity of the trading system. It is convenient to compare different or similar strategies under the same conditions. Finally, all trading signals are drawn on the chart, and the output strategy returns. test report.
The main function:
The first layer: "{Sextan} Your Indicator Source", the script provides a template for personalized strategy input, and the signal and definition interfaces ensure full compatibility with the second layer. Backtesting is performed stably in the backtesting framework of the layer. The first layer of this script is also relatively simple: enter your script in the highlighted custom script area, and after ensuring the final buy and sell signals long = bool condition, short = bool condition, the design of the first layer is considered complete. Input it into the PINE script editor of TradingView, save it and add it to the chart, you can see the pulse sequence in yellow (buy) and purple (sell) on the sub-picture, corresponding to the main picture, you can subjectively judge that the quality of the trading point of the strategy is good Bad.
The second layer: "{Sextan} PINEv4 Sextans Backtest Framework". This script is the standardized trading system strategy execution and alarm, used to generate the final report of the strategy backtest and some key indicators that I have customized that I find useful, such as: winning rate , Odds, Winning Surface, Kelly Ratio, Take Profit and Stop Loss Thresholds, Trading Frequency, etc. are evaluated according to the Kelly formula. To use the second layer, first load it into the TrainingView chart, no markers will appear on the chart, since you have not specified any strategy source signals, click on the gear-shaped setting next to the "{Sextan} PINEv4 Sextans BTFW" header button, you can open the backtest settings, the first item is to select your custom strategy source. Because we have added the strategy source to the chart in the previous step, you can easily find an option "{Sextan} Your Indicator Source: Signal" at the bottom of the list, this is the strategy source input we need, select and confirm , you can see various markers on the main graph, and quickly generate a backtesting profit graph and a list of backtesting reports. You can generate files and download the backtesting reports locally. You can also click the gear on the backtest chart interface to customize some conditions of the backtest, including: initial capital amount, currency type, percentage of each order placed, amount of pyramid additions, commission fees, slippage, etc. configuration. Note: The configuration in the interface dialog overrides the same configuration implemented by the code in the backtest script.
How to output charts:
The first layer: "{Sextan} Your Indicator Source", the output of this script is the pulse value of yellow and purple, yellow +1 means buy, purple -1 means sell.
The second layer: PINEv4 Sextans Backtest Framework". The output of this script is a bit complicated. After all, it is the entire trading system with a lot of information:
1. Blue and red arrows. The blue upward arrow indicates long position, the red downward arrow indicates short position, and the horizontal bar at the end of the purple arrow indicates take profit or stop loss exit.
2. Red and green lines. This is the holding cost line of the strategy, green represents the cost of holding a long position, and red represents the cost of holding a short position. The cost line is a continuous solid line and the price action is relatively close.
3. Green and yellow long take profit and stop loss area and green and yellow long take profit and stop loss fork. Once a long position is held, there is a conditional order for take profit and stop loss. The green horizontal line is the long take profit ratio line, and the yellow is the long stop loss ratio line; the green cross indicates the long take profit price, and the yellow cross indicates the long position. Stop loss price. It's worth noting that the prongs and wires don't necessarily go together. Because of the optimization of the algorithm, for a strong market, the take profit will occur after breaking the take profit line, and the profit will not be taken until the price falls.
4. The purple and red short take profit and stop loss area and the purple red short stop loss fork. Once a short position is held, there will be a take profit and stop loss conditional order, the red is the short take profit ratio line, and the purple is the short stop loss ratio line; the red cross indicates the short take profit price, and the purple cross indicates the short stop loss price.
5. In addition to the above signs, there are also text and numbers indicating the profit and loss values of long and short positions. "L" means long; "S" means short; "XL" means close long; "XS" means close short.
TradingView Strategy Tester Panel:
The overview graph is an intuitive graph that plots the blue (gain) and red (loss) curves of all backtest periods together, and notes: the absolute value and percentage of net profit, the number of all closed positions, the winning percentage, the profit factor, The maximum trading loss, the absolute value and ratio of the average trading profit and loss, and the average number of K-lines held in all trades.
Another is the performance summary. This is to display all long and short statistical indicators of backtesting in the form of a list, such as: net profit, gross profit, Sharpe ratio, maximum position, commission, times of profit and loss, etc.
Finally, the transaction list is a table indexed by the transaction serial number, showing the signal direction, date and time, price, profit and loss, accumulated profit and loss, maximum transaction profit, transaction loss and other values.
Remarks
Finally, I will explain that this is just the beginning of this model. I will continue to optimize the trading system of the second layer. Various optimization feedback and suggestions are welcome. For valuable feedback, I am willing to provide some L4/L5 technical indicators as rewards for free subscription rights.
TASC 2022.02 Ehlers' Elegant Oscillator█ OVERVIEW
TASC's February 2022 edition of Traders' Tips includes the "Inverse Fisher Transform Redux — An Elegant Oscillator" article authored by John Ehlers. This is the code implementing the "Elegant Oscillator" from the article.
█ CONCEPTS
By applying the inverse Fisher transform to a waveform with a nominal Gaussian probability distribution using root mean square ( RMS ) scaling and smoothing the result, John Ehlers creates an oscillator that swings between -1 and 1.
█ CALCULATIONS
The calculation process uses the following steps:
• Compute the 2-bar difference of closing prices.
• Calculate the root mean square (RMS) of the differences.
• Scale the differences using the computed RMS.
• Apply the inverse Fisher transform to the scaled values.
• Smooth the transformed data with the SuperSmoother filter.
Join TradingView!
tickerTracker MFI OscillatorDid you ever want to have a neat indicator window in line with your chart showing a different ticker? tickerTracker is a Money Flow Index (MFI) oscillator. The Money Flow Index (MFI) is a technical oscillator that uses price and volume for identifying overbought or oversold conditions in an asset. More or less, everything is connected in the market. The tickerTracker lets you see what is happening with another ticker that you have connected a correlation between them. For my example here, I'm using COIN in the main chart with the tickerTracker displaying BTC, QQQ and COIN Money Flow Index (MFI) in its window. As the end user, you can customize the colors, the length input and the ticker. Like any other indicator, the shorter length input, the more quickly responsive and the longer the length input, the smoother curve print.
Default Values:
MFI Length = 13
Chart ticker = white
SPY = white
QQQ = blue
IWM = yellow
DIA = orange
BTC/USD = yellow
ETH/USD = green
SOL/USD = purple
ADA/USD = red
Do your own due diligence, your risk is 100% your responsibility. This is for educational and entertainment purposes only. You win some or you learn some. Consider being charitable with some of your profit to help humankind. Good luck and happy trading friends...
*3x lucky 7s of trading*
7pt Trading compass:
Price action, entry/exit
Volume average/direction
Trend, patterns, momentum
Newsworthy current events
Revenue
Earnings
Balance sheet
7 Common mistakes:
+5% portfolio trades, capital risk management
Beware of analyst's motives
Emotions & Opinions
FOMO : bad timing, the market is ruthless, be shrewd
Lack of planning & discipline
Forgetting restraint
Obdurate repetitive errors, no adaptation
7 Important tools:
Trading View app!, Brokerage UI
Accurate indicators & settings
Wide screen monitor/s
Trading log (pencil & graph paper)
Big, organized desk
Reading books, playing chess
Sorted watch-list
Checkout my indicators:
Fibonacci VIP - volume
Fibonacci MA7 - price
pi RSI - trend momentum
TTC - trend channel
AlertiT - notification
tickerTracker - MFI Oscillator
www.tradingview.com
MA-cédésma [ema - ssb ]
presque la meme chose que un MACD sauf qu'on s'appuie sur des niveaux
Pas mal puissant quand on à la puissance de calcul derrière
Dominator Plus- Darshan HirparaThis script Tells you about the nature of the stock in multi time frame which you can modify in the settings.
Use this at your own comfort.
S&P500 VIX Volatility Warning IndicatorToday I am sharing with the community a volatility indicator that can help you or your algorithms avoid black swan events. Variance is most commonly used in statistics to derive standard deviation (with its square root). It does have another practical application, and that is to identify outliers in a sample of data. Variance in statistics is defined as the squared difference between a value and its mean. Calculating that squared difference means that the farther away the value is from the mean, the more the variance will grow (exponentially). This exponential difference makes outliers in the variance data more apparent.
Why does this matter?
There are assets or indices that exist in the stock market that might make us adjust our trading strategy if they are behaving in an unusual way. In some instances, we can use variance to identify that behavior and inform our strategy.
Is that really possible?
Let’s look at the relationship between VIX and the S&P500 as an example. If you trade an S&P500 index with a mean reversion strategy or algorithm, you know that they typically do best in times of volatility. These strategies essentially attempt to “call bottom” on a pullback. Their downside is that sometimes a pullback turns into a regime change, or a black swan event. The other downside is that there is no logical tight stop that actually increases their performance, so when they lose they tend to lose big.
So that begs the question, how might one quantitatively identify if this dip could turn into a regime change or black swan event?
The CBOE Volatility Index (VIX) uses options data to identify, on a large scale, what investors overall expect the market to do in the near future. The Volatility Index spikes in times of uncertainty and when investors expect the market to go down. However, during a black swan event, the VIX spikes a lot harder. We can use variance here to identify if a spike in the VIX exceeds our threshold for a normal market pullback, and potentially avoid entering trades for a period of time (I.e. maybe we don’t buy that dip).
Does this actually work?
In backtesting, this cut the drawdown of my index reversion strategies in half. It also cuts out some good trades (because high investor fear isn’t always indicative of a regime change or black swan event). But, I’ll happily lose out on some good trades in exchange for half the drawdown. Lets look at some examples of periods of time that trades could have been avoided using this strategy/indicator:
Example 1 – With the Volatility Warning Indicator, the mean reversion strategy could have avoided repeatedly buying this pullback that led to SPXL losing over 75% of its value:
Example 2 - June 2018 to June 2019 - With the Volatility Warning Indicator, the drawdown during this period reduces from 22% to 11%, and the overall returns increase from -8% to +3%
How do you use this indicator?
This indicator determines the variance of the VIX against a long term mean. If the variance of the VIX spikes over an input threshold, the indicator goes up. The indicator will remain up for a defined period of bars/time after the variance returns below the threshold. I have included default values I’ve found to be significant for a short-term mean-reversion strategy, but your inputs might depend on your risk tolerance and strategy time-horizon. The default values are for 1hr VIX data. It will pull in variance data for the VIX regardless of which chart the indicator is applied to.
Disclaimer : Open-source scripts I publish in the community are largely meant to spark ideas or be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
+ Magic Carpet BandsFun name for an indicator, eh? Well, it is true, I think; they look like magic carpets. They're actually pretty simple actually. They're Keltner Channels smoothed with a moving average. If you go down to the lookback period for the bands and set it to 1, you'll recognize them immediately.
Digging a bit deeper you see there are four magic carpets on the chart. The inner ones are set to a multiplier of 2, and the outer to a multiplier of 4. Each "carpet" is composed of two smoothed upper or lower Keltner Channels bounds, both with an optional offset, one of which is set to 13, and the other to 0 by default; and an optional color fill between these. There is also a color fill between the outer and inner carpets which gives them an interesting 3-dimensional aspect at times. They can look a bit like tunnels by default.
My thinking around the idea of using an offset with the bands is that if we assume these things to provide a dynamic support and resistance, and previous support and resistance maintains status as support and resistance until proven otherwise, then by putting an offset to past data we are creating a more obvious visual indication of that support or resistance in the present. The default offset is set to 13 bars back, so if price found resistance at some point around 13 bars ago, and price is currently revisiting it we assume it is still resistance, and that offset band is there to give us a strong visual aid. Obviously it's not foolproof, but nothing is.
Beyond that most interesting part of the indicator you have a nice selection of moving averages which the bands are calculated off of. By default it's set to my UMA. The bands themselves also have a selection of moving averages for how the keltner channels are smoothed. And a note: because the UMA and RDMA are averages of different length MAs, they can not be adjusted other than via the multiplier that sets the distance from the moving average.
The indicator is multi-timeframe, and the moving average can be colored based on a higher timeframe as well.
I popped in the divergence indicator here too. You can choose from RSI and OBV, and the divergences will be plotted on the chart. Working on finding a way to be able to have the bands/MA set to a higher timeframe while plotting the divergences on the chart timeframe, but don't have an answer to that yet.
Alerts for moving average crosses, band touches, and divergences.
I like this one a lot. Enjoy!
Pictures below.
s3.tradingview.com
One interesting thing about this indicator is that band twists often occur at areas of support or resistance. Simply drawing horizontal lines from previous twisted points can provide places from which you may look for strength or weakness to enter into a trade, or which you might use as targets for taking profits. The vertical lines are just showing the point on the chart when the cross occurred.
s3.tradingview.com
Above is a Jurik MA with a bunch of adjustments made to the bands, and the moving average itself. Everything is super adjustable, so you can play around and have fun with them quite a bit.
s3.tradingview.com
Just a different MA and bands.
s3.tradingview.com
[GB]Commodity Futures MapPuts numerous commodity futures on the same scale. The main function is RSI (without evoking "oversold/bought" concepts).
Reading the chart: Much like any oscillator, the important elements are:
Position relative to the middle
Slope
Momentum
Volatility
Settings:
RSI length
EMA smoothing
Time Frame (of the indicator, not the chart(
May add value when asking questions like:
Is lumber trending?
Is silver trending faster than gold?
Is the entire asset class trending up down or not at all?
Adding additional symbols is easy since the code for each symbol is identical.
MACD for Elliot waves from JacobSchiffИзменено стандартные SMA на Vwma (volume weighted moving average). Иземенено стандартные значение на более подходяший вариант нынешнему рынку путём опыта и иследование
Co-Relation by OnurThis indicator can statistically compare ANY asset in Tradingview with the asset in the active chart. It helps to understand positive or negative corelation btw 2 assets with percentage. Indicator value oscillates btw +100 and -100. If value is close to +100, there is a positive co-relation and if value is close to -100, there is a negative co-relation.
Indicator has 2 variables:
Symbol: The symbol (BTCUSDT by Default) that you'd like to compare with chart.
Period: Is the number of backward candles (200 by Default) for indicator co-relation calculation.
You can increase Period value to understand a long term relationship btw 2 assets.