Stochastic & MAThis trading system comes from the experience of having a "fast" signal for entry at low prices (such as the stoscastic) and then "following" the stock with a "slower" indicator such as the exponential moving average. Both the input and output signals are filtered.
The use of the trading system only carries out long operations and has been tested on shares and ETFs, including indices, on daily bases (End Of Day).
ENTRY CONDITION: when stochastic's k is higher than d (on the default value of 21 periods) we enter the lower part of the oversold, to which we apply a filter or the confirmation that the closing of the day of the crossing is higher than that of the n -th previous bar (the 2nd previous bar recommended).
Other default settings are k = 6 and d = 4; the oversold level is also customizable (recommended = 25).
EXIT CONDITIONS: once the entry has "gone well", we follow the upward trend of the stock not with a stochastic oscillator - which tends to exit too soon, especially in case of strong trends - but with a simple moving average exponential (by default at 38 periods). Also in this case a filter is added, that is, k must be> to a filter threshold (recommended = 65) which is used to distinguish the decline between a "physiological" tracking. "(k drops" slowly "together with the approach of prices to the moving average) from a more" violent "tracking (prices are below the moving average and k consequently fall" suddenly ", in a few bars).
MONEY MANAGEMENT: 13% stop loss inserted (the physiological level of tracking of the shares is generally max 8-12% so we also consider a 1% margin due to trading). For more volatile stocks, the level can be extended to 20%.
LEVERAGE: the default value is equal to 1, but it is advisable, for simulations on shares, to use higher levers (x2, x3, ...) if you trade the relative CFD or on the index in case of buying and selling of Leveraged ETFs (e.g. LEVMIB which is 2x leveraged ETFs on Italian index).
Oscillators
R3 ETF StrategyThis strategy is a modification of the “R3 Strategy” from the book "High Probability ETF Trading" by Larry Connors and Cesar Alvarez. This RSI strategy is for a 1-day time-frame and has these 3 simple rules:
Criteria:
The price must be above the 200 day moving average.
The 2-period (day) RSI drops 3 days in a row.
The 2-period RSI must have been below 60 3 days ago and below 10 today.
Entry and Exit:
If the 3 rules above are true, then buy on the close of the current day.
Exit on the day's close when the RSI crosses above 70.
How it works :
The Strategy will buy when the buy conditions above are true. The strategy will sell when the RSI crosses above 70. The RSI period/length, and RSI entry/exit criteria thresholds have all been coded to be adjustable with inputs.
Plots :
Blue line = 200 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!
Acrypto - Weighted StrategyHello traders!
I have been developing a fully customizable algo over the last year. The algorithm is based on a set of different strategies, each with its own weight (weighted strategy). The set of strategies that I currently use are 5:
MACD
Stochastic RSI
RSI
Supertrend
MA crossover
Moreover, the algo includes STOP losses criteria and a taking profit strategy. The algo must be optimized for the desired asset to achieves its full potential. The 1H and 4H dataframe give good results. The algo has been tested for several asset (same dataframe, different optimization values).
Important note:
Backtest the algorithm with different data stamps to avoid overfitting results
Best,
Alberto
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.
AVG Stochastic Strategy [M30 Backtesting]1. AVG Stochastic Calculate
1.1 AVG %K is calculated by apply EMA with smooth K period on Average of Original Stochastic %k & %d
+ avg_k=ema((%k+%d)/2,smoothK)
1.2 AVG %D is calculated by apply EMA with %d period on AVG %K
+ avg_d=ema(avg_k,periodD)
2. Parameter
+ %K Length: 21
+ %K Smoothing: 3
+ %D Smoothing: 3
+ Symbol: BTC/USDT
+ Timeframe: M30
+ Pyramiding: Maximum 3 orders at the same direction.
3. Signal
3.1 Buy Signal
+ Entry: AVG %K crossover AVG %D and AVG %D < 20
+ Exit: AVG %D > 80
3.2 Sell Signal
+ Entry: AVG %K crossunder AVG %D and AVG %D > 80
+ Exit: AVG %D < 20
KDJ Strategy @ionvolutionBuys if there is crossover in J and D and the crossover is above an SMA defined as an input parameter
Sells if the close is below the SMA or there is a crossunder in J and D
The KDJ calculation is done using ll21LAMBOS21 script. I added start date, end date, stop loss margin and stop profit margin to ease the simulation on diferent conditions of the market.
Tested on BTCBUSD pair. Gives good results in 30m candles with K period = 7 and D period = 3, but also works fine with K period = 14 and D period = 8. It works fine when market is bullish and gives false signals in flat markets. I just developed long strategy, as it is developed to operate in SPOT trading.
TEMA/HMA/VWMACD - Short Strategy 4HAs we can discover by studying the history of BTCUSD, the fall is always swift. Confirmation of this - today's collapse. In this strategy, an attempt is made to catch such drop by using quick entry and quick exit.
Let's describe what this strategy consists of:
• TEMA (you can find this strategy separately on this page or on platform)
• VWMACD
• HMA
• Take-profit and Stop-losses
Logic:
Firstly we VWMACD (the difference between VWMACD and simple MACD is only in the way of calculating moving average) and plot it as a histogram.
Then HMA is adding as a trend filter. For easy understanding let's plot it now on chart separately.
Next step is to create and add TEMA. After it is needed to subtract slow TEMA from fast TEMA and plot this value around 0 on histogram. This is the main decision for the implementation of the short trade.
ENTRY the trade:
When VMACD is below 0 and price (src = close) is below the HMA and TEMA below 0.
CLOSE the trade:
When VWMACD is upper than 0 or price is upper than HMA or TEMA is upper than 0
You can find more strategies on tradingammo.pro.
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.
RSI StrategyThis RSI strategy will allow you to go long when RSI is overbought and go short when RSI is oversold. You can also change the checked boxes to reverse this. Uncheck "Overbought Go Long & Oversold Go Short" and check "Overbought Go Short & Oversold Go Long" to use this reversed option.
You can also choose to use an ema filter as an additional qualifier for entry. Uncheck "No EMA Filter" and check "Use EMA Filter" if you want to use it.
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. To specify a time from use the format 0930-1100 or whatever your trading hours will be. Check off "Enable Close Trade At End Of Time Frame" to close the trade at the end of your trading hours.
You can also specify a % based take profit and stop loss. Also keep in mind that the way this code is designed if you use the stop loss and/or take profit and it reaches either target and closes, then it will immediately re-enter if the condition for long or short entry is true.
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.
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.
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
Divergence for Many Indicators v4 STHello Traders.
This is the Strategy version of Divergence for Many Indicators v4, an easy and comfortable indicator.
- - - -
*It's been modified a little bit from the original.
*I got permission from the original author.
*I'm not good at English, I'm sorry.
- - - -
< 4 things to check >
1. Since repainting is not performed, the first imprinted signal can be accurately seen.
2. It does not respond to continuous diversions.
3. If the opposite diversity is not imprinted, caution is required as it is designed not to indicate liquidation. Be careful when reading the figures shown in the strategy tester.
4. Added stop loss and take propirane.
< What changed? >
1. pivot period 5 - > 9
2. Money Flow index and Chaikin Money Flow are released.
- - - -
KOR SUB
< 4가지 확인 사항 >
1. 리페인팅이 없으므로 첫 번째로 각인된 신호를 정확히 볼 수 있습니다.
2. 연속된 다이버젼스에 대해서는 반응하지 않습니다.
3. 반대의 다이버젼스가 각인되지 않으면 청산 표시를 하지 않도록 설계되어 있으므로 주의를 요합니다.
4. 스탑 로스와 테이크 프로핏 항목을 추가하였습니다.
< 무엇이 변경되었나? >
1. 피봇 페리어드 값이 조금 수정되었습니다.
2. MFI & CMF 가 체크 해제된 상태입니다.
THANK YOU ^^
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.
BTC/USD - RSIIF RSI (14) reaches 68 ... sell 1 lot size ( with TP 250 points and SL 500 points)
IF RSI (14) reaches 27 ... buy 1 lot size ( with TP 250points and SL 500 points)
IF RSI (14) reaches 80 ... sell 1 lot size ( with TP 250 points and SL 500 points)
IF RSI (14) reaches 18 ... buy 1 lot size ( with TP 250points and SL 500 points)
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.
Supertrend TEST 2 Strategyры вап вп ывапвыап вып выап вар блооЫВУп м лрп чс апр пб ою а рырб по а ап
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
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
P-Signal Strategy RVS.For Christmas and New Year,
for P-Signal users - the PINE code of a reverse (trigger) strategy!
Strategy parameters.
==================
1. Cardinality – the number of points (from 4 to 200) that make up a set of elementary events (bar). This is the main parameter that determines success.
2. |ΔErf| - a size of the Δ region (from 0 to 1) of the error integral near zero. Helps save on commissions.
3. Observation time – the deputy speaks for himself.
NB: In the strategy, process_orders_on_close = true, order executes after a bar closes and strategy calculations are completed. Also Barstate.isconfirmed, i.e. the script is calculating the last (closing) update of the current bar.
Usage advice.
============
Set your exchange commission (0.2% by default). Start your search by increasing the parameter Cardinality. If in the Performance Summary two parameters Net Profit and Commission Paid are of the same sign and order, you are in luck, you have found a suitable probabilistic space. Further, you can reduce the losses from the commission using the parameter |ΔErf|.
Do not forget to publish the idea, for example: P-Signal Strategy RVS: BTCUSDT 1h (16, 0.05).
Note.
=====
P-signal is theoretical. It works in a probabilistic space endowed with energy (entropy).
EMA Cross + Divergence strategy (Div. signals by The Divergent)A sample strategy demonstrating the usage of The Divergent divergence indicator and The Divergent Library .
The Divergent is an advanced divergence indicator which you can easily incorporate into your own strategies.
In order to use this strategy (and to use the signals in your own strategy), you need to have the Pro version of The Divergent applied to your chart.
For more information, please see the comments inlined in the code.