Time Cycles IndicatorThis script is used to analyze the seasonality of any asset (commodities, stocks, indices).
To use the script select a timeframe D or W and select the months you are interested in the script settings. You will see all the candles that are part of those months highlighted in the chart.
You can use this script to understand if assets have a cyclical behavior in certain months of the year.
Trading
SEC-Combined Indicator with EMA LinesTitle: Combined Indicator with EMA Lines
Description:
The Combined Indicator with EMA Lines is a technical analysis tool that combines multiple indicators to provide insights into the market's strength and potential buying or selling opportunities. It incorporates the Relative Strength Index (RSI), Exponential Moving Average (EMA) lines, and the trend over the past three days to generate signals.
The indicator calculates a combined data value by assigning weights to the RSI, EMA, and past trend. The RSI measures the strength of price movements, while the EMA lines provide an indication of the average price over a specific period. The past trend considers the price behavior over the last three days. By combining these factors, the indicator offers a comprehensive view of market conditions.
Buy and sell signals are generated based on the change in the combined data. A buy signal occurs when there is an increase in the combined data above a specified threshold, indicating a potential buying opportunity. Conversely, a sell signal is triggered when there is a decrease in the combined data below a specified threshold, suggesting a potential selling opportunity.
The indicator also plots the EMA lines, which include the EMA High, EMA Average, and EMA Low. These lines provide additional visual cues about the price trend and potential support and resistance levels.
Traders can use the Combined Indicator with EMA Lines to identify potential entry and exit points in the market. It helps in capturing trends, evaluating price strength, and making informed trading decisions. The buy and sell signals, along with the EMA lines, aid in spotting potential reversals, confirming trends, and managing risk.
It's important to note that this indicator should be used in conjunction with other analysis techniques and risk management strategies. Traders should consider combining it with additional indicators, chart patterns, and fundamental analysis to enhance their trading decisions.
Remember to backtest and validate the indicator's performance using historical data before using it in real-time trading. Adjust the input parameters, such as RSI period, EMA period, and threshold values, to suit your trading style and market conditions.
kyle algo v1
Integration of multiple technical indicators: The strategy mainly combines two technical indicators - Keltner Channels and Supertrend, to generate trading signals. It also calculates fifteen exponential moving averages (EMAs) for the high price with different periods ranging from 9 to 51.
Unique combination of indicators: The traditional Supertrend typically uses Average True Range (ATR) to calculate its upper and lower bands. In contrast, this script modifies the approach to use Keltner Channels instead.
Flexible sensitivity adjustment: This strategy provides a "sensitivity" input parameter for users to adjust, which controls the multiplier for the range in the Supertrend calculation. This can make the signals more or less sensitive to price changes, allowing users to tailor the strategy to their own risk tolerance and trading style.
EMA Energy Representation: The code offers a visualization of "EMA Energy", which color-codes the EMA lines based on whether the closing price is above or below the EMA line. This can provide an intuitive understanding of market trends.
Clear visual signals: The strategy generates clear "BUY" and "SELL" signals, represented as labels on the chart. This makes it easy to identify potential entry and exit points in the market.
Customizable: The script provides several user inputs, making it possible to fine-tune the strategy according to different market conditions and individual trading preferences.
EMA (Exponential Moving Average) Principle:
The EMA is a type of moving average that assigns more weight to the most recent data.
It responds more quickly to recent price changes and is used to capture short-term price trends.
Principle of Color Change :
In this trading strategy, the color of the EMA line changes based on whether the closing price is above or below the EMA. If the closing price is above the EMA, the EMA line turns green,
indicating an upward price trend. Conversely, if the closing price is below the EMA, the EMA line turns red,
indicating a downward price trend. These color changes help traders to more intuitively identify price trends
In short, our team provides a lot of practical space
That is your development space
Binary Option Strategy Tester with Martingale-Basic V.2In Binary options, strategy testing is a bit different. The strategy result depends upon expiry intervals and payout ratio.
My previous script was a try to resolve this but has some bugs in specific choices. The new version overcame those and added some new features useful for binary option strategy testing.
Assumption:
We are opening position at next candle after signal come
Chart interval is option expiry time.
We are taking the position at opening price
Our call will be profitable if we get a green candle and put will be profitable if we get a red candle
We can open only one trade at a time. So if we are in trade, subsequent signals will be ignored.
All Input Options:
Test Call/Put individually or both. Default BOTH
Select up to 5 Martingale levels. Default 2
Type of Martingale Trade. Default “SAME”
“SAME”: If you are trading CALL and incur a loss, you are taking CALL in subsequent Martingale levels.
“OPSITE”: if you are trading CALL and incur a loss, you are taking PUT in subsequent Martingale levels.
“FOLLOW CANDLE COLOR”: You are following candle color in Martingale levels, i.e if the loss candle is RED, you are taking PUT in subsequent candles.
“OPPOSITE CANDLE COLOR”: You are taking opposite candle color trade, i.e if the loss candle is RED, you are taking CALL in subsequent candle.
Select Specific Trading Session. Please select “USE SPECIFIC SESSION”. Default: TRUE
Put the investment amount per option. Default: 10
Payout ratio. Default: 80%
The strategy is taken from Vdub Binary Options SniperVX v1 (by @vdubus). I have deleted extra parts and kept only the necessary parts.
Result Table
Signal and Win Levels:
Signal and Loss:
Please note that Binary options trading is very risky. You must be aware of the risk and be willing to accept them in order to invest in binary options. Only invest what you can afford to lose. The past performance of any trading system, strategy, or methodology is not necessarily indicative of future results.
QFL Screener [ ZCrypto ]The QFL Screener is a robust tool inspired by Quickfingersluc's trading strategy.
Known as the Base Strategy or Mean Reversals, QFL focuses on identifying moments of panic selling and buying , presenting opportunities to enter trades at deeply discounted prices.
The QFL Screener is designed to enhance your trading efficiency by simultaneously scanning 40 symbols.
You have the flexibility to enable or disable specific symbols from the screening process, allowing you to tailor the screener to your preferred markets and instruments.
The Screener has a built-in alerts system . As soon as the QFL conditions align for any of the scanned symbols, you'll receive instant notifications, empowering you to take prompt action and seize potential trading opportunities.
In addition, I've incorporated a visual element to complement the alerts. Once the conditions are true, a green arrow shape will appear directly on the chart, providing a clear and intuitive signal of the QFL opportunity.
To provide a clear overview, our screener presents a comprehensive table that highlights when the QFL condition becomes true for each symbol. This table acts as a visual guide, enabling you to monitor the status of multiple symbols at a glance, streamlining your trading decision-making process.
With the QFL Screener, you gain an edge in identifying profitable trade setups based on Quickfingersluc's renowned approach. Experience the convenience of simultaneous screening, real-time alerts, and an intuitive table display, all in one user-friendly tool.
QFL Drop %This script helps Quick Fingers Luc strategy traders
The script works as follows
When a new low is formed lower than the previous one, the script calculates the percentage difference between them and stores it in an array
and calculates the average of the stored percentages, the maximum percentage, the minimum percentage
and displays them on the chart, this helps the trader to determine where the drop could go after the bottom is broken.
D-BoT Alpha Volume SpikeHello traders, Let me explain the code and provide an example of how to trade using this indicator.
The code you provided is a Pine Script indicator that combines multiple technical indicators, such as Supertrend, ADX, RSI, and MFI, to generate buy and sell signals. Here's a breakdown of the code:
User Settings:
The user can adjust parameters like overbought_limit, oversold_limit, volume_multiplier, volume_ma_length, volume_spike_multiple, lookback_period, and use_extremities_confirmation according to their preference.
Calculate Supertrend:
The Supertrend indicator is calculated using three different ATR lengths (supertrend_atr_period1, supertrend_atr_period2, supertrend_atr_period3) and corresponding factors (supertrend_factor1, supertrend_factor2, supertrend_factor3).
The supertrend_value1, supertrend_value2, and supertrend_value3 represent the Supertrend values, while trend_direction1, trend_direction2, and trend_direction3 indicate the trend direction (negative for downtrend, positive for uptrend).
Candle calculations:
The high and low values are checked to identify bullish and bearish candles based on specific conditions.
Volume Spikes:
Volume spikes are detected by comparing the current volume with a median volume over a specified lookback period.
If the volume exceeds a certain multiple of the median volume and the DI+ value is greater than the DI- value, an "up" signal is generated. Similarly, if the DI- value is greater than the DI+ value, a "down" signal is generated.
Additional Filters (RSI and MFI):
Relative Strength Index (RSI) and Money Flow Index (MFI) are used as additional filters.
The RSI and MFI parameters can be adjusted according to the user's preference.
The signals generated by the volume spikes are filtered based on RSI and MFI conditions.
Plotting:
The indicator plots shapes (triangles) to represent buy and sell signals.
The Supertrend lines are plotted using different colors and transparency levels based on the distance from the current price.
The "bodyMiddle" plot is used for filling the area between the Supertrend lines.
Example Trade Scenario:
Let's consider an example trade scenario using this indicator:
When the indicator generates an "up" signal (trendBuy = true), indicating a potential bullish trend, and all the confirmation conditions (RSI, MFI, Supertrend) are met, you can consider opening a long position.
Conversely, when the indicator generates a "down" signal (trendSell = true), indicating a potential bearish trend, and all the confirmation conditions are met, you can consider opening a short position.
Remember, this is just an example, and it's crucial to perform thorough analysis and consider other factors before making trading decisions. It's recommended to backtest the strategy, assess risk management, and apply appropriate position sizing techniques.
Please note that the code provided is a simplified version, and there might be additional factors and considerations specific to your trading strategy that are not included in this code. *******"I have also reviewed the following indicators, and the volume calculation approaches of my friends have been very helpful in creating this indicator: "Volume Spikes " © tradeforopp and "Volume Spikes & Growing Volume Signals With Alerts & Scanner" © FriendOfTheTrend."*******
Crypto Index Percentage GainThis script calculates the percentage gain from the left-most visible candle for multiple cryptocurrency symbols and plots all of them on the chart.
Description:
The "Crypto Index Percentage Gain" indicator calculates the percentage gain from the left-most visible candle for a selection of cryptocurrency symbols. It utilizes the PineCoders VisibleChart library to access the high, low, close, and open prices of the visible chart range.
The user can customize the symbols to include in the calculation by enabling or disabling the corresponding input options. `_open` represents the open price, `_close` represents the close price, and `_gain` represents the calculated percentage gain. The formula used is (close - open) / open * 100 to calculate the percentage change between the open and close prices.
The calculated percentage gains for each symbol are plotted on the chart using different colors and line widths, providing an overview of the relative performance of the symbols.
Usage:
Add the "Crypto Index Percentage Gain" indicator to your trading view chart by searching it in indicator search bar or star it , it will show on your favourite indicators .
Configure the symbols and visibility options using the input parameters.
The indicator will calculate and display the percentage gain for each selected symbol based on the left-most visible candle on the chart.
Code Explanation:
The script imports the PineCoders VisibleChart library for accessing the visible chart range.
It defines a function `f_pcr()` to calculate the percentage gain for a given symbol.
Input options are provided to enable or disable symbols and set their visibility.
Symbols are defined using `input.symbol()` and the percentage gains are calculated using `request.security()`.
The calculated percentage gains for each symbol are plotted on the chart using different colors and line widths.
thanks to @PineCoders for VisibleChart library.
52 Week High/Low FibonacciThe primary purpose of this indicator is to calculate and plot the 52-week high and low prices along with the Fibonacci retracement levels on the price chart. Fibonacci levels are commonly used in trading to identify potential support, resistance, and price reversal points.
First, the script initializes the Fibonacci levels and their corresponding colors, which will be used to plot the levels on the chart. Next, it calculates the 52-week high and low prices by finding the highest and lowest prices over the last 252 trading days, approximately equivalent to one year. Then, it identifies the overall trend direction by comparing the number of bars since the highest high and the lowest low. If the highest high is more recent, the trend is considered downwards; if the lowest low is more recent, the trend is upwards.
The script then plots the Fibonacci retracement levels on the chart, using horizontal lines at the respective price levels. It also creates labels for each level, displaying the percentage and the price value. Additionally, it draws a line connecting the 52-week high and low prices, providing a visual representation of the price range during the 52-week period.
Pros of this indicator include:
-Automatic calculation and plotting of Fibonacci levels, saving time for traders
-Clear trend identification based on 52-week high and low prices
-Visually appealing and easy-to-read chart representation with color-coded levels
-Provides insight into potential price reversal areas based on widely used Fibonacci levels
Cons of this indicator include:
-Only works on daily timeframes, limiting its usefulness for intraday and weekly traders
-Assumes that the trend will continue in the same direction, which may not always be accurate in real-world markets
-Does not provide explicit buy or sell signals, leaving the trading decision-making process up to the trader
-Solely relies on Fibonacci levels, which may not always be accurate; it is recommended to use other technical indicators or strategies alongside this indicator for a comprehensive trading approach
In conclusion, the '52 Week High Low Fibonacci' indicator is a valuable tool for traders interested in using Fibonacci levels for identifying potential price reversal points. By automatically calculating and plotting these levels based on 52-week high and low prices, the indicator provides a clear, color-coded visual aid, which can be especially helpful for traders who base their strategies on these levels.
However, it's worth noting that this indicator is limited to daily timeframes and doesn't provide explicit buy or sell signals, requiring traders to incorporate their own analysis and judgement in their decision-making process. The indicator also operates on the assumption of trend continuation, which may not always hold true.
While it's a beneficial tool, relying solely on this indicator for trading decisions may not be advisable. It's best used in conjunction with other indicators and trading strategies, providing a more balanced and comprehensive approach to trading in the financial markets. As always, risk management should be a key part of any trading strategy.
**YOUR INSIGHTFUL FEEDBACK OR SUGGESTIONS FOR REVISIONS TO THIS CODE ARE HIGHLY APPRECIATED. PLEASE FEEL FREE TO SHARE YOUR THOUGHTS TO FOSTER ITS CONTINUAL IMPROVEMENT**
Boftei's StrategyI wrote this strategy about a year ago, but decided to publish it just now. I have not been able to implement this strategy in the market. If you can, then I will be happy for you.
This strategy is based on my "Botvenko Script". (It finds the difference between the logarithms of closing prices from different days.) (Check this script in my profile)
Then the strategy makes trades when the "Botvenko Script" indicator crosses the levels set earlier and manually selected for each currency pair/shares: long/short opening/closing levels, long/short re-entry levels. (They are drawn with horizontal dotted lines.) The names of these lines are: buy/sell level, long/short retry - too low/high, long close up/down, dead - close the short. Manual selection of each of the parameters provides a qualitative entry of the strategy into the deal. However, without restraining mechanisms, the strategy enters into rather controversial deals. In order to avoid going long/short during bear/bull markets, which is unacceptable, I added a fan of EMA lines.
The fan consists of several EMA lines, which are set according to Fibonacci numbers (21, 55, 89, 144). If the lines in the fan are arranged in ascending order (ema_21>ema_55 and ema_55>ema_89 and ema_89>ema_144), then this indicates a bull market, during which I banned shorting. And vice versa: during the bear market (ema_21<ema_55 and ema_55<ema_89 and ema_89<ema_144) I banned long trading. If these two inequalities are not met, then this indicates that the market is flat, and during it it is allowed to enter any transactions, because a flat is a good moment to catch massive movements in the future by entering a transaction. (This is all visualized using semi-transparent thick lines of green, yellow and red colors.)
By default, all parameters are adjusted for the btc/usd (bitstamp) pair. Best of all, the strategy shows itself if 1 candle = 1 day.
At the time of writing, on the pair btcusd (bitstamp) (1d) with pyramiding = 1, the strategy shows a profit of 64728896%. If pyramiding is increased by 1, then the profit will be greater, but I still prefer pyramiding = 1.
There is a possibility that my strategy is doing complete nonsense. I don't vouch for her.
If you select parameters for other pairs of currencies/stocks, then you should not change anything in the fan of lines.
That's all, probably.
Seasonality Chart [LuxAlgo]The Seasonality Chart script displays seasonal variations of price changes that are best used on the daily timeframe. Users have the option to select the calculation lookback (in years) as well as show the cumulative sum of the seasonal indexes.
🔶 SETTINGS
Lookback (Years): Number of years to use for the calculation of the seasonality chart.
Cumulative Sum: Displays the cumulative sum of seasonal indexes.
Use Percent Change: Uses relative price changes (as a percentage) instead of absolute changes.
Linear Regression: Fits a line on the seasonality chart results using the method of least squares.
🔶 USAGE
Seasonality refers to the recurrent tendencies in a time series to increase or decrease at specific times of the year. The proposed tool can highlight the seasonal variation of price changes.
It is common for certain analysts to use a cumulative sum of these indexes to display the results, highlighting months with the most significant bullish/bearish progressions.
The above chart allows us to highlight which months prices tended to have their worst performances over the selected number of years.
🔹 Note
Daily price changes are required for the construction of the seasonal chart. Thus, charts using a low timeframe might lack data compared to higher ones. We recommend using the daily timeframe for the best user experience.
🔶 DETAILS
To construct our seasonal chart, we obtain the average price changes for specific days on a specific month over a user-set number of years from January to December. These individual averages form "seasonal indexes."
This is a common method in classical time series decomposition.
Example:
To obtain the seasonal index of price changes on January first we record every price change occuring on January first over the years of interest, we then average the result.
This operation is done for all days in each month to construct our seasonal chart.
Seasonal variations are often highlighted if the underlying time series is affected by seasonal factors. For market prices, it is difficult to assess if there are stable seasonal variations on all securities.
The consideration of seasonality by market practitioners has often been highlighted through strategies or observations. One of the most common is expressed by the adage "Sell in May and Go Away" for the US market. We can also mention:
January Effect
Santa Claus Rally
Mark Twain Effect
...etc.
These are commonly known as calendar effects and appear from the study of seasonal variations over certain years.
Auto anchored VWAP Highest/Lowest Last 'n' bars The VWAP (Volume Weighted Average Price) indicator is used to calculate the average price weighted by volume. This indicator is designed to automatically draw VWAPs from the highest and lowest points of the last 'n' bars.
It utilizes arrays to calculate the values of VWAP and plot it on the chart on the last historical bar. This version was coded to get a similar version to the official "VWAP Auto anchored" with the highest/lowest selected settings.
To use VWAP, traders can look for price movements relative to the VWAP line to identify potential support or resistance levels. It can also be used in conjunction with other technical indicators to develop trading strategies.
Seasonal pivot datesPlots approximate equinox and solstice dates, which are often zones around which market pivots occur.
Multi indicators tableThis is a comprehensive trading tool that presents an overview of the market in a tabular format. It consists of five distinct categories of trading indicators : Volatility, Trend, Momentum, Reversal, and Volume. Each category includes a series of indicators that are widely used in the trading communauty.
The Volatility category includes the Average True Range (ATR) and Bollinger Bands indicators. The Trend category comprises the Average Directional Index (ADX), four Exponential Moving Averages (EMAs), Aroon, Parabolic SAR, and the Supertrend. The Momentum category includes the Stochastic Relative Strength Index (StochRSI), Money Flow Index (MFI), Williams %R, Relative Strength Index (RSI), and Commodity Channel Index (CCI). The Reversal category includes Parabolic SAR, Moving Average Convergence Divergence (MACD), and PP Supertrend. Finally, the Volume category includes the Volume Exponential Moving Average (EMA) indicator.
The indicators states are easily readable, the indicator case is colored based on his actual state. A bullish color (green by default), a bearish color (red by default),
a very bullish color (dark green by default), a very bearish color (dark red by default) and a neutral color (gray by default) displayed when the indicator doesn't give us a clear signal. Some indicators do not have a very bullish or very bearish state. Concerning volatility indicators, the bullish color indicates high volatility, the bearish color indicates low volatility, and the neutral color indicates normal volatility.
Most of the indicators displayed in the table are customizable, and traders can choose to hide the categories they don't want to use. The Indicator provides a quick and easily readable view on the market and allows traders to reduce the number of indicators on their chart making it lighter and more readable.
Renko Ichimoku CloudThis script utilizes its source from a non-repainting renko closing price. Renko charts focus solely on price movement and minimize the impacts of time and the extra noise time creates. Employing the renko close helps smooth out the Ichimoku Cloud. Insignificant price movements will not cause a change in the plotted lines of the indicator unless a new threshold is breached or a "brick" is created.
This Ichmoku Cloud includes all standard lines with standard lengths. These include:
Tenken Sen
Kiju Sen
Senkou A/B
Chikou Span
We have also included plotted marks for when there is a Tenken Sen/ Kiju Sen cross and for the Kumo cloud twist.
There are two methods for selecting the box size. Box size is critical for the overall function and efficacy of the plots you will visually see with this indicator. Box size is set automatically using the Average True Range "ATR" or manually using the "Traditional" setting. The simplest way to determine a manual box six is to take the ATR of the given instrument and round it to the nearest decimal place. As an example, if the ATR for the asset is 0.017, you would round that number to 0.02 and utilize this as your traditional box size.
ILM Seasonality Monthly - Day of Month - Tabular FormUse this indicator on Daily Timeframe
This indicator displays the seasonality data for any instrument (index/stock/ futures /currency) in a tabular data by day of the month (Day 1..31).
User can change the start of the year and month for analysis from the inputs.
Year is represented in rows and Day of the month (Day) is represented in cols.
This indicator uses Daily Data feed to calculate the % change
Summary data for Day of month is displayed at the bottom of the table
New Trading DayThis indicator creates an alert for a new trading day - as well as contains a variable that counts the number of bars that has passed since the trading day opened.
It posts the alert both on the chart and has an alert condition so it can be sent to you.
Colorful Channelwhat is "Colorful Channel"?
it is a overbought - oversold indicator.
what it does?
It fills the area between the upper band of the channel and the price line with green, the area between the lower band of the channel and the price line with red color and applies a transparency to these colors according to the distance of the price from the channel lines. thus allowing users to get an idea of ??the current value of the price.
how it does it?
subtracts the percentage of the price from the lower channel from the transparency ratio of the red color, and the percentage of the price from the upper band from the transparency ratio of the green color. thus, a different transparency value is obtained for each percentile. In addition, the transparency rate can be changed with a multiplier determined by the users.
how to use it?
In the "lenght" section, you select the number of bars that the indicator will base backwards on. For example, if length=100, the indicator determines the upper and lower bands according to the distances from the highest and lowest values ??within 100 bar. so the length part works like donchian channels.
You can change the transparency ratio of the colors in the "transp" section.
1 saat transp
yan trend
4 saat
ILM Seasonality Big Moves - TableUse this script on Daily Timeframe.
This script calculates Daily Moves ( Intraday / Close basis ) and buckets them into 1% / 2% / 3% moves
Also calculates MAX DD for the financial year from Peak to Trough
Helps in identifying volatility of the instrument and high drawdowns due to volatility
Trading range display with BoxThis script is just for reference to see the trading range.
Do not use this strategy logic, it is just Test strategy.
The trading range is colored depending on whether it is profitable or not.
You can change the color if you want.
When you declare the strategy, put (process_orders_on_close=true,calc_on_every_tick=true, max_boxes_count=500) in your script.
Then it can show you current open trading as well.
If you use switching strategy (e.g longposition to shortposition right away), it may not show you the range properly.
In that case, reduse the test period.
IT IS Repainting Reference.
If you want to see your strategy result visually,
Just copy and paste from line 22 in my script.
Good Luck everyone.
전략 거래 기간 동안을 보여주는 지표입니다.
이 지표에 쓰인 전략은 단순 테스트용 입니다. 절대 사용하지 마세요.
각 거래기간은 수익이냐 아니냐에 따라 색깔이 정해 집니다.
색깔은 여러분이 변경하실 수 있습니다.
전략을 선언부에 process_orders_on_close=true,calc_on_every_tick=true, max_boxes_count=500 을 넣으시면 현재 오픈 거래도 보실 수 있습니다.
스위칭 전략(롱에서 숏으로 바로 전환하는 전략)을 쓰시는 분들은 아마 테스트 기간을 줄이라는 경고를 받으실 수 있습니다.
이 지표는 리페이팅이 될 수 있습니다.
전략 결과를 눈으로 보고 싶으신 분들은 22번째 줄 부터 카피하시면 됩니다.
행운이 있길..
---strategy set---
default_qty_value=10
commission_value=0.04
slippage=2
SpreadTrade - Auto-Cointegration (ps5)Decsription: Auto-Cointegration-Based Pair Trading Strategy (revised version)
To review, there are three popular styles of Pair trading: distance-based pair trading, correlation-based pair trading and cointegration-based pair trading. Typically, they require preliminary statistical estimation of the viability of the corresponding strategy.
Basically a pair trade strategy boils down to shorting the outperforming instrument and going long on the underperforming instrument whenever the temporary correlation weakens which means one instrument is going up and another is going down. Apart from the typical cointegration strategy which employs two cointegrated instruments, this script uses just one instrument, in base timeframe and in lagged timeframe, actually making it an auto-cointegration, or better still, an auto-correlation strategy.
Notice that each moving average function may require different Threshold settings.The orange cross symbol indicates the exit points. To filter out the signals use higher values for the LongWindow and the Threshold parameters. Also pay attention that in some cases with some moving averages the color of the signals has to be inverted.
Big Money Flow & Drift Oscillator [Spiritualhealer117]An easy way to track what big money and market makers are doing in the markets. The Big Money Flow & Drift Oscillator is best suited as a trend indicator, estimating what way the market will drift on low volume and what way it will move on large volume.
This oscillator is composed of two lines, the Big Money Flow and Drift Oscillator. The Big Money Flow line gives the average percentage return of the asset when the volume is greater than the EMA of volume, showing that big money is making moves in the market. The Drift Oscillator gives the average percentage return of the asset when the volume is less than the EMA of volume, where pricing is done by small money and market makers.
By default, between the two lines, there is a color fill, determined based on the following logic:
BMF > drift and BMF > 0: Yellow
drift > BMF and drift > 0: Beige
BMF > drift and BMF < 0: Orange
drift > BMF and drift < 0: Red
Bollinger Pair TradeNYSE:MA-1.6*NYSE:V
Revision: 1
Author: @ozdemirtrading
Revision 2 Considerations :
- Simplify and clean up plotting
Disclaimer: This strategy is currently working on the 5M chart. Change the length input to accommodate your needs.
For the backtesting of more than 3 months, you may need to upgrade your membership.
Description:
The general idea of the strategy is very straightforward: it takes positions according to the lower and upper Bollinger bands.
But I am mainly using this strategy for pair trading stocks. Do not forget that you will get better results if you trade with cointegrated pairs.
Bollinger band: Moving average & standard deviation are calculated based on 20 bars on the 1H chart (approx 240 bars on a 5m chart). X-day moving averages (20 days as default) are also used in the background in some of the exit strategy choices.
You can define position entry levels as the multipliers of standard deviation (for exp: mult2 as 2 * standard deviation).
There are 4 choices for the exit strategy:
SMA: Exit when touches simple moving average (SMA)
SKP: Skip SMA and do not stop if moving towards 20D SMA, and exit if it touches the other side of the band
SKPXDSMA: Skip SMA if moving towards 20D SMA, and exit if it touches 20D SMA
NoExit: Exit if it touches the upper & lower band only.
Options:
- Strategy hard stop: if trade loss reaches a point defined as a percent of the initial capital. Stop taking new positions. (not recommended for pair trade)
- Loss per trade: close position if the loss is at a defined level but keeps watching for new positions.
- Enable expected profit for trade (expected profit is calculated as the distance to SMA) (recommended for pair trade)
- Enable VIX threshold for the following options: (recommended for volatile periods)
- Stop trading if VIX for the previous day closes above the threshold
- Reverse active trade direction if VIX for the previous day is above the threshold
- Take reverse positions (assuming the Bollinger band is going to expand) for all trades
Backtesting:
Close positions after a defined interval: mark this if you want the close the final trade for backtesting purposes. Unmark it to get live signals.
Use custom interval: Backtest specific time periods.
Other Options:
- Use EMA: use an exponential moving average for the calculations instead of simple moving average
- Not against XDSMA: do not take a position against 20D SMA (if X is selected as 20) (recommended for pairs with a clear trend)
- Not in XDSMA 1 DEV: do not take a position in 20D SMA 1*standart deviation band (recommended if you need to decrease # of trades and increase profit for trade)
- Not in XDSMA 2 DEV: do not take a position in 20D SMA 2*standart deviation band
Session management:
- Not in session: Session start and end times can be defined here. If you do not want to trade in certain time intervals, mark that session.(helps to reduce slippage and get more realistic backtest results)