EMA + Bullish Engulfing Candle Pattern StrategyHello Guys! Nice to meet you all!
This is my first open source script!
### Long Condition
1. Bullish Engulfing Candle
2. No doge Candle
3. Present volume should be bigger than the previous volume (20%)
4. Trend filter (with 2 EMAs)
### Close Condition
1. When trend Changes
2. When Bearish Engulfing Candle appears
###
No stop loss and take profit.
Indicators and strategies
Heiken Ashi & Super TrendThis is one of my open source 1h strategies
It works on Binance: BTCUSDTPERP charts
This strategy involves two indicators
1. Heiken Ashi - a typical technical indicator to help highlight and clarify the current trend. This somehow allows the chart to ignore unnecessary fluctuations and make the trend more visible.
2.Super Trend - - One of the most common ATR-based indicators, the SuperTrend indicator is useful to help you catch big trends.
Buy entry conditions are as follows.
1. The Super Trend indicator running on the Heiken Ashi chart gives a buy signal.
2. Buy at the current market price and take profit at 1% of the normal k-line at this time.
Take profit
TP - 1%
Stop Loss
None
How to use Leverage in PineScriptI believe there are many friends who have been confused by the leverage problem of TradingView strategy, when backtesting, it is always unable to bring its own leverage, so it is impossible to do leverage sustained compounding, this key point, and many friends are looking forward to solve. In particular, the default_qty_value = 100, where 100 is the upper limit.
Here I have used the official RSI strategy for demonstration, using the qty to place orders. Through strategy.equity, leverage and close price, and rounding, directly calculate the specific number of contracts need to be opened.
I hope you can enjoy solving the leverage problem, and I look forward to your pointing out my problems and shortcomings to me. Thank you.
BT-SAR Ema, Squeeze, Volatility
Esse script foi criado para estudo de Backtest.
Ele usa o SAR PARABÓLICO como indicador de sinal de entrada, você também pode combinar 3 indicadores para filtrar as entradas: Média Móvel, Squeeze Momentum e Volatility Oscilator .
Existe duas entradas, quando o SAR Parabólico vira ou pelo Breakout (usando o último preço) do SAR Parabólico antes dele virar.
As Os filtros podem ser usados de forma combinada ou individual.
O Script também pode ser usado com algum serviço de bot como 3commas.io, basta colocar as mensagens de entrada e saída para o bot.
This script was created for Backtest study.
It uses PARABOLIC SAR as input signal indicator, you can also combine 3 indicators to filter inputs: Moving Average, Squeeze Momentum and Volatility Oscillator .
There are two entries, when the Parabolic SAR turns or by Breakout (using the last price) of the Parabolic SAR before it turns.
The Filters can be used in combination or individually.
The Script can also be used with some bot service like 3commas.io, just put the input and output messages to the bot.
VWAP Push StrategyThis strategy is unfortunately not finished yet.
A pretty simple strategy. If price broke through VWAP and had three consecutive candles following the breakthroughs trend, the high of the third candle will be drawn. If this happened after a crossover of the vwap and price breaks through the high of the third candle, strategy will go long. Short will be the same after crossing under the vwap. A long or short will be closed after crossing the vwap in the opposite direction, so the vwap is kind of a trailing stop.
Unfortunately, I could not manage to stop the script from entering multiple times into one drawn high or low. Of course, if a high was crossed the script should wait for a new formed high before entering a new long. If someone would find a solution to this, it would be great, because I think it is a nice strategy .
Should work great scalping 5min charts (when scripting, I used the SPX for reference).
KVFX Pivot Reversal StrategyWorks best going in direction of trend , extra eyes to identify market turns
My StrategyThis is for educational purpose. Strategy is a test strategy to take long and short position
Ichimoku Cloud and Bollinger Bands (by Coinrule)The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.
The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.
The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.
The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.
The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.
The Bollinger Bands are among the most famous and widely used indicators. A Bollinger Band is a technical analysis tool defined by a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average ( SMA ) of a security's price, but which can be adjusted to user preferences. They can suggest when an asset is oversold or overbought in the short term, thus providing the best time for buying and selling it.
This strategy combines the Ichimoku Cloud with Bollinger Bands to better enter trades.
Long orders are placed when these basic signals are triggered.
Long Position:
Tenkan-Sen is above the Kijun-Sen
Chikou-Span is above the close of 26 bars ago
Close is above the Kumo Cloud
The closing price is greater than the upper standard deviation of the Bollinger Bands
Short Position:
Tenkan-Sen is below the Kijun-Sen
Chikou-Span is below the close of 26 bars ago
Close is below the Kumo Cloud
The upper standard deviation of the Bollinger Band is greater than the closing price
The script is backtested from 1 January 2022 and provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
This script also works well on BTC 30m/1h, ETH 2h, MATIC 2h/30m, AVAX 1h/2h, SOL 45m timeframes
BB Strategy toobabollinger bands strategy with added upper basis and lower line on the chart.
when we use BB strategy in trading view unfortunately the upper, lower and basis line did not display.
so we solve the problem with just a little script codes and bring back the lines to the chart
BTC Good SignalThis strategy uses the intersection between the triple exponential moving average and the least square moving average. We also control for the profit that you will gain during the upward trend by implementing the trailing stop based on the ATR indicator. This is the strategy for the spot market only and can be primarily used for long-term investors.
PowerX by jwitt98This strategy attempts to replicate the PowerX strategy as described in the book by by Markus Heitkoetter
Three indicators are used:
RSI (7) - An RSI above 50 indicates and uptrend. An RSI below 50 indicates a downtrend.
Slow Stochastics (14, 3, 3) - A %K above 50 indicates an uptrend. A %K below 50 indicates a downtrend.
MACD (12, 26, 9) - A MACD above the signal line indicates an uptrend. A MACD below the signal line indicates a downtrend
In addition, multiples of ADR (7) is used for setting the stops and profit targets
Setup:
When all 3 indicators are indicating an uptrend, the OHLC bar is green.
When all 3 indicators are indicating a downtrend, the OHLC bar is red.
When one or more indicators are conflicting, the OHLC bar is black
The basic rules are:
When the OHLC bar is green and the preceding bar is black or Red, enter a long stop-limit order .01 above the high of the first green bar
When the OHLC bar is red and the preceding bar is black or green, enter a short stop-limit order .01 below the low of the first red bar
If a red or black bar is encountered while in a long trade, or a green or black bar for a short trade, exit the trade at the close of that bar with a market order.
Stop losses are set by default at a multiple of 1.5 times the ADR.
Profit targets are set by default at a multiple of 3 times the ADR.
Options:
You can adjust the start and end dates for the trading range
You can configure this strategy for long only, short only, or both long and short.
You can adjust the multiples used to set the stop losses and profit targets.
There is an option to use a money management system very similar to the one described in the PowerX book. Some assumptions had to be made for cases where the equity is underwater as those cases are not clearly defined in the book. There is an option to override this behavior and keep the risk at or above the set point (2% by default), rather than further reduce the risk when equity is underwater. Position sizing is limited when using money management so as not to exceed the current strategy equity. The starting risk can be adjusted from the default of 2%.
Final notes: If you find any errors, have any questions, or have suggestions for improvements, please leave your message in the comments.
Happy trading!
ninja strategyThe ninja strategy is 3-minute scalping.
It takes profits from very short term ups and downs.
Consolidation Breakout [Indian Market Timing]OK let's get started ,
A Day Trading (Intraday) Consolidation Breakout Indication Strategy that explains time condition for Indian Markets .
The commission is also included in the strategy .
The basic idea is ,
1) Price crosses above upper band , indicated by a color change (green) is the Long condition .
2) Price crosses below lower band , indicated by a color change (red) is the Short condition .
3) ATR is used for trailing after entry
// ═══════════════════════════════//
// ————————> TIME CONDITION <————————— //
// ═══════════════════════════════//
The Indian Markets open at 9:15am and closes at 3:30pm.
The time_condition specifies the time at which Entries should happen .
"Close All" function closes all the trades at 2:57pm.
All open trades get closed at 2:57pm , because some brokers dont allow you to place fresh intraday orders after 3pm.
NSE:NIFTY1!
// ═══════════════════════════════════════════════ //
// ————————> BACKTEST RESULTS ( 114 CLOSED TRADES )<————————— //
// ═══════════════════════════════════════════════ //
LENGTH , MULT (factor) and ATR can be changed for better backtest results.
The strategy applied to NIFTY (3 min Time-Frame and contract size 5) gives us 60% profitability , as shown below
It was tested for a period a 8 months with a Profit Factor of 2.2 , avg Trade of 6000Rs profit and Sharpe Ratio : 0.67
The graph has a Linear Curve with consistent profits.
NSE:NIFTY1!
Save it favorites.
Apply it to your charts Now !!
Thank me later ;)
Forex Midpoint Stratejisi For Nasdaq English Knowledge:
Midpoint Strategy;
The general calculation method is a strategy that helps determine direction by the intersection of a MA line and the value obtained by dividing the lowest and highest price in the specified length range.
Başlangıç Periyodu: The data length of the Midpoint Line.
Kaydırma Seviyesi: The number of steps forward or backward of the Midpoint Line.
Yüzde Seviyesi: the amount of vertical scrolling.
Uzunluk: The length of the MA line
represents.
This strategy is prepared for the Nasdaq 5-minute period. It needs to be optimized for use on other instruments.
There are take profit and stop loss levels within the codes. Friends who want to use it can remove the invisibility from the relevant sections. Also, I removed the midpoint and the MA line so that it does not crowd the image, you can add it if you want.
Thank you.
Turkish Knowledge:
Midpoint Stratejisi;
Genel hesaplama yöntemi, belirlenen uzunluk aralığındaki en düşük ve en yüksek fiyatın ikiye bölümü ile elde edilen değer ve bir ortalama çizgisinin kesişimleriyle yön belirlemeye yardımcı bir stratejidir.
Başlangıç Period: Midpoint Çizgisinin veri uzunluğunu.
Kaydırma Seviyesi: Midpoint Çizgisinin ileri veya geri adım sayısını.
Yüzde Seviyesi: dikey kaydırma miktarını.
Uzunluk: Ortalama çizgisinin uzunluğunu
temsil etmektedir.
Bu strateji Nasdaq 5 dakikalık periot için hazırlanmıştır. Diğer enstrümanlarda kullanılması için optimize edilmesi gerekir.
Kodların içinde Kar alma , zarar durdurma seviyeleri mevcuttur. Kullanmak isteyen arkadaşlar ilgili bölümlerden görünmezliği kaldırabilirler. ayrıca midpoint ve ortalama çizgisinide görüntü kalabalığı yapmaması için ben kaldırdım isterseniz siz ekleyebilirsiniz.
Teşekkürler.
AlphaTrend Strategy with Trailing SL %this is a modified version of AlphaTrend Strategy with added trailing Stop Loss
this is my first script that I have added to tradingview community
the trailing SL makes it very effective to lower the losses and can improve the overall return
X48 - Strategy | MA Type Cross + TPSL | Future&Spot | V.2Thank You For Open Source Code, This Strategy Ref. By 1.Simple Strategy Like MA Crossover For Long/Short or Spot Trade, 2. CDC Action Zone V.2 for BarPaint
This Strategy Mixing With MA Crossover Strategy and BarPaint By CDC Action Zone and TP/SL by Varbara
### How To Use Strategy : Setting EMA/SMA Crossover EMA/SMA, Any Value If You Want
For Long Position : Cross Up
For Short Position : Cross Down
Can Use With Spot Trade : Cross Up = Buy, Cross Down = Sell
TP/SL When Your OrderSize Change From any % Of Your TP/SL Value
### In Strategy Setting
Intitial Capital = Ex. 200
Order Size = Should Be Money Management Not Use 100% of Capital Ex. 10% of Capital (200$) = Order Size 20$
StopLoss and Take Profit = If You Run Trend TF 4H+ or 1D+ You Can Change TP% = 1,000% for nonlimit and Stop Loss 5 - 20% from your order size
Ex. Stoploss 15% = OrderSize / 100 x %SL = 20$/100 x 15% = 3$ Loss from order size 20$ (if you not set stop loss.)
Base Currency = (Your Currency) # Ex. USD
Commission = (Your Trading Fee) # Ex. Future Fee Can Check At Binance Fee Rate > www.binance.com > Choose Your Fee Type, Ex. USD M Future (Regular User) = 0.02 (Maker), 0.04 (Taker)
Commission Symbol Type = % # (Ref. By Binance Fee Rate)
### Notice ####
Default Setting It's Realistic From Normal Life Ex. Capital 200$ / Ordersize 20$ (10%)/ Commission 0.1% (Buy+Sell) / Slippage = 2 / TP = 1000% (nonlimit) / SL = 15%/OrderSize
Low Risk But High Return, Good Luck
### Bot Auto Trade by X4815162342 ###
if you wanna try my bot auto trade X48-3in1-bot : Contact My Line ID : x4815x
Full Command Alert For This Strategy If You Wanna See It's
'{"ex":"'+markettype+'","side": "'+longcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
'{"ex":"'+markettype+'","side": "'+shortcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
But Easy Than Full Command Just Use Thisssssss !! Strategy Be Manage Auto Long and Short or TPSL Position
You Don't Do Anything Just Use This Message to Alerts Message
{{strategy.order.alert_message}}
### If you don't use bot but just looking for strategy test ####
Just Pass Bot Setting Function It's Nothing Effect For Strategy !!!!!!
Let's Enjoy With Your Strategy BackTest 😁
Remember Beware Max drawdown%. I'm Recommend Lower Than 10% It's Very Good.
Arpan_Koushik_5_EMAArpan_Koushik_5_EMA is an extended EMA indicator, which will provide perfect buy and sell call.
DCA After Downtrend (by BHD_Trade_Bot)The purpose of the strategy is to identify the end of a short-term downtrend . So that you can easily to DCA certain amount of money for each month.
ENTRY
The buy orders are placed on a monthly basis for assets at the end of a short-term downtrend:
- Each month condition: In 1-hour time frame, each month has 240 candles
- The end of short-term downtrend condition: use MACD for less delay
CLOSE
The sell orders are placed when:
- Is last bar
The strategy use $1000 and trading fee is 0.1% for each order.
Pro tip: The 1-hour time frame for TSLA has the best results on average:
- Total spent: $1000 x 85 = $85,000
- Total profit: $790,556
RSI SMA Crossover StrategyOverview
RSI SMA Crossover Strategy works the same way as traditional MA crossover strategies, but using RSI instead of price. When RSI crosses over the SMA, a long position is opened (buy). When RSI crosses under the SMA, the long position is closed (sell).
This strategy can be very effective when the right inputs are used (see below). Be sure to use the backtesting tool to determine the optimal parameters for a given asset/timeframe.
Inputs/Parameters
RSI Length: length for RSI calculation (default = 50)
SMA Length: length for SMA calculation (default = 25)
Strategy Properties
Initial Capital = $1000
No default properties are defined for Slippage, Commission, etc, so be sure to set these values to get accurate backtesting results. This script is being published open-source for a reason - save yourself a copy and adjust the settings as you like!
Backtesting Results
Testing on Bitcoin (all time index) 1D chart, with all default parameters.
$1,000 initial investment on 10/07/2010 turns into almost $2.5 billion as of 08/30/2022 (compared to $334 million if the initial investment was held over the same period)
Remember, results can vary greatly based on the variables mentioned above, so always be sure to backtest.