Rudimentary Grid bot ideaUsing Eulerian principles yet again, this is the beginning of my first grid bot script. Use as static S&R when trading manually. Good for SL and TP setting too.
Gridtrading
(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).
Grid Bot RSIGrid Bot Simulator. Based on RSI levels.
How it works:
Prices are divided into grids, or trade zones, that are based on RSI levels. Buys will trigger when the RSI crosses into a higher zone, after descending. Sells will trigger when the RSI crosses into a lower zone, after ascending. After triggering, a new signal will not be produced until the RSI progresses into better zone.
Standard Settings :
RSI Length
Number of Grids
RSI Type : Standard RSI or Jurik RSX (based on Everget’s formula)
Show All Grids
Experimental Features (Adjust in settings menu) :
No Trade Zone : RSI Levels where no trades will be signaled. Adjust to prevent over-buying/selling in narrow markets. Default: 35-65:
No Trade Zone (40-60)
Aggression Level : Increase aggressiveness to stack buys/sells at extreme RSI levels:
Aggression = high
Aggression = low
Market Direction : If market is trending up, the bot will skip every other sell ( = more buys than sells). If down, will skip every other buy (more sells than buys). Default: neutral.
Market Direction: down
Market Direction: neutral
Grid Bot SimulatorThis script is a grid bot simulator for ranging/choppy markets. Prices are divided into grids, or trade zones, that will trigger signals each time a new zone is entered. During ranging markets, each transaction is followed by a “take profit.” As the market starts to trend, transactions are stacked (compare to DCA), until the market consolidates. No signals are triggered above the Upper Limit or Below the Lower Limit.
Settings overview:
Upper Limit/Lower Limit : Highest and Lowest values for entire grid.
Number of Grids : Number of trade zones.
Show Grids : Show or hide all gridlines.
Show Only Current Grids : Only display the grids just above and just below the current trade zone.
High/Low for signals : If enabled, signals are triggered as soon as the price touches the next zone. If disabled, signals are triggered after bar closes. Enable this for “Once Per Bar alerts. Disable for “Once Per Bar Close” alerts.
Highlight Trade Zones
The grid bot should work well during ranging/choppy markets. Each zone will have only one trade, and then will immediately take profit in the next zone.
Ranging/Choppy Market
However, trending markets can produce multiple signals in rapid succession:
Trending Market
If the gridlines are compressing the chart space, enable the “Show Only Current Grids” in settings.
Show Only Current Grids disabled
Show Only Current Grids enabled
When changing symbols, adjust the Upper and Lower Limits to accommodate the new symbol. Otherwise, the chart will look compressed.
XBTUSD chart with ETHUSDT settings
The bot is a proof-of-concept and is considered experimental . Possible future updates will include Fibonacci grids and “smart entry/exits,” depending on the current trend. Comments and suggestions are encouraged.
Grid ToolThe core idea of this grid tool is that you have to concentrate less on the trade entries (this happens automatically time-independent but price-dependant) but rather on the validity of the macro trend. Exiting a trend when it is no longer valid is more important than entering a trade. But as long as the trend is valid, the trader participates exponentially in the overall trend.
It is advisable to start with a basic position and then "set up" the grid on this in a ratio of 1/10.
A major advantage of grid trading is that the average entry price in a trend moves further and further away from the current market price while the position continues to grow.
A small timeframe should be used so that the distance between the trades corresponds as closely as possible to the selected grid gap and since TV backtests are carried out with closed bars.
Before starting a grid, pre-analysis the market to make sure it is trending. Select the grid gap and grid position size that you are comfortable with. Monitor the trend and from time to time take some profit :).
PS: The ADX filter looks interesting.
BoilerRoomColdCaller - 3Commas Grid Bot SignalThis is very similar to 3Commas' grid bot, the range is from the previous 7 days' lowest low decreased by 3% to the previous 7 days' highest high increased by 3%, you can also adjust if you want 7 days' highest/lowest close price as your range or highest high and lowest low as your range. 10 buys and 10 sells within the range, the unit price would be (high-low)/19.
The buy signals and the sell signals will be triggered if:
- The previous close is below one specific green line (buy line), and the current close is above that specific green line, or
- The previous close is above one specific green line (buy line), and the current close is below that specific green line
Thus, whether the price is dropping below these lines or rising above these lines, a buy or sell signal will be triggered when they cross green or red lines. Your entry price will be the next open price after this candle's close reaches the lines.
Big thanks to @glaz, who helped me a lot with this script. Please give a like button and share if you like this script. Let me know if you have questions, thanks guys.
ck - 3commas GRID bot VisualisationHi,
This is a very quick script indicator to show the “grid” for an active (or one you are planning to manually configure) 3commas Grid bot.
To use, you’ll need to go to your Grid bot page in 3commas and enter the Upper and Lower Limit Values, either from the “manual” section if you are planning a new Grid bot, or from an open Grid trade by clicking the monthly button and using the Upper value (in green) and the Lower value (in red).
Have fun!