Same high/low + DCA (only long)This is an update of the previous "same high/low" strategy. This strategy can be helpful for those who look for entrance price points after level retest based on the dollar cost averaging approach.
The retest of the level is defined by two candles with the same low.
4 entrance points were calculated based on volatility (not based on ATR though) and the weights were averaged in the middle of the volatility level.
As previously, stop loss is just one tick away from a level of support and take profit based on the ATR multiplier.
Trend Analysis
Combo 2/20 EMA & Accelerator Oscillator (AC) This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
The Accelerator Oscillator has been developed by Bill Williams
as the development of the Awesome Oscillator. It represents the
difference between the Awesome Oscillator and the 5-period moving
average, and as such it shows the speed of change of the Awesome
Oscillator, which can be useful to find trend reversals before the
Awesome Oscillator does.
WARNING:
- For purpose educate only
- This script to change bars colors.
Linear Channel - Scalp Strategy 15MSimple way how to use Linear Regression for trading.
What we use:
• Linear Regression
• HMA as a trend filter
Logic:
Firstly we make simple linear regression moving. It is the white line which appears on the chart.
Then we make second line (named: band2) on the chart by multiplying linreg and value difference.
The third step is to ad HMA as a trend filter.
The trade open when price is below band2, but still upper than Hullma. The trade close when price again upper than linreg.
Automated Bitcoin (BTC) Investment Strategy from Wunderbit Automated Bitcoin (BTC) Investment Strategy from Wunderbit Trading
This strategy is designed for the automated long-term investment in Bitcoin. The BTC investment strategy is primarily suitable for long-term investors who want to increase the percentage of their investments through timely trading long-term transactions. The main feature is the difference from the indicator of long-term investment. Based on their statistics, this figure is 2 times less. That is, if we just bought Bitcoin and held it, we would receive 2 times less than if we applied the BTC Investment strategy.
This strategy uses the intersection of the triple exponential moving average and the least squares moving average. We also control the profit you will make during an uptrend by implementing a trailing stop based on the ATR indicator.
This is a spot market-only strategy and can be used primarily for long-term investors. The strategy is designed to create an automatic version of investing using a webhook.
Automation allows you to safely ignore the state of your portfolio and exclude emotions.
In order to create a cryptocurrency bot for this strategy, you need to:
1. Create alerts and link the URL to the webhook.
2. Connect the TradingView strategy with automated trading service.
Same high/low updateHere I made a strategy out of my indicator. So, the trigger is double low/high on 1 week candle chart.
Entrance: close of the next candle if it's low/high higher/lower than previous one. (in most cases it's precise for backtesting)
Stop loss: long:low-one tick, short:high+one tick
Take profit: ATR*Multiplier (you can tune it in properties)
Same high/lowIf you are using support/resistance level-based strategies in your trading then this indicator can help you. I think that the retest level strategy is the best for beginners due to its simplicity of risk/reward calculations and higher abundance on the market. There is a well-known method to recognize a big player (buyer/seller) by candlestick pattern where the last two candles have the same low or same high. Moreover, abnormal candles increase the probability of a retest of a strong level, so my indicator highlights these two situations. In my opinion, a higher timeframe of a candle chart increases the win rate for this indicator (>1h).
So there are several patterns which my indicator can recognize:
1. Same low/high: blue flag up - same low, blue flag down - same high.
2. Mirror levels: high-low - green flag up, low-high - green flag down.
3. abnormal candles: yellow body if >2*ATR (please tune atr in properties, the default value is 5).
4. The red flag indicates the third candle with the same high/low in a row.
Thanks for your attention and have a good trading time!
robotrading body-limitThis is a very simple and universal strategy. Good for crypto. For BTC/USD, shitcoin/BTC .
Strategy
Long positions only. If the candle is falling and the candle body is 3 or more times the average candle body, then open a long position by limit order.
If the candle is rising, we should close a long position.
Short positions are not used.
This is a counter-trend strategy.
The average body of a candlestick is the arithmetic average of the bodies of the previous 100 bodies.
Parameters
The multiplier is the number of times the candlestick body should be bigger than the average candlestick body to get a signal to open a long position.
Recommended
- A timeframe of 4 hours to 1 day
- Cryptocurrencies with large market capitalization
- you can use coin/USD, coin/USDT, coin/BTC , coin/ETH, etc
Pairs Trading (basic OLS regression)Pairs trading using hedge ratio.
Firstly, it calculates hedge ration using OLS linear regression.
Then it calculates spread and z-score of spread.
if spread in specific range (which it's possible to change in settings) it makes Long/Short orders.
The very basic script.
Combo 2/20 EMA & Absolute Price Oscillator (APO) This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
The Absolute Price Oscillator displays the difference between two exponential
moving averages of a security's price and is expressed as an absolute value.
How this indicator works
APO crossing above zero is considered bullish, while crossing below zero is bearish.
A positive indicator value indicates an upward movement, while negative readings
signal a downward trend.
Divergences form when a new high or low in price is not confirmed by the Absolute Price
Oscillator (APO). A bullish divergence forms when price make a lower low, but the APO
forms a higher low. This indicates less downward momentum that could foreshadow a bullish
reversal. A bearish divergence forms when price makes a higher high, but the APO forms a
lower high. This shows less upward momentum that could foreshadow a bearish reversal.
WARNING:
- For purpose educate only
- This script to change bars colors.
Donchian Channel Strategy IdeaThis strategy idea is a variation of the "Donchian Channel" trading strategy. It is built with a highest-high band, a lowest-low band, and a baseline which is average the highest-high and the lowest-low bands. This strategy is very useful in trending instruments on 1W and 1D timeframes. This is the implementation used in the QuantCT app.
You can set the operation mode to be Long/Short or long-only.
You also can set a fixed stop-loss or ignore it so that the strategy acts solely based on entry and exit signals.
Trade Idea
When the close price breaks up the previous highest-high, it is a long signal, the market is considered rising (bullish), and the plotted indicator becomes green. Long positions are held until the close price crosses under the baseline.
When the close price breaks down the previous lowest-low, it is a short signal, the market is considered falling (bearish), and the plotted indicator becomes red. Short positions are held until the close price crosses above the baseline.
Otherwise, if we have no position in the market, the market is considered ranging, and the plotted indicator becomes orange.
Entry/Exit rules
Enter LONG if the close price breaks up the previous highest-high (i.e. when the plotted indicator becomes green).
Exit LONG if the close price crosses under the baseline (i.e. when the plotted indicator becomes orange).
Enter SHORT if the close price breaks down the previous lowest-low (i.e. when the plotted indicator becomes red).
Exit SHORT if the close price crosses above the baseline (i.e. when the plotted indicator becomes orange).
CAUTION
It's just a bare trading idea - a profitable one. However, you can enhance this idea and turn it into a full trading strategy with enhanced risk/money management and optimizing it, and you ABSOLUTELY should do this!
DON'T insist on using Long/Short mode on all instruments! This strategy performs much better in Long-Only mode on many (NOT All) trending instruments (Like BTC, ETH, etc.).
BTC 30m ScriptWhat are your thoughts on this script? I connected it to Coinbase Pro via AWS lambda for auto-trading. I'm waiting for BTC to start bullish again before turning it on in production. Thoughts? Thank you! John
Jigga - Survival LevelHi All !!
Its always the case that we buy a stock and it starts falling !! What a new investor will do is to add few more on downfall and then few more until they stuck all their case to same falling stock.
I thought to create a level which can help long term investor on when to buy and sell.
Logic:
I have used multiple indicators logic all into one and find out when majority of them are showing positive sign.
Green /Red line will be shown when majority are in positive / negative territory.
Buy and sell signal will be generated based on this line only.
Note:
Use this on Weekly chart on good fundamental stock for long term investment.
Bollinger Bands Strategy with StopLossThis is the default Bollinger Bands Strategy with a small change to support Stop Loss.
The default built-int BBS does not support Stop Loss and using it may cause large losses, specially in margin trading.
Added inputs:
Source
Stop Loss Percentage
Logistic strategyThis strategy is loosely based on the logistic function. This function is often used to model population growth. I used it here to model price change using the z-score of net volume as the parameter to the exponential function.
Ultimate Ichimoku Cloud StrategyThe goal of this strategy script is to provide the ultimate experience to anyone interested in the Ichimoku Kinkō Hyō (Ichimoku Cloud). The script is designed to be highly customizable and allows the user to set a custom trade date range and select any combination of inputs and conditions that satisfy their goals. Additionally, the script allows the user to visually see any combination of their set conditions by clicking the " Show Conditions Visually " checkbox. Doing so will color the background in a different color where the conditions align. Finally, a simple Stop/Take profit is added for those that wish to exit based on percentages over Ichimoku conditions.
As always, please let me know if there are any bugs, something useful that could be added or if you need some help. Leave a like if you wish!
200DMA last DOM - ajhImplements and backtests a simple 200 day moving average trend following rules based on last day of month to limits trades to 12 per year.
From the book : 5 BEST Moving Average Strategies (That beat buy and hold) by Steve Burns and Holly Burns
Click on the cog to set the input date range eg; 2000-01-01 to 2016-12-31
The book back tested SP500 returns from 2000-2016 317% using this method vs 125% buy and hold only with less drawdown.
Simple 200 day moving average test and trading on last day of month.
(you may find it trades on next available day close to end of month as not all dates can be traded weekends etc..)
Rules are ;
1. if last day of month and stock over 200 day moving average, then go long 100%
2. if last day of month and stock under 200 day moving average, then close long 100% and goto cash.
Aims to miss market declines and keep you long for upside.
Note: Have found doesn't work well in choppy markets moving sideways like the FTSE100 for same period 2000-2016 and causes losses. Also for many stocks.
ETF 3-Day Reversion StrategyIntroduction: This strategy is a modification of the “3-day Mean Reversion Strategy” from the book "High Probability ETF Trading" by Larry Connors and Cesar Alvarez. In the book, the authors discuss a high-probability ETF mean reversion strategy for a 1-day time-frame with these simple rules:
The price must be above the 200 day SMA and below the 5 day SMA.
The low of today must be lower than the low of yesterday (must be true for 3 consecutive days)
The high of today must be lower than the high of yesterday (must be true for 3 consecutive days)
If the 3 rules above are true, then buy on the close of the current day.
Exit when the closing price crosses above the 5 day SMA.
In practice and in backtesting, I’ve found that the strategy consistently works better when using an EMA for the trend-line instead of an SMA. So, this script uses an EMA for the trend-line. I’ve also made the length of the exit EMA adjustable.
How it works:
The Strategy will buy when the buy conditions above are true. The strategy will sell when the closing price crosses over the Exit Moving Average
Plots:
Green line = Exit Moving Average (Default 5 Day EMA)
Blue line = 5 Day EMA (Used as Entry Criteria)
Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas that can 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!
Pivot Point BreakoutThis is a strategy taken from Perry Kaufman's book, Trading Systems and Methods.
Just like the title says, it's a breakout strategy. It works by buying when the current high is higher than the last pivot high, and selling when the low is lower than the last pivot low.
It does not have a good success probability, and relies on the good reward to risk ratio. Definitely not recommended for someone with weak hands.
TFO + ATR Strategy with Trailing Stop LossThis strategy is an experiment to learn what happens when The Trend Flex Oscillator (by Dr. John Ehlers) is used in conjunction with a volatility indicator like ATR. It was designed with cryptocurrency trading in mind.
The way I coded this experiment makes it unsuitable for bear market conditions.
When applied to a bull market, this trend-following strategy will open long positions when oversold price action appear to be reversing. It will typically close a position within a few days unless it gets caught in a bear market, in which case it holds on for dear life. I have tried to make back-testing very simple, but you should never trust it. It's merely and interesting tool for adjusting the many parameters that I've made editable in the configuration window. Those values include the ATR and TFO parameters, as well as setting a trailing stop loss. When closing a position, the strategy can optionally be told to ignore the trend analysis and only obey the trailing stop loss value. I've made an attempt to allow the user to define the minimum profit necessary to allow the strategy to close all all positions. In my observations, the 2H candlestick charts seem to produce the best results, although the parameters of the strategy could theoretically be adjusted to suit other time periods.
In summary...
This strategy has a bias for HODL (Holds on to Losses) meaning that it provides NO STOP LOSS protection!
Also note that the default behavior is designed for up to 15 open long orders, and executes one order to close them all at once.
Opening a long position is predicated on The Trend Flex Oscillator (TFO) rising after being oversold, and ATR above a certain volatility threshold.
Closing a long is handled either by TFO showing overbought while above a certain ATR level, or the Trailing Stop Loss. Pick one or both.
If the strategy is allowed to sell before a Trailing Stop Loss is triggered, you can set a "must exceed %". Do not mistake this for a stop loss.
Short positions are not supported in this version. Back-testing should NEVER be considered an accurate representation of actual trading results.
// portions © allanster (date window code)
// portions © Dr. John Ehlers (Trend Flex Oscillator)
This code is provided for educational purposes only. The results of this strategy should not be considered investment advice.
The user of this script acknowledges that it can result in serious financial loss when used as a trading tool
Gap Absorption StrategyLike the nature, markets don't like the void, and this is something we can take advantage of by trading gaps on some markets.
This technique is well known, so I wanted to write a tiny script based on this strategy to get a bit more comfortable with it.
IMPORTANT: Default parameters wont give you good trades on every markets, you need to modify these parameters to see which proportions correspond to the stock you're trading.
This script triggers signals on predefined variation of a stock price after a gap, and allows its user to configure TP and SL prices corresponding to a specific percentage of this gap movement.
Note: We can observe that opening gaps are often the most interesting.
Options
Trigger: the price variation you want to trigger on (in % of the price)
Stop Loss : in % of the gap
Take profit : in % of the gap
A small table is displayed in the top right corner of the chart to give you TP/SL/Signal prices for each opportunity
SL (red line) and TP (green line) are also displayed on the chart when a signal is triggered
Information concerning the current opportunity is given at the bottom of the chart
Note: This script is based on the Gap-Size-Indicator that I published a few weeks ago.
PickingupFromBottom StrategyPickingupFromBottom Strategy is variation of my earlier strategy HiLoBand
This strategy uses lowest lows of 200 and ema of that with length 7. Lets call this ema200Lows line
wait for price to close below ema200Lows line
Then using camarilla pivot points , wait for camariall centerpoint (actally ema 9 of that ) crossing up the ema200Lows line.
When this condition is met background color is changed to green (visual alert)
and BUY Long is taken
Exit
When the price crosses below the Camarilla R4 line or Camarilla S3 line
Tested with SPY and QQQ on 30 mins chart.
Warning
This strategy is published for educational purposes only.
Supertrend StrategyThis Supertrend strategy will allow you to enter a long or short from a supertrend trend change. Both ATR period and ATR multiplier are adjustable. If you check off "Change ATR Calculation Method" it will base the calculation off the sma and give you slightly different results, which may work better depending on the asset. Be sure to enter slippage and commission into the properties to give you realistic results.
I've also built in backtesting date ranges and the ability to trade only within certain times of day and have it close all trades at the end of that time frame. This is especially useful for day trading stocks. If you check off "Enter First Trade ASAP" then when using the time frame option it will enter the current trade. If however you uncheck that box and instead check off "Wait To Enter First Trade" it will wait for the trend to change and then enter.
You can also specify a % based take profit and stop loss. In most cases the stop loss is not needed because of the atr based stop that supertrend provides so you could check only take profit and see if it works best to take profit or to let supertrend trend change get you out. Also keep in mind that if you have "Enter First Trade ASAP" checked off and use the stop loss and/or take profit then it will re-enter the current trend again.
Finally there's custom alert fields so you can send custom alert messages for strategy entry and exit for use with automated trading services. Simply enter your messages in the fields within the strategy properties and then put {{strategy.order.alert_message}} in your alert message body and it will dynamically pull in the appropriate message.
Heikin Ashi Candle Startegy for Long PositionThis strategy utilize Heikin-Ashi candlestick chart.
Heikin-Ashi technique is a Japanese candlestick-based technical trading tool that uses candlestick charts to represent and visualize market price data.
Heikin-Ashi candle is essentially taking an average of the movement.
There is a tendency with Heikin-Ashi for the candles to stay red during a downtrend and green during an uptrend.
This strategy only apply for long trading position.
The idea is trader will waiting 3 green candles for validation period (confirmation) before entering long position.
Different timeframe will result different result.
Number of validation period can be changed to see different result
This strategy has parameter for take profit percentage, trailing stop and stop loss.
User can set maximum active position to minimize risk and qty order.
This tool is useful for user who wants to backtest Heikin-Ashi trading strategy.
Script will emit alert when long position is opened and closed.
Warning of Backtesting
Backtesting is backward-looking. As the name implies, you are testing how something would have worked if you traded it perfectly in the past.
Past performance does not indicate future performance and you should not assume it does.
Backtesting assumes you never miss-fire, that you get in and out at the exactly perfect moment each time.
Backtesting assumes you have perfect liquidity, and your limit orders fill at a specific, pre-defined price every time (either the open, close, low, high, or some average of these).
Disclaimer
Do your own research and consider fundamental price of asset.
The indicators provided on this script is for educational purposes only.
Author does not offer advisory or brokerage services, nor does it recommend or advise users to buy or sell particular stocks or securities.
Please examined script and give feedback for further improvement.
Script are open to public, everyone see and clone source code or just apply to chart. Please make comment for improvement.