Bjorgum AutoTrailOne Time Trade Risk Management
Incorporating the new interactive feature, this script is meant as a one time trailing stop for the active trader to manage positional risk of an ongoing trade. As a crypto trader or Fx trader, many may find themselves in a position late into the evening, or perhaps daily life is calling while a trade progresses in their favor. Adding a trailing stop to a position thats trending can help to keep you in the trade and lock in gains if things turn around when you are unable to react.
To use the trail, the user would add the script to the chart. Once added, a set of crosshairs will appear allowing the user to choose a point to begin. Often choosing to start a trail from a swing high/ low can be an ideal option. This tends to provide some protection for a stop by placing it under support for a long trade or above resistance for a short trade.
Price based trail
The trail will automatically plot and the offset is a factor of the distance from price action selected by the crosshairs. If placed above price action the script will plot a short trail, if placed below it will trail for a long position.
Additionally, there are several other trail types other than price based. There is also percent based, which offsets the trail as a percent from close. A hard stop is placed at the cross hair value, then once the distance is exceeded by the percentage specified, the trail begins.
There are 2 more volatility based trails. There is a PSAR trail which can provide quicker and tighter stops that accelerate with the trend locking in gains faster, and an ATR trail that keeps a distance from price action as a function of volatility. Volatility levels can be adjusted from the menu.
Volatility based trail (ATR)
Volatility based trail (PSAR)
Lastly, within the code for more the more technical savvy, is some starting setups for string alerts to be sent to exchanges via 3rd party or custom API applications. Some string manipulation is required for specific providers to meet their requirements, but there is some building block alerts that will take the ticker symbol, recognize the asset your trading (Fx, Crypto, etc) and take input quantity or exchange names from the settings via inputs.
Complex strings can be built to perform almost any trade related task when to comes to alerts via web hook. A little setup this way with some technology to back your system can mean a semi-automated half man, half machine setup that actually manages your trail stop while you cannot. For those that don’t go this far, there is some basic alert functionality that well trigger when a trail is hit so you can react and make a decision.
Please note that for now, interactive mode is engaged only when the script is added to the chart. Additional stops, or for adjustments to be made it is best to add a new version. Also as real trades could be at play managing an actual position, alerts are designed to go off only once to ensure no duplicate orders are sent meaning alerts are not reoccurring. Once an alert is triggered, a new trail is to be set up.
A modified version of the TradingView built in SAR equation was used in this script. To provide the value of the SAR on the stop candle, it was necessary to alter the equation to extract this value as the regular SAR “flips” at this point. Thank you to TradingView for supplying access to the built in formula so that this SAR could behave the same as the built-in function outside of these alterations
Example of SAR value maintained in trigger candle
Cheers and happy trading.
Krypto
BitMEX BTC Volatility IndexThis indicator displays the BitMEX BTC Volatility Index ( BVOL24H ) as an indicator and it can be compared to the VIX of the cryptocurrencies.
more information about how BVOL24H is calculated can be found here: www.bitmex.com
Symbol can be changed in the parameters
CRYPTO ECLIPSEWelcome to CRYPTO ECLIPSE!
If you see the market as a game between buyers and sellers, CRYPTO ECLIPSE is the EASY MODE.
Don't believe in any word I wrote, but please don't doubt about it until you TEST IT. Just go ahead and take your own conclusions, maybe this script changes your life, like it changed mine.
What would be like if you could see the markets through the eyes of a trader with many years of experience? (and If you are already this trader, you could add this as a live second opnion)
Imagine if you could consistently predcit buyers and sellers actions, attempts and rejections. That's what Price action technical analysis tries, but price action often feels like very subjective and to succeed and learn it, you will probably need at least 4 years of trading, winning and loosing to find consistancy, that's the process. CRYPTO ECLIPSE will show how you will see the market after this years spent, You''ll be skipping this years.
CRYPTO ECLIPSE is a setup that translates the market to you and give you the view of the market as it is, and not only how it was in the past. Differently from almost all other indicators i've seen in my life, CRYPTO ECLIPSE is a setup focused in PREDICT, not REACT. In my opnion that's why indicators not work well, they are too focused in the past, giving late decisions.
Truth be told, it's sounds good, but how do I use it?
I will explain you the main features, what you need to do is: Take some time to learn it, mess with the configs. Until you see the chart as you believe is the best predict scenario for the past, and then just sit and see how it will keep predicting the next moviments. Well, it works for me :)
Why am I renting this setup?
I am not. This is made for you to test for free, and for those who this setup makes all sense, we will build a small comunity around it. Just watch as we go, or Join us.
Before I forget, the setup is also a screener to track the 6 conditions above in the last 1-5 periods.
Main Features description:
BAR COLOR 2 = Strong Buyers domain(Candle's color)
BAR COLOR 3 = Strong Sellers domain(Candle's color)
BAR COLOR 0 e 1 = Fine Tuning(Advanced) There are 3 main ways to use it:
-Standard, following the same 2 and 3 bar colors.
-Changing both 0 and 1 bar colors. You can use Orange or pink or white colors for both 0 and 1, or other any color, try to use one that does not match with green or red for distinction. Consider the 0 and 1 bars as trend changing in course, or the breath of the market before a trend continuation (pullback).
Another option, that's indicated for Professionals only: change bar zero to dark green and 1 to a lighter red. This way you will see the gain and loose game in real time, take some time and you will see dark red going to lighter red will indicate a seller's weakness and the oposite for the buyers. If you are already a PRO, go ahead and play with these 2 options.
BP= STRONG BUYERS DOMAN
BPD= STRONG BUYERS DOMAN DECREASING
SP= STRONG SELLERS DOMAN
SPD= STRONG SELLERS DOMAN DECREASING
EB= POSSIBLE EARLY BUYERS DOMAIN SIGNAL
ES= POSSIBLE EARLY SELLERS DOMAIN SIGNAL
Note that BPD AND SPD are the same as EB and ES, I made this as a double entries so we can combine two different periods. If you look close you'll learn that the periods are related to the range of past periods you want to consider.
IF you pick a low period, it will show more signals, and it willl be more sensitive to the market changes. All the signals are real things that happened there, you will see that there was always a pullback or a consolidation, since this is very sensitive it's better to traders who want what's happening all the time
If you pick a high period, it will show less signals and with significant and strong movement, there are no guesses in this signals, if it did not proceed with a strong moviment, the opposite forces rejected their attempt.
Fit to your market point of view: Mess with the period numbers until you see the signals(arrows) where you understand is the best place to take a trade in the past, and watch it repeat the alert for you in the future, same as bar colors.
Note: If you want to enter only with big movements signals, use Stronger signals and high periods. if you want to try to get the movement begin, go with the early signals, using short periods.
Play with the configs until the chart give you the confidence you want to have to trade your money.
I don't recomend to use it with many indicators, if you add more than one indicator with this, you are probably insecure, and this will be useless to you.
But go ahead and add a trend indicator, if you are a trend trader or a oscillator, if you are a oscillator guy... Whatever you need until you feel confident.
Alway remember, this is only a tool. it's your decision, this is not a buy/sell indicator (maybe in the future), this is a tool to read the market. Always trade SPOT never FUTURES, always keep your stop loss as close as you can.
Enjoy the ECLIPSE
[astropark] Trend Skywalker V2 [alarms]Dear Followers,
today I'm glad to present you Trend Skywalker V2 , the evolution of Trend Skywalker V1 indicator that you can see here below:
This indicator works on every timeframe and market, it's quite responsive to market movements, so it's especially good on volatile markets.
In this new version you have 3 trend clouds available :
a short-term one (yellow)
a mid-term one (green)
a long-term one (blue)
You can also enable an option to show all trend clouds as one, the result will be similar to a special bollinger bands tool.
Of course you can edit trend clouds analysis period and color, also you can turn on or off the cloud that you prefer.
The indicator can run 4 different kinds of strategy : one for each trend cloud individually or a mixed one.
Also the indicator tracks for you a peak profit from entry: this tracker is a suggestion for you to take profits while price goes up!
All red-green circles you see in the chart is a reminder that a peak profit label was there in the past: what does this tell you?
if price starts losing the short-term trend and you had a lot of TP suggestions, maybe trend ended and you should start consider closing your trade before you give back all your profit.
This indicator will let you set alerts on each buy/sell/close/tp label.
For backtesting, you can use the indicator here below:
This is a premium indicator , so send me a private message in order to get access to this script.
[astropark] Trend Skywalker V2 [strategy]Dear Followers,
today I'm glad to present you Trend Skywalker V2 , the evolution of Trend Skywalker V1 indicator that you can see here below:
This indicator works on every timeframe and market, it's quite responsive to market movements, so it's especially good on volatile markets.
In this new version you have 3 trend clouds available :
a short-term one (yellow)
a mid-term one (green)
a long-term one (blue)
You can also enable an option to show all trend clouds as one, the result will be similar to a special bollinger bands tool.
Of course you can edit trend clouds analysis period and color, also you can turn on or off the cloud that you prefer.
The indicator can run 4 different kinds of strategy : one for each trend cloud individually or a mixed one.
Also the indicator tracks for you a peak profit from entry: this tracker is a suggestion for you to take profits while price goes up!
All red-green circles you see in the chart is a reminder that a peak profit label was there in the past: what does this tell you?
if price starts losing the short-term trend and you had a lot of TP suggestions, maybe trend ended and you should start consider closing your trade before you give back all your profit.
On backtesting you can you test long and short setups individually or both, as well as performance in a specific time window.
This is a premium indicator , so send me a private message in order to get access to this script.
Daily HIGH/LOW strategyThis is a DAILY High/LOW strategy combined with a moving average and volume for more accuracy.
The rules are simple :
For long if we had a cross of the high with the previous high and close of the candle is above moving average and chaikin money flow volume is positive we have a long entry.
We exit when we cross down the moving average with the close of the candle.
For short if we had a crossdown of the low with the previous low and close of the candle is below moving average and chaikin money flow volume is negative we have a short entry.
We exit when we cross above the moving average with the close of the candle.
This strategy has no risk management inside so use it with caution.
If you have any questions, let me know
Godson CandleScript Symposium This script is a party of every useful trading indicator i believe in.
The primary signals are candlescript analyses
in order of most useful
CBE: Complete Bullish/Bearish Engulfing
DF/GD: These are Dragonfly and Gravestone Doji's but they also signal Harami's
BE: Bullish/Bearish Engulfing
H: Actual Harami's (these are mean't to be pre-emptive Hedge signals)
D: basic Dojis
these are also two Moving Averages
1Hr ema and 1D ema
doesn't have to be 1Hr/1D but that's the default.
you have 3 choices
A: show all signals
B: only show counter signals(these are bullish signals in a bear market; as defined by price under 1D, and vice versa), this exists for picking bottoms or counter-trend scalping.
C: only show pro trend signals(the trend is your fren... as they say)
only signals that appear 3% away from the mean(1hr ema) are shown, you can change this.
there are also signals that are meant for buying dips and selling rips, these appear when the price action significantly increases the STDEV and the price is far from the mean.
these settings can also be changed
green X: Local Bottom
red X: Locap top
candlecolor if turned on changes the color of the candle when Heiken Ashi open is the High(red) or low(green)
if you want your charts to look exactly like mine, turn off candle body, change wick colors to white and make background gridline 100% transparent.
Bagheri IG Ether v2In this version, the winning ratio has been decreased, but the Risk to Reward Ratio (RRR) has been set to be better than the previous version.
This is a technical trading strategy for Ethereum ( BINANCE:ETHUSDT ). We built and developed it on MetaEditor and optimized it with MetaTrader optimizer.
The main indicators are Donchian Channel, Oscillator of ROC , Bears Power, Balance of Power , and Simple Moving Average ( SMA ). Default values in the input panel are the best combination of these indicators, but you can change any of them and try it for better results.
Please notice that this strategy has been optimized on the 1-minute chart of Ethereum .
For each position, you can see the Take Profit (TP) and Stop Loss (SL) levels. Also, you can find the values of mentioned TP and SL in points from the input panel of the script.
Attention: The price of Ethereum has 2 decimal places.
Therefore, 3000 points for TP means 30 USDT for trading 1 BINANCE:ETHUSDT .
Vgnomics ScalperVGNOMICS Scalper is a tool to help you find great scalping opportunities. There is great variety of ways to use this indicator to get amazing results. The VGNOMICS Scalper is a new trading indicator that can be used in any market. The technique we combine with this indicator is easy to learn and apply to your trades, but practice makes perfect. This indicator is based on a mathematical calculation that always occurs, no matter which time-frame, market, asset, option, stock or crypto.
How does it work?
The script determines whether we have a bullish or bearish trend based on a combination of price action and moving averages.
When the price crosses this trend, a buy or sell signal is placed (green or red arrow). The indicator will then draw 5 colored dots extended with 5 colored lines. Every line or dot represents a possible entry / exit position. These values are chosen based of a mathematical formula on the previous price movements.
The distance between the red en the black line is calculated from the price action from the current and previous candle.
If there was a big price movement, the distance between the black and the red line will be much greater than when the price action is much smaller.
The distance between the blue and the black line is always the same distance as the distance between the red and the black line.
The yellow line will always represent the high or the low, depending on whether there's a short or a long signal.
These lines tend to be key levels between which the price will bounce.
There are many ways to use and interpret these levels.
How to trade with this indicator?
We have allot of different strategies that can be implemented for this indicator.
But we will explain 3 working strategies that work for us.
Scalp trading is one of the most profitable forms of trading. They can lead to very high profits but are very hard to achieve. In this tutorial we will show you how the VGNOMICS Scalper indicator can assist you with locating great scalp opportunities.
The tutorial below is just one example of how this indicator can be used. Every line represents a key price level at which scalping opportunities can take place.
Strategy 1
Long position:
1) A green arrow at the bottom of the screen indicates a potential long position.
2) Wait for the candle to close. (The signal is only confirmed when the candle closes)
3) Candle closed.
4) Place a limit order for a long position at the yellow line. (Entry)
5) Place a take profit order at the orange line. (Exit)
6) Order is filled. (Long position)
7) Take profit at the orange line. (Exit)
8) Yellow line (entry) gets respected most of the time.
Short position:
1) A red arrow at the bottom of the screen indicates a potential short position.
2) Wait for the candle to close. (The signal is only confirmed when the candle closes)
3) Candle closed.
4) Place a limit order for a short position at the yellow line. (Entry)
5) Place a take profit order at the orange line. (Exit)
6) Order is filled. (Short position)
7) Take profit at the orange line. (Exit)
This strategy does not include a stoploss. It's up to you to implement this indicator in your own strategy. Stoploss orders could be placed at the lines (Key price levels) below / above your entry.
For example:
The stoploss order could have been placed on the black line, or alternatively, we could have placed a second long order on the black line and exit at the yellow line while we place a stoploss order on the blue line. (see strategy 2)
The price tends to swing between these key levels and can be used in various ways.
Strategy 2
Long position (same strategy for short postion but for a red arrow):
1) A green arrow at the bottom of the screen indicates a potential long position.
2) Wait for the candle to close. (The signal is only confirmed when the candle closes)
3) Candle closed.
4) Place a limit order for a long position at the yellow line. (Entry)
5) Place a take profit order at the orange line. (Exit)
6) Order is filled. (Long position)
7) Price did not reach our profit target orange line. (Exit)
8) Place a second limit order with the same size for a long position at the black line. (Entry)
9) Order is filled. (Long position)
10) Place a take profit order at the yellow line. (Exit)
11) Take profit at the yellow line and break even order for the first position. (Exit)
Strategy 3
Long position (same strategy for short postion but for a red arrow):
1) A green arrow at the bottom of the screen indicates a potential long position.
2) Wait for the candle to close. (The signal is only confirmed when the candle closes)
3) Candle closed.
4) Place a limit order for a long position at the black line. (Entry)
5) Order is filled. (Long position)
6) Place take profit orders at the yellow/orange/red line. (Exit)
7) Take profit. (Exit)
You want to use this indicator?
Go to the VGNOMICS website.
Mid to High daily % - MA & ThresholdPurpose of this script is to provide a metric for comparing crypto volatility in terms of the % gain that can be garnished if you buy the midpoint price of the day and sell the high***. I'm specifically using bots that buy non-stop. This metric makes it easy to compare crypto coins while also providing insight on what a take profit % should be if I want to be sure it closes often instead of getting stuck in a position.
Added a few moving averages of (Mid-range to High Daily %). When these lines starts to trend down, it's time to lower the take profit % or move on to the next coin.
Decided to add a threshold so I could easily mark where I think the (Mid-range to High Daily %) is for most days.
Ex. I can mark 10% threshold and can eyeball roughly ~75% of the days in the past month or so were at or above that level. Then I know I have plenty volatility for a bot taking 5% profit. Also if you have plenty of periodic poke-through that month (let's say once a week) you might argue that you can set it to 7% if you're willing to wait about that long. Either way this metric is conservative because it is only the middle of the range to the high, a less conservative version might provide the % gain if you bought the day low and sold the day high.
***Since this calculation only takes the middle of the range and the high of the day into account, red days are volatile against a buyer but to your advantage if you are a seller. BUT if you have plenty of safety buy orders this volatility in price only means your total purchase volume increases and when/if you reach a take profit level you sell more there.
Would like to upgrade and add a separate MA line for green days and a separate MA line for red days to discern if that particular coin has a bias. Also would like to include some statistics on how many candles are above or below threshold for a certain period instead of eyeballing.
ape[x] Spot/Derivatives Indicator ( SDI )Apex spot and derivatives indicator is the latest generation of volume based algorithmic volatility trend Indicator developed by Quantdegen group.
It is a confluence of multiple modified legacy indicators to suit trader's ease to understand in which direction market is headed.
This generation of apex SDI is also developed with a vision to automate the trades with external third party bots/self scripted bots with the help of trading view alert system.
As we all know market usually outperforms legacy Indicators because they are evolved enough to attack liquidity and take stop loss of those who have poor risk management.
Apex SDI makes sure such attacks do not affect the signals by considering the most important factors like volume and expected volatility. It also confluences higher time frame arrays with lower time frame arrays to filter out the noise which might cause because of LFT volatility.
Quantdegen group is glad to announce this breakthrough in algorithmic trading indicators and make it available for public use.
Chanu Delta Strategy V3This strategy is built on the Chanu Delta Indicator, which indicates the strength of the Bitcoin market. When the Chanu Delta Indicator hits “Delta Bull” and “Delta Bear” and closes the candle, long and short signals are triggered respectively. The example shown on the screen is a default setting optimized for a 4-hour candlestick strategy based on the Bybit BTCUSDT futures market. You can use it by adjusting the setting value and modifying it to suit you.
This new version is selectable from both reference and large amplitude BTCUSD markets in order to enable fine backtesting. I recommend using BYBIT:BTCUSDT for the reference market and INDEX:BTCUSD for the large amplitude market.
If you use this strategy in conjunction with the Chanu Delta Indicator, it is convenient to anticipate alert signals in advance. Because the Chanu Delta Indicator represents the price difference based on the Bybit BTCUSDT futures market, backtesting is possible from March 2020.
▶ Improvements and originality compared to the previous version
1. Selectable BTCUSD reference and large amplitude markets
2. Improvement of the SL/TP Function
- Improved SL/TP function based on the actual entry price of the position.
- Application of SL/TP function can be turned on/off.
Crypto Market Caps (BTC, ETH, TOTAL3)RSI based Crypto Market Caps (BTC, ETH, TOTAL3) Oscillator
This oscillator displays market caps for:
BTC : CRYPTOCAP:BTC -> in orange
ETH : CRYPTOCAP:ETH -> in gray
ALT (Total crypto excl. BTC & ETH): CRYPTOCAP:TOTAL3 -> in blue
In the settings you can edit:
The 3 market cap symbols
RSI length
All colours ;-)
Hope you enjoy!
Crypto Market Cap Oscillatorthis oscillator gives helps you to select the right buy or sell moment based on the market cap of the token of your choice
It is based on a base 100 oscillator
Black plot is BTC marketcap
Gray plot is total ALT marketcap
Coloured is based on the coin of your choice
The greener the plot, the best buy opportunity
The more red the plot, the best sell opportunity
Crypto Relative PerformanceThis script plots the difference between the percentage change of the current symbol and the total crypto market change percentage.
If green, the symbol performs better than total crypto; if red, the symbol performs worse than total crypto.
Trend Fusion By CryptoScriptsWelcome to Trend Fusion! This isn't your typical moving average indicator. It's a multi-timeframe indicator that consists of 3 different moving averages AND let's you choose between EMA, SMA, WMA, VWMA, HMA, and RMA. For example, you can have the 5min 200 EMA, 15min 200 EMA, and 1 hour 200 EMA all on the SAME chart without having to switch timeframes! This helps to create an edge over the competition so you don't have to have multiple charts open and you can see everything on one screen. You can also modify each moving average to the timeframe and value of your choice.
Signals
The Trend Fusion fires a buy signal (green triangle) whenever Moving Average 1 crosses above Moving Average 2 and 3. This is great for catching a bullish trend early, especially when combined with other indicators.
The Trend Fusion fires a sell signal (red triangle) whenever Moving Average 1 crosses below Moving Average 2 and 3. This is great for catching a bearish trend early, especially when combined with other indicators.
You can also make Moving Average 2 and 3 the same value if you just want to create an alert for one moving average crossing over another. (i.e MA 1 is the 50EMA and MA 2 and 3 both have a value of 200 so you're just looking for the 50EMA to cross over the 200EMA).
This indicator is great for catching big trends and catching them early (as seen by the picture), and fires multiple buy signals or sell signals in case you didn't catch the first one so you still have time to get in the trade.
Alerts
You can also set alerts for the buy and sell signals! Just click the clock icon in the top middle of the chart and click Trend Fusion in the drop-down menu. Make sure to select "Once per bar close" so you know the signal is confirmed.
Each timeframe acts differently so make sure you experiment/backtest with each one and tailor your moving average values accordingly.
Disclaimer: Past results are not indicative of future returns.
PM me to obtain access and please let me know if you have any questions! :)
Multiple Anchored VWAP [Morty]The Anchored VWAP (aVWAP) indicator ties VWAP calculations to a specific price bar chosen by the trader. Anchored VWAP allows you to specify the price bar where calculations begin, making it easy to see whether the bulls or bears have been in charge since a very specific point in time. The starting price bar that is chosen generally marks a shift in market psychology, such as a significant high or low, earnings, news, or other announcements. The Anchored VWAP line is charted using price and volume data from that significant event onward.
This indicator plots up to 4 aVWAP lines in the chart.
Features:
- plot up to 4 aVWAP lines
- custom start date of aVWAP
- custom line color
- optional label of starting price bar
- optional custom resolution
----------------------------------------------------
锚定VWAP(aVWAP)指标将VWAP的计算与交易者选择的特定价格柱联系起来。锚定VWAP允许你指定计算开始的价格柱,使你很容易看到自一个非常具体的时间点以来,是牛市还是熊市在起作用。所选择的起始价格条通常标志着市场心理的转变,如一个重要的高点或低点、收益、新闻或其他公告。锚定VWAP线是使用从该重大事件开始的价格和成交量数据绘制的。
该指标在图表中最多绘制了4条aVWAP线。
特色:
- 绘制多达4条aVWAP线
- 自定义aVWAP的开始日期
- 自定义线的颜色
- 可选的起始价格条的标签
- 可选的自定义分辨率
Aggregated Volume Indicator - Across biggest exchangesThis indicator allows you to view the total volume across multiple exchanges at the same time.
Currently, the indicator is pulling volume from these exchanges
COINBASE
FTX
BINANCE
BITFINEX
KUCOIN
KRAKEN
The script will pull data from coins that are available on those exchanges and sum up the volume.
Exponential MA Channel, Daily Timeframe (Crypto)Moving averages are some of the most common tools for traders. Some of the most widely used ones are simple moving averages (e.g. 20SMA, 50 SMA, 100 SMA, 200SMA,...). There are endless combinations of moving averages that can be used. I prefer to use exponential moving averages because they react more quickly to price data (essentially they filter back through the data over a discrete number of timesteps, with more recent history receiving the highest weighting in the final calculation).
This script uses a combination of the 21EMA, 53 EMA, and 100EMA. The idea of this script is to provide insight into when an asset might be close to a local top/bottom by monitoring price within the middle channel (yellow, blue, and orange lines), as well as identifying longer timeframe opportunities to buy/sell by examining the upper (green) and lower (red) bands. Disclaimer: this is not a guarantee that if price enters a region, that it will be a top or bottom, it is simply an indicator to get an idea based on price history.
As far as I know, this particular combination of exponential moving averages has not yet been published. I do not have an infinite amount of time to check through the entire library of published scripts. If someone else has already done this, I was unaware. Numerical computations were performed on ETHBTC price data in order to find the coefficients used in this script. Essentially, each EMA has a multiplier of either 1, a fraction of 1, or a number larger than 1 (these are the numbers in the script being multiplied by 'out1', 'out2', 'out3'; feel free to change these and see how this changes the indicator). I have found it to be useful for myself, and hope other people can tinker with this idea. My only wish is to allow other people to use this starting point to explore for themselves. I hope that I am allowed to publish this script without it being taken down so that others can freely use it.
Recommendations: although this was fit specifically for ETHBTC, it appears useful for many crypto pairs, specifically alt-BTC pairs and crypto-USD pairs. For example, I have found it useful for BTCUSD, ETHUSD, LINKUSD, LINKBTC, ETHBTC, ADABTC, etc. Only use on the DAILY timeframe.
Average Highest High and Lowest Low Swinger StrategyThis is a full price action strategy designed for trending markets such as crypto and stocks.
Its purely made on calculations for the highest high and lowest low using 2 different length , a faster and a slower one.
With those we make multiple averages.
Rules for entry:
For long: our close of the candle is above both the average using fast and slow line
For short: our close of the candle is below both the average using fast and slow line
Rules for exit
We always exit when we have an opposite order
Caution
This strategy use no risk management system, so be careful with it
If you have any questions, let me know
ICHIMOKU Crypto Swing StrategyThis is a crypto swing strategy designed for timeframes bigger than 1h.
The main components are
ICHOMOKU
KDJ
Average High
Average Low
Rules for entry
For long: we have the ichimoku crosses between tenkan and baselines, we have a rising kdj line and at the same time we have a increase in the average high
For short: we have the ichimoku crosses between tenkan and baselines, we have a falling kdj line and at the same time we have an increase in the average low
Rules for exit
We exit when we have inverse conditions than the initial ones used for entry.
Caution
This strategy does not use a risk management, so be careful with it !
If you have any questions let me know !
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.
RSI Rising Crypto Trending StrategyThis is crypto and stock market trending strategy designed for long timeframes such as 4h+
From my tests it looks like it works better to trade crypto against crypto than trading against fiat.
Indicators used:
RSI for rising/falling of the trend
BB sidemarket
ROC sidemarket
Rules for entry
For long: RSI values are rising, and bb and roc tells us we are not in a sidemarket
For long: RSI values are falling, and bb and roc tells us we are not in a sidemarket
Rules for exit
We exit when we receive an opposite direction.
Cuation: Because this strategy uses no risk management, I recommend you takje care with it.
If you have any questions, let me know !