Supertrend + Stoch StrategyA strategy using ema , supertrend and stochastic .
Long entry conditions:
1. EMA 25 > EMA 50 and EMA 100 > EMA 100.
2. Supertrend indicator is green.
3. Stochastic k line cross over d line.
Long stop: the lowest price of the last k<d interval.
Long take: 1.5 times of stop.
The short conditions are opposite.
This strategy performed well in 1D timeframe of lots of cryptocurrency pairs. If you want to use it on 4H timeframe, you might need to finetune the parameters. But it is not recommended to use it on smaller timeframe due to the commission.
A Multi Pair Signal Alarm Version is also provided.
M-oscillator
Supertrend + Stoch Strategy Multi-pair Signal AlarmBITSTAMP:BTCUSD
An entry alarm on Supertrend Stoch Strategy . It can monitor 10 trading pairs in one alarm.
Use this script on any trading pair and deploy the alarm. The alert comment shows the pair name, direction, entry point, sl/tp, and percentage of your position you should cost.
I currently use it as a signal for my grid trading.
Ultimate Bullish Divergence for RSI MFI RVSI OBV w/ Buy SignalsThis strategy is based on the Indicator below and includes all of its features.
This version Includes the Strategy tester and a dynamic SL
The only drawdown of this version is that Alerts are not as customizable
Ultimate Bullish Divergence for RSI OBV RVSI MFI w/ Buy Alerts
Rising ADX strategyI have always been a huge fan of ADX. Its good for finding out good trending moves.
But it has been said that only ADX after 20 or 25 is good for trending market, but few trend gets completed at that level.
So I have come up with a logic to find out the rising ADX. This could be used to determine the trending moves from the start.
Buy signal:
When close is greater than moving average 1 and 2. This moving average can be SMA, EMA, WMA or HMA.
When ADX is greater than the threshold range. I have taken 10 as my minimum range.
Of course important of all ADX should be rising which implies trend is about to start.
Buy exit:
When close is less than moving average 1 and 2. This moving average can be SMA, EMA, WMA or HMA.
When ADX is lesser than the threshold range. I have taken 10 as my minimum range.
ADX falling which implies trend is about to end.
Sell signal:
I don't repeat the above logic again.
Everything similar to buy signal except above moving average. For selling it should be below moving average.
Strategy can be tested for long and short sides.
Note: No Repainting as the logic is very simple.
Using this script we can identify the best timeframe the script trend yields profit.
Test and provide your comments.
FTRS BOLT PRO
The script uses RSI as major trend identification and supported by RSI divergence for take profit, and also counter trend in certain cases.
Uses EMA 200 for major trend identification to filter false signals, Average Volume as confirmation and faster signal detection to the change of trend.
The indicator detects immediate change of trend and immediately opens position for the major trend.
User can enjoy the RSI with labels of divergence to do manual judgement.
Existing risk to reward ratio based on amount of money instead of ticks count. The currency is depending on the chart's trading currency.
This strategy mainly built for FCPO and its for 1 min settings only. User can toggle the sessions as per users preferences
The default risk to reward ratio is 1:1.5. However, there is a risk management using RSI levels to
Cumulative RSI StrategyI suppose nothing drives a point home like a 10+ year backtest! A couple of weeks ago I published a custom indicator called the Cumulative RSI. This indicator was straight out of chapter 9 of "Short Term Trading Strategies That Work." Today I am publishing a basic sample strategy in that uses the Cumulative RSI as its only entry and exit signals on a Nasdaq 100 leveraged index ETF (TQQQ). In this example, the indicator is being used as a longer term strategy with just 10% leverage over the account equity and a $25k start balance.
If I had it 10 years ago I would probably be retired! I'm sharing because I've found that it can provide an edge when determining exit/take profit points for trades. Many traders wait for a price reversal / trailing-stop to exit a trade when it starts losing. I've found that, using tools like the Cumulative RSI, you can achieve better exit points over the long term. Disclaimer: Even though this example significantly beats buy and hold, I wouldn't advise using it as a stand-alone strategy without significant additions/modifications to strategy and risk management functions.
DIVI Wunder StrategyAs it is known, divergence is a situation we encounter very often on graphs. Various divergencies may occur according to many indicators. MACD divergence, RSI divergence... In the strategy I use only positive divergence. What is positive divergence I will explain on MACD positive divergence A MACD positive divergence is a situation in which the MACD does not reach a new low, despite the fact that the price of the stock reached a new low. This is seen as a bullish trading signal—hence, the term “positive divergence.” So I thought of these divergencies and came up with a new strategy. Combining the divergencies with the VOLPIN strategy I wrote earlier, a great strategy has emerged. When the divergence signals are came from MACD,RSI,CCI,OBV,Chaikin Money Flow, VWmacd and Money Flow Index all these indicators I sent a buy signal until the 40 times completed. ThenI sent to sell signal when the price come to take profit level. In this strategy, you divide your principal into as many parts as you want. For example, let's say that you have 1000 dollars of money and you make purchases by dividing this money into 40 equal parts in the default settings of the indicator. $25 per purchase. After each purchase is made as 25 dollars, you can adjust your profit rate from the profit taking settings. When you look at the results of the strategy, your profit rate will be very high. I usually use this strategy in one hour periods. Of course you change it whatever you want. Also change all settings from panel to get more profit. Have fun :)
Dagger V1 strategyThe "Dagger V1 strategy" strategy is used for the backtest of the "Dagger V1 indicator & alerter" indicator. Their algorithm is identical. Further, all descriptions of the settings are the same for the strategy and the indicator.
Dagger is used for trading on the cryptocurrency spot market, but it can also be used for any other fairly volatile pairs.
Dagger shows the best results on the H1 timeframe, but you can experiment with other timeframes.
The logic of Dagger's work is based on the search for the optimal entry point into the market and the best moment to close a deal. Stochastic oscillator and exponential moving EMA are used for this. Also, the exit from the transaction can be optimized using several parameters.
The strategy can use trailing up to one or more red bars in order not to miss the sharp growth of the currency.
inside bar strategy Wıth SL-TP Based on strat bars to enter trades, you can use it with very low stop loss level and try all coins in daily frequency
Trend AlgoA NRTH_ Premium Momentum Based Strategy
Comes included with the Premium Package.
Indicator features
Built-In Alerts
Visual Risk Management
Customizable Entry Rules
Usage Tips
This strategy works on timeframes as low as 5m, great for scalping or day trading.
The algo identifies price momentum with strict entry signal settings (can be made more or less sensitive).
Works for all markets with the ability to customize to your liking.
Backtesting Results Info
Period 1/1/2021-1/10/2021
Entry value at $1000 with 10x leverage
Binance standard taker fee rate (0.04%)
ATR Exits : 1:2 RR
-------------------------------------------
Disclaimer
Copyright NRTH_ Indicators 2021.
NRTH_ and all affiliated parties are not registered as financial advisors. The products & services NRTH_ offers are for educational purposes only and should not be construed as financial advice. You must be aware of the risks and be willing to bear any level of risk to invest in financial markets. Past performance is not necessarily indicative of future results. NRTH_ and all individuals associated assume no responsibility for your trading results or investments.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, or individual’s trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
MA&AOThat is quit simple strategy, which combines only two indicators: AO and MA. The logic of trades is also clear, when AO is bullish; slow ma is under the close price; fast ma > slow ma - buy.
RSI+CMO Hybrid StrategyThis strategy is based on the RSI+CMO Hybrid Index I created. I modified both the original RSI and CMO so that the RSI+CMO Index value ranges from -100 to +100 and defined as follows. When the RSI+CMO Hybrid Index values close above the Bull Level and below the Bear Level, the strategy will trigger long and short signals respectively. This newly defined hybrid RSI+CMO indicator showed better win rates and better profits than the original CMO strategy. The default setting for this strategy is optimized for an 8-hour candle. For candles at different times, try to find the optimal value yourself.
* I was going to open the script, but recently there was a case of stealing my script and publishing it without permission, so I decided not to disclose it.
▶ Modified RSI = Original RSI - 50
Therefore,
Original RSI (0 ~ 100) → Modified RSI (-50 ~ +50)
▶ Modified CMO = Original CMO * 0.5
Therefore,
Original CMO (-100 ~ +100) → Modified CMO (-50 ~ +50)
▶ RSI+CMO Hybrid Index = Modified RSI + Modified CMO
Therefore,
RSI+CMO Hybrid Index (-100 ~ +100)
________________________________________________________
이 전략은 기존의 RSI와 CMO 지표를 수정하여 새롭게 정의한 하이브리드 RSI+CMO 지표를 기반으로 만들어졌습니다. 지표 값의 범위가 -100에서 100의 범위를 가질 수 있도록 기존의 RSI와 CMO를 수정하여 만들었습니다. RSI+CMO Hybrid Index 값이 Bull Level 이상과 Bear Level 아래에서 봉마감을 하면 이 전략은 각각 롱과 숏 신호를 트리거합니다. 이렇게 새롭게 정의된 RSI+CMO 지표는 기존 CMO 전략 대비 승률과 수익이 더 우수합니다. 이 전략의 세팅 기본값은 8시간봉에 최적화 되어있습니다. 다른 시간대 봉에서는 최적값을 직접 찾아보십시오. 그리고 이전략은 RSI+CMO Hybrid Index와 함께 사용하면 Long과 Short 신호를 예측할 수 있어 편리합니다.
* 최근에 제 스크립트를 도용/표절하여 무단으로 퍼블리쉬한 사례가 발생하여 더 이상 스크립트는 공개하지 않기로 하였습니다.
Go_up vwap-rsiIt is the popular RSI indicator with VWAP as a source instead of close.
VWAP (Volume Weighted Average Price) is one of the derived moving average indicators that takes volumes into account in price averaging. VWAP stands for Volume Weighted Average Price.
//LOGIC ENTRY:
Length RSI+VWAP
Oversold - bottom line RSI-VWAP
//EXIT SETTING:
Take profit and stop loss when a certain percentage is reached
//Settings next entry and grid:
Allow signal lower than,% - the next entry into a trade from logic occurs only when a decrease by a certain percentage
Allow grid,% - when the price drops by the percentage specified in the settings, the entry will take place, but only on the next bar.
//DATA RANGE:
-Testing results for any period of time
//PS:
For this strategy, we use pyramiding, we adjust the number of inputs in the "properties" section, by default left 20.
Look at the results in the past and adjust the settings for your capabilities and pitfalls. The default costs 25 entries for $ 400
Change the settings - find better results. share in the comments
[TVExtBot]Heikinashi Upswing Strategy(30m&1h&2h)The Heikin-Ashi Upswing Strategy is a trend-following strategy suitable for short-term trading that utilizes Heikin-Ashi to follow an upward trend and realizes profits only in a rising market.
하이킨아시 업스윙 전략은 하이킨아시를 활용하여 상승하는 추세를 따라가며 상승장에서만 수익을 실현하는 단기매매에 적합한 추세추종 전략입니다.
* Buy Signal
The close price of the Heikin-Ashi candle was higher than the open price, and a golden cross occurred in the short-term EMA.
하이킨아시 캔들의 종가가 시가보다 크고 단기 EMA에 골든클로스가 발생.
* Sell Signal
The open price of the Heikin-Ashi candle is higher than the close price, the short-term EMA is dead cross, and overbought occurs.
하이킨아시 캔들의 시가가 종가보다 크고 단기 EMA가 데드클로스이고 과매수가 발생.
※Long만 사용가능한 전략입니다.(This is a strategy that only Long can use.)
Default Options(기본설정)
Short-Term Volatility (단기변동성) : 96 (※1)
Long-Term Volatility (장기변동성) : 97 (※1)
Take Profit (%) (익절) : 15%
Trailing Stop(%) (트레일링 스탑) : 10%
(※1) The lower the value, the more aggressive the buy.(값이 낮을수록 매수가 공격적입니다.)
Hophop Reversion Strategy
█ OVERVIEW
Mean reversion is a financial term assuming that an asset's price will tend to converge to the average price over time.
Due to the trending nature of the crypto markets, mean reversion on a high timeframe could be pretty dangerous. When it comes to running mean reversion strategy on low timeframe, commission and slippage may cost more than strategy gains.
In this strategy, I tried to achieve being conservative in the trending market while avoiding trades if necessary and trading high probability reversion opportunities .
█ CONCEPTS
Strategy is build based on the combination of the momentum and the historical / implied volatility; when the price exceeds the potential volatility range, the strategy places the orders, and the target point is the mean of the expected range high and range low.
The range low and high lines displayed on the chart shows where to short or long, to make sure that the orders are limit orders; orders are placed 0.5% above/below the ranges!
Key information about the strategy
• All the orders are limit entry
• 0.02% commission is included in the backtest
• 30 ticks set for Verify Price Limit for Orders
• 30 ticks set for Slippage
• Initial version does not include the money management and hard stops hence you need to be extra cautious in trending markets
• Restricted to be used for BTC and ETH for 15 min timeframe
█ Ozet
Ortalamaya dönme, bir varlığın fiyatının zaman içinde ortalama fiyata yakınsama eğiliminde olacağını varsayan bir finansal terimdir.
Kripto piyasalarının trend egilimli doğası nedeniyle, yüksek zaman diliminde ortalamaya dönüş oldukça tehlikeli olabilir.
Ortalama geri dönüş stratejisini düşük zaman diliminde calistirmak söz konusu olduğunda, komisyon ve kayma, strateji kazanımlarından daha pahalıya mal olabilir.
Bu stratejide, gerektiğinde alım satımlardan kaçınırken ve yüksek olasılıklı ortalamaya dönüş fırsatlarını degerlendiren, trend olan piyasada ise isleme girerken temkinli olmasi uzerine calistim
█ Aciklama
Strateji, momentum ve tarihsel / zımni oynaklığın birleşimine dayalı olarak inşa edilmistir; fiyat potansiyel oynaklık aralığını aştığında, strateji emirleri verir ve hedef nokta, beklenen yüksek aralığın ve düşük aralığın ortalamasıdır.
Grafikte görüntülenen aralık alt ve üst satırları,
Stratejiye ait onemli bilgiler/b]
• Tüm emirler limit emirdir girişlidir
• Backtest performansinda %0.02 komisyon dahildir
• Limit Emir fiyat dogrulamasi icin 30 tick bekleme kullanilmistir
• Slippage için 30 tick bekleme kullanilmistir
• İlk sürüm para yönetimini ve stoploss içermez, bu nedenle trend olan piyasalarda ekstra dikkatli olmanız gerekir.
• 15 dakikalık zaman dilimi ile BTC ve ETH için kullanımla sınırlıdır
Emirlerin limit emir olduğundan emin olmak için nerede short veya long isleme girilecegini gosteren cizgilerin %0.5 üstünde/altında verilir!
Combo Backtest 123 Reversal & T3 Averages This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This indicator plots the moving average described in the January, 1998 issue
of S&C, p.57, "Smoothing Techniques for More Accurate Signals", by Tim Tillson.
This indicator plots T3 moving average presented in Figure 4 in the article.
T3 indicator is a moving average which is calculated according to formula:
T3(n) = GD(GD(GD(n))),
where GD - generalized DEMA (Double EMA) and calculating according to this:
GD(n,v) = EMA(n) * (1+v)-EMA(EMA(n)) * v,
where "v" is volume factor, which determines how hot the moving average’s response
to linear trends will be. The author advises to use v=0.7.
When v = 0, GD = EMA, and when v = 1, GD = DEMA. In between, GD is a less aggressive
version of DEMA. By using a value for v less than1, trader cure the multiple DEMA
overshoot problem but at the cost of accepting some additional phase delay.
In filter theory terminology, T3 is a six-pole nonlinear Kalman filter. Kalman
filters are ones that use the error — in this case, (time series - EMA(n)) —
to correct themselves. In the realm of technical analysis, these are called adaptive
moving averages; they track the time series more aggres-sively when it is making large
moves. Tim Tillson is a software project manager at Hewlett-Packard, with degrees in
mathematics and computer science. He has privately traded options and equities for 15 years.
WARNING:
- For purpose educate only
- This script to change bars colors.
EMR Strategy [H1 Backtesting]EMR Strategy base on EMA, MACD and RSI to supply signal on time frame H1.
Details of Rule as below:
===
1.EMA
+ Time frame: H1
+ Periods: 25, 100 (~ EMA 25 H4), 600 (~ EMA 25 D1)
===
2.MACD
+ Time frame: H1
+ Periods: 12,26,9
===
3.RSI
+ Time frame: H1
+ Periods: 14
===
4.Trading Rule
4.1.Long Position
+ MACD>0 and RSI>50 and close price moving above EMA 25
+ Close price crossed EMA 100 or crossed EMA 600 at the first time
4.2.Short Position
+ MACD<0 and RSI<50 and close price moving below EMA 25
+ Close price crossed EMA 100 or crossed EMA 600 at the first time
===
5.Money Management
+ This strategy concentrate into winrate.
+ So use trailing stop to protect your profits.
+ And use stoploss to avoid big loss on trades.
Combo Backtest 123 Reversal & Stochastic Crossover This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This back testing strategy generates a long trade at the Open of the following
bar when the %K line crosses below the %D line and both are above the Overbought level.
It generates a short trade at the Open of the following bar when the %K line
crosses above the %D line and both values are below the Oversold level.
WARNING:
- For purpose educate only
- This script to change bars colors.
Webhook Starter Kit [HullBuster]
Introduction
This is an open source strategy which provides a framework for webhook enabled projects. It is designed to work out-of-the-box on any instrument triggering on an intraday bar interval. This is a full featured script with an emphasis on actual trading at a brokerage through the TradingView alert mechanism and without requiring browser plugins.
The source code is written in a self documenting style with clearly defined sections. The sections “communicate” with each other through state variables making it easy for the strategy to evolve and improve. This is an excellent place for Pine Language beginners to start their strategy building journey. The script exhibits many Pine Language features which will certainly ad power to your script building abilities.
This script employs a basic trend follow strategy utilizing a forward pyramiding technique. Trend detection is implemented through the use of two higher time frame series. The market entry setup is a Simple Moving Average crossover. Positions exit by passing through conditional take profit logic. The script creates ten indicators including a Zscore oscillator to measure support and resistance levels. The indicator parameters are exposed through 47 strategy inputs segregated into seven sections. All of the inputs are equipped with detailed tool tips to help you get started.
To improve the transition from simulation to execution, strategy.entry and strategy.exit calls show enhanced message text with embedded keywords that are combined with the TradingView placeholders at alert time. Thereby, enabling a single JSON message to generate multiple execution events. This is genius stuff from the Pine Language development team. Really excellent work!
This document provides a sample alert message that can be applied to this script with relatively little modification. Without altering the code, the strategy inputs can alter the behavior to generate thousands of orders or simply a few dozen. It can be applied to crypto, stocks or forex instruments. A good way to look at this script is as a webhook lab that can aid in the development of your own endpoint processor, impress your co-workers and have hours of fun.
By no means is a webhook required or even necessary to benefit from this script. The setups, exits, trend detection, pyramids and DCA algorithms can be easily replaced with more sophisticated versions. The modular design of the script logic allows you to incrementally learn and advance this script into a functional trading system that you can be proud of.
Design
This is a trend following strategy that enters long above the trend line and short below. There are five trend lines that are visible by default but can be turned off in Section 7. Identified, in frequency order, as follows:
1. - EMA in the chart time frame. Intended to track price pressure. Configured in Section 3.
2. - ALMA in the higher time frame specified in Section 2 Signal Line Period.
3. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
4. - Linear Regression in the higher time frame specified in Section 2 Signal Line Period.
5. - DEMA in the higher time frame specified in Section 2 Trend Line Period.
The Blue, Green and Orange lines are signal lines are on the same time frame. The time frame selected should be at least five times greater than the chart time frame. The Purple line represents the trend line for which prices above the line suggest a rising market and prices below a falling market. The time frame selected for the trend should be at least five times greater than the signal lines.
Three oscillators are created as follows:
1. Stochastic - In the chart time frame. Used to enter forward pyramids.
2. Stochastic - In the Trend period. Used to detect exit conditions.
3. Zscore - In the Signal period. Used to detect exit conditions.
The Stochastics are configured identically other than the time frame. The period is set in Section 2.
Two Simple Moving Averages provide the trade entry conditions in the form of a crossover. Crossing up is a long entry and down is a short. This is in fact the same setup you get when you select a basic strategy from the Pine editor. The crossovers are configured in Section 3. You can see where the crosses are occurring by enabling Show Entry Regions in Section 7.
The script has the capacity for pyramids and DCA. Forward pyramids are enabled by setting the Pyramid properties tab with a non zero value. In this case add on trades will enter the market on dips above the position open price. This process will continue until the trade exits. Downward pyramids are available in Crypto and Range mode only. In this case add on trades are placed below the entry price in the drawdown space until the stop is hit. To enable downward pyramids set the Pyramid Minimum Span In Section 1 to a non zero value.
This implementation of Dollar Cost Averaging (DCA) triggers off consecutive losses. Each loss in a run increments a sequence number. The position size is increased as a multiple of this sequence. When the position eventually closes at a profit the sequence is reset. DCA is enabled by setting the Maximum DCA Increments In Section 1 to a non zero value.
It should be noted that the pyramid and DCA features are implemented using a rudimentary design and as such do not perform with the precision of my invite only scripts. They are intended as a feature to stress test your webhook endpoint. As is, you will need to buttress the logic for it to be part of an automated trading system. It is for this reason that I did not apply a Martingale algorithm to this pyramid implementation. But, hey, it’s an open source script so there is plenty of room for learning and your own experimentation.
How does it work
The overall behavior of the script is governed by the Trading Mode selection in Section 1. It is the very first input so you should think about what behavior you intend for this strategy at the onset of the configuration. As previously discussed, this script is designed to be a trend follower. The trend being defined as where the purple line is predominately heading. In BiDir mode, SMA crossovers above the purple line will open long positions and crosses below the line will open short. If pyramiding is enabled add on trades will accumulate on dips above the entry price. The value applied to the Minimum Profit input in Section 1 establishes the threshold for a profitable exit. This is not a hard number exit. The conditional exit logic must be satisfied in order to permit the trade to close. This is where the effort put into the indicator calibration is realized. There are four ways the trade can exit at a profit:
1. Natural exit. When the blue line crosses the green line the trade will close. For a long position the blue line must cross under the green line (downward). For a short the blue must cross over the green (upward).
2. Alma / Linear Regression event. The distance the blue line is from the green and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 6 and relies on the period and length set in Section 2. A long position will exit on an upward thrust which exceeds the activation threshold. A short will exit on a downward thrust.
3. Exponential event. The distance the yellow line is from the blue and the relative speed the cross is experiencing determines this event. The activation thresholds are set in Section 3 and relies on the period and length set in the same section.
4. Stochastic event. The purple line stochastic is used to measure overbought and over sold levels with regard to position exits. Signal line positions combined with a reading over 80 signals a long profit exit. Similarly, readings below 20 signal a short profit exit.
Another, optional, way to exit a position is by Bale Out. You can enable this feature in Section 1. This is a handy way to reduce the risk when carrying a large pyramid stack. Instead of waiting for the entire position to recover we exit early (bale out) as soon as the profit value has doubled.
There are lots of ways to implement a bale out but the method I used here provides a succinct example. Feel free to improve on it if you like. To see where the Bale Outs occur, enable Show Bale Outs in Section 7. Red labels are rendered below each exit point on the chart.
There are seven selectable Trading Modes available from the drop down in Section 1:
1. Long - Uses the strategy.risk.allow_entry_in to execute long only trades. You will still see shorts on the chart.
2. Short - Uses the strategy.risk.allow_entry_in to execute short only trades. You will still see long trades on the chart.
3. BiDir - This mode is for margin trading with a stop. If a long position was initiated above the trend line and the price has now fallen below the trend, the position will be reversed after the stop is hit. Forward pyramiding is available in this mode if you set the Pyramiding value in the Properties tab. DCA can also be activated.
4. Flip Flop - This is a bidirectional trading mode that automatically reverses on a trend line crossover. This is distinctively different from BiDir since you will get a reversal even without a stop which is advantageous in non-margin trading.
5. Crypto - This mode is for crypto trading where you are buying the coins outright. In this case you likely want to accumulate coins on a crash. Especially, when all the news outlets are talking about the end of Bitcoin and you see nice deep valleys on the chart. Certainly, under these conditions, the market will be well below the purple line. No margin so you can’t go short. Downward pyramids are enabled for Crypto mode when two conditions are met. First the Pyramiding value in the Properties tab must be non zero. Second the Pyramid Minimum Span in Section 1 must be non zero.
6. Range - This is a counter trend trading mode. Longs are entered below the purple trend line and shorts above. Useful when you want to test your webhook in a market where the trend line is bisecting the signal line series. Remember that this strategy is a trend follower. It’s going to get chopped out in a range bound market. By turning on the Range mode you will at least see profitable trades while stuck in the range. However, when the market eventually picks a direction, this mode will sustain losses. This range trading mode is a rudimentary implementation that will need a lot of improvement if you want to create a reliable switch hitter (trend/range combo).
7. No Trade. Useful when setting up the trend lines and the entry and exit is not important.
Once in the trade, long or short, the script tests the exit condition on every bar. If not a profitable exit then it checks if a pyramid is required. As mentioned earlier, the entry setups are quite primitive. Although they can easily be replaced by more sophisticated algorithms, what I really wanted to show is the diminished role of the position entry in the overall life of the trade. Professional traders spend much more time on the management of the trade beyond the market entry. While your trade entry is important, you can get in almost anywhere and still land a profitable exit.
If DCA is enabled, the size of the position will increase in response to consecutive losses. The number of times the position can increase is limited by the number set in Maximum DCA Increments of Section 1. Once the position breaks the losing streak the trade size will return the default quantity set in the Properties tab. It should be noted that the Initial Capital amount set in the Properties tab does not affect the simulation in the same way as a real account. In reality, running out of money will certainly halt trading. In fact, your account would be frozen long before the last penny was committed to a trade. On the other hand, TradingView will keep running the simulation until the current bar even if your funds have been technically depleted.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that the endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Webhook Integration
The TradingView alerts dialog provides a way to connect your script to an external system which could actually execute your trade. This is a fantastic feature that enables you to separate the data feed and technical analysis from the execution and reporting systems. Using this feature it is possible to create a fully automated trading system entirely on the cloud. Of course, there is some work to get it all going in a reliable fashion. Being a strategy type script place holders such as {{strategy.position_size}} can be embedded in the alert message text. There are more than 10 variables which can write internal script values into the message for delivery to the specified endpoint.
Entry and exit use the strategy.entry and strategy.exit calls respectfully. The alert_message parameter has special keywords that my endpoint expects to properly calculate position size and message sequence. The alert message will embed these keywords in the JSON object through the {{strategy.order.alert_message}} placeholder. You should use whatever keywords are expected from the endpoint you intend to webhook in to.
Here is an excerpt of the fields I use in my webhook signal:
"broker_id": "kraken",
"account_id": "XXX XXXX XXXX XXXX",
"symbol_id": "XMRUSD",
"action": "{{strategy.order.action}}",
"strategy": "{{strategy.order.id}}",
"lots": "{{strategy.order.contracts}}",
"price": "{{strategy.order.price}}",
"comment": "{{strategy.order.alert_message}}",
"timestamp": "{{time}}"
Though TradingView does a great job in dispatching your alert this feature does come with a few idiosyncrasies. Namely, a single transaction call in your script may cause multiple transmissions to the endpoint. If you are using placeholders each message describes part of the transaction sequence. A good example is closing a pyramid stack. Although the script makes a single strategy.close() call, the endpoint actually receives a close message for each pyramid trade. The broker, on the other hand, only requires a single close. The incongruity of this situation is exacerbated by the possibility of messages being received out of sequence. Depending on the type of order designated in the message, a close or a reversal. This could have a disastrous effect on your live account. This broker simulator has no idea what is actually going on at your real account. Its just doing the job of running the simulation and sending out the computed results. If your TradingView simulation falls out of alignment with the actual trading account lots of really bad things could happen. Like your script thinks your are currently long but the account is actually short. Reversals from this point forward will always be wrong with no one the wiser. Human intervention will be required to restore congruence. But how does anyone find out this is occurring? In closed systems engineering this is known as entropy. In practice your webhook logic should be robust enough to detect these conditions. Be generous with the placeholder usage and give the webhook code plenty of information to compare states. Both issuer and receiver. Don’t blindly commit incoming signals without verifying system integrity.
Setup
The following steps provide a very brief set of instructions that will get you started on your first configuration. After you’ve gone through the process a couple of times, you won’t need these anymore. It’s really a simple script after all. I have several example configurations that I used to create the performance charts shown. I can share them with you if you like. Of course, if you’ve modified the code then these steps are probably obsolete.
There are 47 inputs divided into seven sections. For the most part, the configuration process is designed to flow from top to bottom. Handy, tool tips are available on every field to help get you through the initial setup.
Step 1. Input the Base Currency and Order Size in the Properties tab. Set the Pyramiding value to zero.
Step 2. Select the Trading Mode you intend to test with from the drop down in Section 1. I usually select No Trade until I’ve setup all of the trend lines, profit and stop levels.
Step 3. Put in your Minimum Profit and Stop Loss in the first section. This is in pips or currency basis points (chart right side scale). Remember that the profit is taken as a conditional exit not a fixed limit. The actual profit taken will almost always be greater than the amount specified. The stop loss, on the other hand, is indeed a hard number which is executed by the TradingView broker simulator when the threshold is breached.
Step 4. Apply the appropriate value to the Tick Scalar field in Section 1. This value is used to remove the pipette from the price. You can enable the Summary Report in Section 7 to see the TradingView minimum tick size of the current chart.
Step 5. Apply the appropriate Price Normalizer value in Section 1. This value is used to normalize the instrument price for differential calculations. Basically, we want to increase the magnitude to significant digits to make the numbers more meaningful in comparisons. Though I have used many normalization techniques, I have always found this method to provide a simple and lightweight solution for less demanding applications. Most of the time the default value will be sufficient. The Tick Scalar and Price Normalizer value work together within a single calculation so changing either will affect all delta result values.
Step 6. Turn on the trend line plots in Section 7. Then configure Section 2. Try to get the plots to show you what’s really happening not what you want to happen. The most important is the purple trend line. Select an interval and length that seem to identify where prices tend to go during non-consolidation periods. Remember that a natural exit is when the blue crosses the green line.
Step 7. Enable Show Event Regions in Section 7. Then adjust Section 6. Blue background fills are spikes and red fills are plunging prices. These measurements should be hard to come by so you should see relatively few fills on the chart if you’ve set this up as intended. Section 6 includes the Zscore oscillator the state of which combines with the signal lines to detect statistically significant price movement. The Zscore is a zero based calculation with positive and negative magnitude readings. You want to input a reasonably large number slightly below the maximum amplitude seen on the chart. Both rise and fall inputs are entered as a positive real number. You can easily use my code to create a separate indicator if you want to see it in action. The default value is sufficient for most configurations.
Step 8. Turn off Show Event Regions and enable Show Entry Regions in Section 7. Then adjust Section 3. This section contains two parts. The entry setup crossovers and EMA events. Adjust the crossovers first. That is the Fast Cross Length and Slow Cross Length. The frequency of your trades will be shown as blue and red fills. There should be a lot. Then turn off Show Event Regions and enable Display EMA Peaks. Adjust all the fields that have the word EMA. This is actually the yellow line on the chart. The blue and red fills should show much less than the crossovers but more than event fills shown in Step 7.
Step 9. Change the Trading Mode to BiDir if you selected No Trades previously. Look on the chart and see where the trades are occurring. Make adjustments to the Minimum Profit and Stop Offset in Section 1 if necessary. Wider profits and stops reduce the trade frequency.
Step 10. Go to Section 4 and 5 and make fine tuning adjustments to the long and short side.
Example Settings
To reproduce the performance shown on the chart please use the following configuration: (Bitcoin on the Kraken exchange)
1. Select XBTUSD Kraken as the chart symbol.
2. On the properties tab set the Order Size to: 0.01 Bitcoin
3. On the properties tab set the Pyramiding to: 12
4. In Section 1: Select “Crypto” for the Trading Model
5. In Section 1: Input 2000 for the Minimum Profit
6. In Section 1: Input 0 for the Stop Offset (No Stop)
7. In Section 1: Input 10 for the Tick Scalar
8. In Section 1: Input 1000 for the Price Normalizer
9. In Section 1: Input 2000 for the Pyramid Minimum Span
10. In Section 1: Check mark the Position Bale Out
11. In Section 2: Input 60 for the Signal Line Period
12. In Section 2: Input 1440 for the Trend Line Period
13. In Section 2: Input 5 for the Fast Alma Length
14. In Section 2: Input 22 for the Fast LinReg Length
15. In Section 2: Input 100 for the Slow LinReg Length
16. In Section 2: Input 90 for the Trend Line Length
17. In Section 2: Input 14 Stochastic Length
18. In Section 3: Input 9 Fast Cross Length
19. In Section 3: Input 24 Slow Cross Length
20. In Section 3: Input 8 Fast EMA Length
21. In Section 3: Input 10 Fast EMA Rise NetChg
22. In Section 3: Input 1 Fast EMA Rise ROC
23. In Section 3: Input 10 Fast EMA Fall NetChg
24. In Section 3: Input 1 Fast EMA Fall ROC
25. In Section 4: Check mark the Long Natural Exit
26. In Section 4: Check mark the Long Signal Exit
27. In Section 4: Check mark the Long Price Event Exit
28. In Section 4: Check mark the Long Stochastic Exit
29. In Section 5: Check mark the Short Natural Exit
30. In Section 5: Check mark the Short Signal Exit
31. In Section 5: Check mark the Short Price Event Exit
32. In Section 5: Check mark the Short Stochastic Exit
33. In Section 6: Input 120 Rise Event NetChg
34. In Section 6: Input 1 Rise Event ROC
35. In Section 6: Input 5 Min Above Zero ZScore
36. In Section 6: Input 120 Fall Event NetChg
37. In Section 6: Input 1 Fall Event ROC
38. In Section 6: Input 5 Min Below Zero ZScore
In this configuration we are trading in long only mode and have enabled downward pyramiding. The purple trend line is based on the day (1440) period. The length is set at 90 days so it’s going to take a while for the trend line to alter course should this symbol decide to node dive for a prolonged amount of time. Your trades will still go long under those circumstances. Since downward accumulation is enabled, your position size will grow on the way down.
The performance example is Bitcoin so we assume the trader is buying coins outright. That being the case we don’t need a stop since we will never receive a margin call. New buy signals will be generated when the price exceeds the magnitude and speed defined by the Event Net Change and Rate of Change.
Feel free to PM me with any questions related to this script. Thank you and happy trading!
CFTC RULE 4.41
These results are based on simulated or hypothetical performance results that have certain inherent limitations. Unlike the results shown in an actual performance record, these results do not represent actual trading. Also, because these trades have not actually been executed, these results may have under-or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated or hypothetical trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to these being shown.
Ultimate Scalper by @DaviddTechThis script turns out to be a great scalper for Crypto.
Long
* Looks for a pullback in MACD
* EMA 50 over EMA 200
Short
* Looks for a pullback in MACD
* EMA 50 below EMA 200
VWAP and RSI can be used for confluence.
WARNING:
- For purpose educate only - My mission is to debunk fake strategies with code to find THE ONE.
- Plots EMAs and other values on chart.
- This script to change bars colours.
Release Notes: Change the description tabs
MACD 5 iN 1 [Pro-Tool]introducing MACD Which has different indicators inside,
And not only that, five different strategies have also been included in this indicator.
Strategy №1:👉 MACD Crossover Signal Line
Strategy №2:👉 MACD Crossover + MACD Overbought Section (for ignore false Crossover signals)
Strategy №3:👉 MACD Crossover + Market Close should b greater tha MOVING AVERAGE
Strategy №4:👉 MACD Crossover + Market Close should b greater tha MOVING AVERAGE ZONE
Strategy №5:👉 MACD Crossover + RSI Close should b greater tha 50 Level (or whatever level you choose)
also 5 types of MOVING AVERAGE you can choose
1: Simple Moving Average ( SMA )
2: Exponential Moving Average ( EMA )
3: Weighted Moving Average ( WMA )
4: Volume Weighted Moving Average ( VWMA )
5: Relative Moving Average (RMA)
and you can customize MACD Colors + Widths + Signals and MACD lines, and also can Hide or Unhide Histogram / Cross Sign / MACD Zone Color
hope so you like it, 🥰
Investing and trading in cryptocurrencies is very risky, as anything can happen at any time.
***NOT FINANCIAL, LEGAL, OR TAX ADVICE! JUST OPINION! I AM NOT AN EXPERT! I DO NOT GUARANTEE A PARTICULAR OUTCOME I HAVE NO INSIDE KNOWLEDGE! YOU NEED TO DO YOUR OWN RESEARCH AND MAKE YOUR OWN DECISIONS! THIS IS JUST EDUCATION & ENTERTAINMENT! USE ALTCOIN DAILY AS A STARTING OFF POINT!
PSAR + MACD + EMA StrategyIndicators used:
MACD
EMA (default value 200)
PSAR
Entry Conditions for Long
- Price must be above the EMA 200
- PSAR dot below price
- Crossover on the MACD
Entry Conditions for Short
- Price must be below the EMA 200
- PSAR dot above price
- Cross under on the MACD
Stop Loss & Take Proft
Stop loss is set to go on the first formed PSAR dot from the entry
The take profit by default is set to 1.1 of the risk, this is changeable in the settings
Settings
- There is an option to change the backtest range,
- Options to customise MACD entry conditions
- Options to change the MACD, PSAR and EMA inputs
- Options to Plot Take profit/Stop loss as well as the other indicators
MACD + CMF + EMA + Supertrend by TradeSmartHello everyone and welcome to our first script release!
This script is one of many upcoming scripts. This one is a test for us, how it works, how you guys like this kind of stuff, and for feedback what we should change/improve at.
SCRIPT IS OPTIMIZED FOR:
EUR/USD 30 MINUTE TIMEFRAME
Video of the Strategy:
Search for “MACD + CMF + 200 EMA + Supertrend Trading Strategy Tested 100 Times with Great Results!” on our channel.
In this video you can find the exact strategy we programmed, just one added feature: Supertrend trailing stop loss. (position gets closed once the price hits the Supertrend indicator)
Now you can modify the following:
MACD settings
Supertrend settings
EMA settings
CMF settings
We will update the script with more and more features.
The first update will be:
Modifiable risk to reward ratio.
I will make a video of how to use this indicator next week, explaining all the features and more!
Hope you like it! Don't forget to let us know what we should change or improve. Thanks, and have a great day!
STRATEGY ENTRY RULES
LONG
When CMF is above 0 and price is under EMA. Also MACD has made a double cross above the zero line (meaning one cross down and one cross up by the MACD line). Then go long!
Note:
MACD or Signal must return under 0 in order to start a new position
If either of the MACD lines touches the 0 line before entry, we skip the trade and wait for the next signal.
SHORT
When CMF is under 0 and price is under EMA. Also MACD has made a double cross under the zero line (meaning one cross up and one cross down by the MACD line). Then go short!
Note:
MACD or Signal must return under 0 in order to start a new position.
If either of the MACD lines touches the 0 line before entry, we skip the trade and wait for the next signal.
TAKE PROFIT
When price hits the exit price (calculated from stop loss with the risk ratio), then exit with 50% of the position. The other 50% will stay open until the price hits the supertrend or the base stop loss.
STOP LOSS
When price hits stop loss then exit the position. Stop loss is calculated from the Supertrend and it is a trailing one, meaning it changes based on the movement of the price.
QUANTITY TO BUY
The quantity to buy is based on the Risk Per Trade % attribute. This means that we can set how much money we want to risk on one trade. Meaning that if we lose that particular position, then a Risk Per Trade % value of our equity will be lost.
Example: if you set the Risk Per Trade % to 1 % and you have a 100$ account balance, then if you loose the trade you will loose 1$ max.