(IK) Grid ScriptThis is my take on a grid trading strategy. From Investopedia:
"Grid trading is most commonly associated with the foreign exchange market. Overall the technique seeks to capitalize on normal price volatility in an asset by placing buy and sell orders at certain regular intervals above and below a predefined base price."
This strategy is best used on sideways markets, without a definitive up or down major trend. Because it doesn't rely on huge vertical movement, this strategy is great for small timeframes. It only goes long. I've set initial_capital to 100 USD. default_qty_value should be your initial capital divided by your amount of grid lines. I'm also assuming a 0.1% commission per trade.
Here's the basic algorithm:
- Create a grid based on an upper-bound (strong resistance) and a lower-bound (strong support)
- Grid lines are spaced evenly between these two bounds. (I recommend anywhere between 5-10 grid lines, but this script lets you use up to 15. More gridlines = more/smaller trades)
- Identify nearest gridline above and below current price (ignoring the very closest grid line)
- If price crosses under a near gridline, buy and recalculate near gridlines
- If price crosses over a near gridline, sell and recalculate near gridlines
- Trades are entered and exited based on a FIFO system. So if price falls 3 grid lines (buy-1, buy-2, buy-3), and subsequently crosses above one grid line, only the first trade will exit (sell-1). If it falls again, it will enter a new trade (buy-4), and if it crosses above again it will sell the original second trade (sell-2). The amount of trades you can be in at once are based on the amount of grid lines you have.
This strategy has no built-in stop loss! This is not a 'set-it-and-forget-it" script. Make sure that price remains within the bounds of your grid. If prices exits above the grid, you're in the money, but you won't be making any more trades. If price exits below the grid, you're 100% staked in whatever you happen to be trading.
This script is more complicated than my last one, but should be more user friendly. Make sure to correctly set your lower-bound and upper-bound based on strong support and resistance (the default values for these are probably going to be meaningless). If you change your "Grid Quantity" (amount of grid lines) make sure to also change your 'Order Size' property under settings for proper test results (or default_qty_value in the strategy() declaration).
Sideways
Bollinger bands % Sideways indicatorDetect sideways markets (green background) vs. trending markets (red background) with this indicator. It makes use of the Bollinger bands % as its base.
RSI TrendsRSI is a momentum indicator, however most people seem to be using it to go against the momentum by trying to identify tops/bottoms using it. Its in my opinion the wrong way to be using it. It can be easily used for trend following which seems like a better use for it.
Uptrend - RSI > 60
Downtrend - RSI < 40
Sideways - RSI between 40 and 60
If however not interested in filtering for sideways trends and convert it to a long-short only strategy that stays in market all the time then it can be simply modified by setting both overbought/oversold thresholds to 50. In such a case uptrend will be above 50 and downtrend will be less than 50.
Note: wait for close for current bar to be confirmed as RSI is calculated at close
Consolidation and Breakout detectorExperimental : This script identifies the consolidation of a stock for selected time period. The consolidation period and range can be configured. 2 levels of consolidation levels can be selected. i.e Strong and medium. The range for strong and medium level of consolidation can also be configured by the user.
A movement in the direction of breakout of the consolidation level is observed most of the times. I have also added reversal line/stoploss line, so that the breakout movement is cancelled once that line is crossed by the candle close.
Currently consolidation levels are configured for 5 minute chart NSE:BANKNIFTY OANDA:NAS100USD . Can be reconfigured easily for any timeframe.
Tool: Chop and Trade Zones (v2)This is a refactored and advanced version of my filter tool "Chop and Trade Zones"
A simple yet powerful way to filter out choppy ranges or sideways moves without missing out on good trades.
It calculates the %-distance of the price to a moving average so you can ignore buy/sell signals around the center line.
The upper and lower line are thresholds to catch reversals of the trend when the distance to moving average is increasing.
New Features:
More than 60+ Moving Averages to choose from
Multi-Timeframe Selection with Repaint Protection
Signal Plot so you can access the signal from another TradingView study/strategy (0 = No Trade Zone / 1 = Long Only / 2 = Short Only / 3 = Long & Short Allowed)
Alerts for Long/Short Zones (you could enable/disable your trading bots automatically)
Tool: Chop & Trade ZonesA simple yet powerful way to filter out choppy ranges or sideways moves without missing out on good trades
It calculates the %-distance of the price to a moving average so you can ignore buy/sell signals around the center line.
The upper and lower line are thresholds to catch reversals of the trend when the distance to moving average is increasing.
Thanks @dgtrd and @imzeeshan for the inspiration 🙏
Sideways Money - Bitcoin BeatsHello, Hello, Hello,
And welcome back to Bitcoin Beats.
This is another version of my previous script, "Range Indicator - Bitcoin Beats".
Designed initially for breakouts but shows adaptive ranges and consolidation in XBTUSD(Haven't tested other assets but should do the same thing).
If we are consolidating (which is most of the time) a good strategy to trade would be to trade ranges. However, as soon as you spot the range it can feel like the range has changed so you lose out on making the monies.
This indicator plots out the average range in a consolidation.
It also shows you when the range has broken in a direction that it previously hasn't broken in. This essentially signifies the the trend changing and gives warning that trading the range may no longer be valid.
There are a few ways to trade this indicator and I will explain 2 of them here.
PLEASE TRADE AT YOUR OWN RISK. YOUR FUNDS ARE YOUR RESPONSIBILITY.
IF YOU TRADE WITH THESE STRATEGIES, YOU ARE TO BLAME FOR YOUR OWN LOSSES.
BY USING THIS INDICATOR YOU AGREE THAT I WILL NOT BE HELD LIABLE IN THE CASE OF YOU LOSING FUNDS.
Strategy 1:
- Have 2 bitmex accounts open.
- Use on the 30m, 1h, 3h or 12h.
- Long AND Short on both accounts when we hit the middle area. This is called the "Reload Zone".
- When we hit the edge of each side of the plotted range, close the positions in profit.
- You will then have 1 trade underwater.
- If the range is solid, the price will move back to the Reload Zone in which you reload you position that you took profit with.
- You then have both a Long AND Short open after 1 profitable trade.
- Rinse and repeat until you get the "STRATEGY CAUTION" message signifying that the range will most likely break soon.
Strategy 2(least profitable):
- When the "STRATEGY CAUTION" Message appears, you can long or short depending on which side it breaks toward.
- If we break down, short.
- If we break up, Long.
I wouldn't advise this second strategy if you are a beginner as the results are inconclusive and it's more of a hybrid trading strategy, meaning you have to know how to trade with price action flowing.
Usually if it is appearing volatile, you can go to a higher time frame and find the exact range it's catering to, adjusting your strategy accordingly.
See you soon,
Goodbye, from Bitcoin Beats.
Range Indicator - Bitcoin BeatsHello, Hello, Hello,
And welcome back to Bitcoin Beats.
Today I'm going to show you my Ranges Indicator. Designed initially for breakouts but an analysts mind quickly spots the other uses for this indicator.
If we are consolidating (which is most of the time) a good strategy to trade would be to trade ranges. However, as soon as you spot the range it can feel like the range has changed so you lose out on making the monies.
This indicator plots out the average range in a consolidation allowing you to take action and make those monies.
I've highlighted a profitable strategy in the picture that means you can make money on bitcoin when it goes sideways.
Usually if it is appearing volatile, you can go to a higher time frame and find the exact range it's catering to, adjusting your strategy accordingly.
The strategy I've highlighted in accordance with this indicator is longing AND shorting from the center point of a range and cashing out either side until the range breaks.
If you'd like a trial, please leave a comment and I'll add you to the list :)
See you soon,
Goodbye, from Bitcoin Beats.
Volume Flow BFBased on code by oh92 and kiasaki.
Measures volume to indicate Bull vs Bear.
Go long when green, short when red, wait patiently when white.
{CDT} v1.0 - Volatility Trend IndexHighlights areas where there is an increase in volatility and trend.
Does not determine direction, just good times to trade.
inside_bar (by cilivan)Simple script for coloring inside bars to spot them easier (color can be adjusted)