3SmmaCrossUp + Fractal + RSIThis script is a combination of 3 smoothed moving averages, and RSI. When moving averages are aligned upward (downward) and RSI is above (below) 50 and a down (up) William fractal appears, it enters long (short) position. Exiting from long and short entries are defined by StopLoss and TargetProfit.
Moving Averages
adx efi 50 ema channel, trend pullbackHi so this strategy is based off 50 ema channel and the 15 ma crossing it to generate signals. But with my adjusted strategy it's a 10 rma crossing 50 ema channels and a 5 and 9 wma to help see pullbacks. 50 period bollinger bands to gage volatility a0nd help during range markets. The strategy signals are generated when longer period efi is above 0 and shorter period efi is below zero and price has pulled back near 50 ema to buy long. And the reverse for shorts, I made this to help me trade more mechanically and to trade 1 minute time frame, that's where the strategy seems to Excell the most, I developed it on eur usd but a brief check seems like it still is profitable on gbp usd aud usd usd jpy I only trade the forex market so not sure about stocks and crypto. If you get signals I would place buy stops and sell stops above high and low of respective signal candle and let price take you into trade. Also adx 20 has to be greater than 20 to take trades. Let me know if this is helpful. I've only been coding for a month so it might look sloppy the way it's coded also there are a few other buy and sell conditions left in the source code if you want to switch between different buy and sell triggers, they all produce good results on 1 min timeframe
NSDT HAMA Candles STRATThis is a STRATEGY based on our popular HAMA Candles Indicator.
It is an "Always On" strategy, meaning it will stay in a Long position until the Short criteria shows up, and then it will close the Long position and immediately enter a Short position.
Since this is a strategy, we added a few more components. The most notable one is the grid at the top right that shows the statistics of whatever the current settings are. The user can change the MA lengths and see the potential results update in real time.
Since this is Always On and uses Moving Averages, we added an ADX setting to help filter our trades in a ranging/choppy market.
The settings will need to be adjusted to find the best fit for your instrument, chart time, and risk management plan.
action zone - ATR stop reverse order strategy v0.1 by 9nckACTION ZONE-ATR MOD v0.1 DOCUMENTATION
Overview
This tradingview pine script strategy is mainly created to enrich my coding skill. It is a combination of “CDC-ACTIONZONE” and my personal studies of trading techniques in various sources e.g.book, course or blog. This strategy purposefully built to connect with my automatic trading bot. However, It will be very useful to aid your trading routine by diminishing mental distraction which possibly leads to bad trades.
How does it work?
This strategy will do a basic simple thing that most traders do by creating entry signals on both sides long/short and also set the stop loss. Furthermore, It will also reverse the order (from long to short and vice versa (if long/short conditions are met). Finally, it will recalculate the stop loss/take profit price in every complete bar to increase the chance of winning and limit our loss.
Entry rules(Long/Short)
If you have no open order, an order will be created when a fast EMA crosses(up(long)/down(short) the slow EMA(It’s as simple as that).
If you have an open order, the current order will be (sold if long, covered if short) and the opposite side order will be created.
Exit and Reverse rules(Long/Short)
If fast EMA cross (DOWN(long), UP(short)), the current order will be closed, THE OPPOSITE SIDE ORDER WILL ALSO BE CREATED.
Risk management
FLEX STOP PRICE : initial value will be set at the bar which order created. It is a fast ema (+/-) MIDDLE ATR value.
If MIDDLE ATR value rises, it will be our new stop price.
If MIDDLE ATR value falls, stop price unchanged
If Price OVERBOUGHT(long)/SOLD(short), LOW of that bar will be a new stop price.
Minimum position hold period
In order to eliminate risk of repeatedly open, close orders in sideway trends. Minimum hold period must be passed to start exit our position. However, It always respects stop loss prices. The value refers to the number of bars.
MUST READ!!!
This strategy uses only MARKET ORDER. If you trade with a bot, make sure you choose only enormous market cap tokens.
This strategy is bi-direction strategy. It will work best in the DERIVATIVE market.
It was initially designed to compete in the cryptocurrency market which has very high volume and volatility.
I only use this strategy in 1HR (acceptable change rate, optimum trade frequency)
How (should) we use it?
Choose crypto future pairs (recommend only top 10-15 market volume pairs in Binance, let’s say 1000M+ trade value)
Choose your time frame (1H is strongly recommended)
Setup your portfolio profile (Setting->Properties) such as Initial cap, order size, commission. DO NOT USE CAL ON EVERY TICK IT WILL CAUSE REPAINTING AND YOUR CAPITAL IS BLEEDING !!!
BACKTEST FIRST!! Back test is a combination of art, math and statis(and a bit of luck). You can apply to train and test methods or whatever you are familiar with. In my opinion, your test period should include UPTREND, SIDEWAY, DOWNTREND. Fine tune fast, slow ema first(my best ema length of 1H timeframe around 7-10, 17-22). Try to eliminate fault breakout trade and use other options only necessary. Hopefully we can use automatic optimization on Pine Script soon.
Don’t forget to turn off using a specific backtest date option to start your strategy.A
THIS IS NOT A PERFECT (OR EVEN PROFITABLE) STRATEGY. USE AT YOUR OWN RISK AND TRADE RESPONSIBLY. DYOR DUDE.
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.
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
MA Bollinger Bands + RSI This script uses the standard deviation of a given moving average along with an RSI direction.
When: rsi crossover neutral line + price crossover lower deviation boundary => long
When: rsi crossunder neutral line + price crossunder upper deviation boundary => short
Up & Down Trend following trading strategy for BTC/USDT 3hThis strategy is based on multi time frame technical indicators such as;
1. RSI (10,50,100)
2. MFI (10,50,100)
3. RVI (10,50,100)
4. BOP (10,50,100)
5. Super Trend
6. SAR indicator
7. Higher highs and lower lows
8. SMA (9,500)
9. EMA (9,200)
After evaluating different parameters provided by those indicators, script is in a possition to determine optimul positions to enter in to market as well as exit from the market. In some cases stratergy will exit fully or partially depends on the situation. Other than that, this strategy is in a possition to calculate and specify the quantity you need to buy or sell depending on market situation. You can specify amount available for investment and how many times you are going to average (if downtrend). Parameters are optimised to BTC/USDT, 3h standerd candlestic chart.
goodluck
5min Williams Fractals scalping (3commas)Another strategy I'm learning Pine Script on. It is inspired by a MoneyZG youtube strategy called "Easy 5 Minute Scalping Strategy (Simple to Follow Scalping Trading Strategy)".
Again this is a one order per trade strategy compatible with the 3commas bot (works also with the free 3commas subscription). This strategy is based on the signals from Williams Fractals, taking the signals in reverse - red triangle indicates a bottom and hence we go long. The green triangle indicates a top so we go short. By default these signals are only accepted if they occur between the two Emas. However, you can also turn this off and when a WF signal comes in, only the current price has to be between the Emas. Stop loss is set to the current Ema slow and the take profit is a multiple of the distance to the slow ema.
Like previously I have added different filters as well as the ability to view essential things like the WF signal and Emas. I hope the script will help you to be more successful and if so it would be great if you could share here your setups, or tips on what would be good to refine to make it an even a more profitable strategy. Kind of a community approach so that we help each other out :).
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest.
6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
In the near future I would like to publish more scripts that will carry similar elements as the first two, incl. compatibility with 3commas (I don't have access to another bot system). I will choose some strategies myself, but I will also be glad for some tips on what strategy would be good to do and is still missing here on Tradingview (short youtube videos or brief strategy manuals would be great).
Thanks and keep it up
PS: My screen values starting at Long Target Profit and ending at Pullback NOT greater than: 1.5; 1.5; 0; ON; 1; 2; OFF; 17; 36; ON; 0.05; ON; Chart; 14; 46; 50; 48.5; 51; OFF; 1; ON; 4; 2.
CCI Level ZoneThis strategy uses CCI 1000 as zones Buy sell if greater than level 100. will be seen as an uptrend If it's lower, it's a downtrend.
So we will use RSI. To trade in its zones, using the RSI crosses the level line, and when the RSI crosses the level line, it waits to buy with Stochastic.
fiveema// © CarterTsai
//@version=4
strategy(title="ema_example", shorttitle="ema_example", overlay=true)
plot(ema(close, 12), title="12ema", color=color.white, linewidth=1)
plot(ema(close, 144), title="144ema", color=color.yellow, linewidth=1)
plot(ema(close, 169), title="169ema", color=color.orange, linewidth=1)
plot(ema(close, 576), title="576ema", color=color.blue, linewidth=1)
plot(ema(close, 676), title="676ema", color=color.green, linewidth=1)
3 Indicator Strategy (StochRSI, MFI & EMA) With Safety OrdersThis strategy uses Stochastic RSI, Money Flow Index and EMA with settings for lower time-frames.
It also features safety orders based on 3 different take profit and stop loss methods.
Recommended Indicator Settings for lower time-frames;
Stoch RSI: 1,1,100,100
MFI: 30
EMA: 100
Take Profit/Stop Loss Settings:
There are 3 TP/SL types available;
- Pips -> based on minticks
- Base Value -> manually entering a value for the actual profit/loss.
- Opposite Signal -> e.g. if the current open order is long, strategy waits for the next short signal.
EMA 9 & 20 Cross StrategyThis is for 9 and 20 Exponential Moving Averages to identify buy and sell opportunities
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.
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.
Configurable Multi MA Crossover Voting SystemThis strategy goes long when all fast moving averages that you have defined are above their counterpart slow moving averages.
Long position is closed when profit or loss target is hit and at least one of the fast moving averages is below its counterpart slow moving average.
The format of the config is simple. The format is : FASTxSLOW,FASTxSLOW,...
Example : If you want 2 moving averages fast=9,slow=14 and fast=20,slow=50 you define it like this : 9x14,20x50
Another example : 5x10,10x15,15x20 => means 3 moving average setups : first wih fast=5/slow=10, second with fast=10/slow=15, last with fast=15/slow=20
You can chose the type of moving average : SMA, WMA, VWMA (i got issues with EMA/RMA so i removed them)
You can chose the source of the moving average : high, close, hl2 etc.
You can chose the period on which ATR is calculated and ATR profit/loss factors.
Profit is calculated like : buy_price + atr_factor*atr
Loss is calculated like : buy_price - atr_factor*atr
Performance in backtest is variable depending on the timeframe, the options and the market.
Performance in backtest suggests it works better for higher timeframes like 1d, 4h etc.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Swing Trades Validator - The One TraderThis swing trading strategy validator is built on the original strategy taught in my bootcamp for swing traders.
The strategy is simple and follows a trend trading pattern on prices reacting to Exponential Moving Averages over a multiple time-frame analysis.
The details of the strategy are as follows:
- Holding Period : Upto a couple of months
- Time-frames to be analysed : Month - Week - Day
- Trade Execution : Daily Time-frame
Analysis Details:
Step 1 : On the Monthly time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the month.
Step 2 : The price needs to be above the 8ema on the Monthly time-frame.
Step 3 : The 8ema must be above the 20ema on the Monthly time-frame.
The above steps indicate a bullish strength in the instrument on the Monthly time-frame.
Step 4 : On the Weekly time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the week.
Step 5 : The price needs to be above the 8ema on the Weekly time-frame.
Step 6 : The 8ema must be above the 20ema on the Weekly time-frame.
The above steps indicate a bullish strength in the instrument on the Weekly time-frame.
Step 7 : On the Daily time-frame, the candle needs to be bullish with the latest close being higher than the opening price of the day.
Step 8 : The price needs to be above the 8ema on the Daily time-frame.
Step 9 : The 8ema must be above the 20ema on the Daily time-frame.
The above steps indicate a bullish strength in the instrument on the Daily time-frame.
Step 10 : While the 8ema is above the 20ema on the Daily time-frame, the price must be allowed to rise before a pullback is seen towards the moving averages, indicating a bearish move trying to change the trend.
Step 11 : These pullback candles need to form a pattern called the Ring Low with the second pullback candle having a lower high and lower low and the low of the last pullback candle being lesser than or equal to the fat ema on the Daily time-frame.
Step 12 : If the stock is still bullish and the trend is displaying a strength in the underlying bullish direction, then there will be a resumption candle that will have a closing price higher than the previous day's high price.
This trend continuation signal is a confirmation that the instrument will continue in the underlying trend direction and we will be able to enter if this condition is satisfied.
The profit and loss percentages are set at a default 10% as this can be a minimum risk : reward for swing trades on average, but the inputs have been made available to the users in order to adjust the risk : reward to find the most optimum breathing room for each individual stock or instrument. This will give the user a highly custom overview of the strategy on individual instruments based on their volatility and price movements.
The strategy tester will auto back-test this strategy historically and find all the trades that were taken based on this strategy and populate a performance summary.
The most important data in V1.0 of this script are as follows:
1. No. of Trades Taken : We want to see many trades being taken on this strategy in that particular instrument. This shows us a healthy report on the number of winning vs. losing trades.
2. Percentage Profitable : We want to see that this strategy has worked out in the past and is giving us a high probability of return. This in no way an indication that the strategy will definitely work out in the future as well, but gives us an idea of whether or not we should enter this trade.
3. No. of Winning Trades vs. Losing Trades : We would like to see a significantly higher number of winning trades.
4. Avg. # of bars in a trade : This gives us an idea of how long on average we might have to wait to see the results of this strategy either in favor of our reward or against our desired direction. Some trades can be completed in around 15-20 bars on average and some trades have shown to take upto 45 days to reach desired reward. This is in line with our planned holding period, but gives the trader a sense of time and increased level of patience.
The future updates will have more utility of the various elements of the strategy tester and the entire exit strategy will be integrated into the script.
This script is not to be used as a standalone method and must be studied well in order to execute trades. I have not hidden visibility on other time-frames, but since order execution is done on the Daily time-frame, the script must run on the Daily time-frame only.
There are many other factors to be taken into consideration before entering a trade and proper risk management and position sizing rules must be followed.
Our bootcamp participants will use this strategy tester in conjunction with the invite-only Trading Toolkit assigned to them.
The development of this script will be ongoing and all comments and feedback are welcome.
Combo 2/20 EMA & 3 Day Pattern 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
This startegy based on 3-day pattern reversal described in "Are Three-Bar
Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in
January,2000 issue of Stocks&Commodities magazine.
That pattern conforms to the following rules:
- It uses daily prices, not intraday or weekly prices;
- The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
- The last day must have a close above the prior day's high, with no ties allowed;
- Each day must have a nonzero trading range.
WARNING:
- For purpose educate only
- This script to change bars colors.
5212 EMA Strategyver 01
23 December 2021
This strategy using :
- 3 EMA period 50, 100, 200
- stochastic RSI slow
Long Cond :
- Stochastic RSI cross below 20
- EMA 50 > 100 > 200
Short Cond :
- Stochastic RSI cross above 80
- EMA 50 < 100 < 200
Sleeping Mode
- EMA 50 between EMA 100 & EMA 200