Grid Bot Parabolic [xxattaxx]🟩 The Grid Bot Parabolic, a continuation of the Grid Bot Simulator Series , enhances traditional gridbot theory by employing a dynamic parabolic curve to visualize potential support and resistance levels. This adaptability is particularly useful in volatile or trending markets, enabling traders to explore grid-based strategies and gain deeper market insights. The grids are divided into customizable trade zones that trigger signals as prices move into new zones, empowering traders to gain deeper insights into market dynamics and potential turning points.
While traditional grid bots excel in ranging markets, the Grid Bot Parabolic’s introduction of acceleration and curvature adds new dimensions, enabling its use in trending markets as well. It can function as a traditional grid bot with horizontal lines, a tilted grid bot with linear slopes, or a fully parabolic grid with curves. This dynamic nature allows the indicator to adapt to various market conditions, providing traders with a versatile tool for visualizing dynamic support and resistance levels.
🔑 KEY FEATURES 🔑
Adaptable Grid Structures (Horizontal, Linear, Curved)
Buy and Sell Signals with Multiple Trigger/Confirmation Conditions
Secondary Buy and Secondary Sell Signals
Projected Grid Lines
Customizable Grid Spacing and Zones
Acceleration and Curvature Control
Sensitivity Adjustments
📐 GRID STRUCTURES 📐
Beyond its core parabolic functionality, the Parabolic Grid Bot offers a range of grid configurations to suit different market conditions and trading preferences. By adjusting the "Acceleration" and "Curvature" parameters, you can transform the grid's structure:
Parabolic Grids
Setting both acceleration and curvature to non-zero values results in a parabolic grid.This configuration can be particularly useful for visualizing potential turning points and trend reversals. Example: Accel = 10, Curve = -10)
Linear Grids
With a non-zero acceleration and zero curvature, the grid tilts to represent a linear trend, aiding in identifying potential support and resistance levels during trending phases. Example: Accel =1.75, Curve = 0
Horizontal Grids
When both acceleration and curvature are set to zero, the indicator reverts to a traditional grid bot with horizontal lines, suitable for ranging markets. Example: Accel=0, Curve=0
⚙️ INITIAL SETUP ⚙️
1.Adding the Indicator to Your Chart
Locate a Starting Point: To begin, visually identify a price point on your chart where you want the grid to start.This point will anchor your grid.
2. Setting Up the Grid
Add the Grid Bot Parabolic Indicator to your chart. A “Start Time/Price” dialog will appear
CLICK on the chart at your chosen start point. This will anchor the start point and open a "Confirm Inputs" dialog box.
3. Configure Settings. In the dialog box, you can set the following:
Acceleration: Adjust how quickly the grid reacts to price changes.
Curve: Define the shape of the parabola.
Intervals: Determine the distance between grid levels.
If you choose to keep the default settings, with acceleration set to 0 and curve set to 0, the grid will display as traditional horizontal lines. The grid will align with your selected price point, and you can adjust the settings at any time through the indicator’s settings panel.
⚙️ CONFIGURATION AND SETTINGS ⚙️
Grid Settings
Accel (Acceleration): Controls how quickly the price reacts to changes over time.
Curve (Curvature): Defines the overall shape of the parabola.
Intervals (Grid Spacing): Determines the vertical spacing between the grid lines.
Sensitivity: Fine tunes the magnitude of Acceleration and Curve.
Buy Zones & Sell Zones: Define the number of grid levels used for potential buy and sell signals.
* Each zone is represented on the chart with different colors:
* Green: Buy Zones
* Red: Sell Zones
* Yellow: Overlap (Buy and Sell Zones intersect)
* Gray: Neutral areas
Trigger: Chooses which part of the candlestick is used to trigger a signal.
* `Wick`: Uses the high or low of the candlestick
* `Close`: Uses the closing price of the candlestick
* `Midpoint`: Uses the middle point between the high and low of the candlestick
* `SWMA`: Uses the Symmetrical Weighted Moving Average
Confirm: Specifies how a signal is confirmed.
* `Reverse`: The signal is confirmed if the price moves in the opposite direction of the initial trigger
* `Touch`: The signal is confirmed when the price touches the specified level or zone
Sentiment: Determines the market sentiment, which can influence signal generation.
* `Slope`: Sentiment is based on the direction of the curve, reflecting the current trend
* `Long`: Sentiment is bullish, favoring buy signals
* `Short`: Sentiment is bearish, favoring sell signals
* `Neutral`: Sentiment is neutral. No secondary signals will be generated
Show Signals: Toggles the display of buy and sell signals on the chart
Chart Settings
Grid Colors: These colors define the visual appearance of the grid lines
Projected: These colors define the visual appearance of the projected lines
Parabola/SWMA: Adjust colors as needed. These are disabled by default.
Time/Price
Start Time & Start Price: These set the starting point for the parabolic curve.
* These fields are automatically populated when you add the indicator to the chart and click on an initial location
* These can be adjusted manually in the settings panel, but he easiest way to change these is by directly interacting with the start point on the chart
Please note: Time and Price must be adjusted for each chart when switching assets. For example, a Start Price on BTCUSD of $60,000 will not work on an ETHUSD chart.
🤖 ALGORITHM AND CALCULATION 🤖
The Parabolic Function
At the core of the Parabolic Grid Bot lies the parabolic function, which calculates a dynamic curve that adapts to price action over time. This curve serves as the foundation for visualizing potential support and resistance levels.
The shape and behavior of the parabola are influenced by three key user-defined parameters:
Acceleration: This parameter controls the rate of change of the curve's slope, influencing its tilt or steepness. A higher acceleration value results in a more pronounced tilt, while a lower value leads to a gentler slope. This applies to both curved and linear grid configurations.
Curvature: This parameter introduces and controls the curvature or bend of the grid. A higher curvature value results in a more pronounced parabolic shape, while a lower value leads to a flatter curve or even a straight line (when set to zero).
Sensitivity: This setting fine-tunes the overall responsiveness of the grid, influencing how strongly the Acceleration and Curvature parameters affect its shape. Increasing sensitivity amplifies the impact of these parameters, making the grid more adaptable to price changes but potentially leading to more frequent adjustments. Decreasing sensitivity reduces their impact, resulting in a more stable grid structure with fewer adjustments. It may be necessary to adjust Sensitivity when switching between different assets or timeframes to ensure optimal scaling and responsiveness.
The parabolic function combines these parameters to generate a curve that visually represents the potential path of price movement. By understanding how these inputs influence the parabola's shape and behavior, traders can gain valuable insights into potential support and resistance areas, aiding in their decision-making process.
Sentiment
The Parabolic Grid Bot incorporates sentiment to enhance signal generation. The "Sentiment" input allows you to either:
Manually specify the market sentiment: Choose between 'Long' (bullish), 'Short' (bearish), or 'Neutral'.
Let the script determine sentiment based on the slope of the parabolic curve: If 'Slope' is selected, the sentiment will be considered 'Long' when the curve is sloping upwards, 'Short' when it's sloping downwards, and 'Neutral' when it's flat.
Buy and Sell Signals
The Parabolic Grid Bot generates buy and sell signals based on the interaction between the price and the grid levels.
Trigger: The "Trigger" input determines which part of the candlestick is used to trigger a signal (wick, close, midpoint, or SWMA).
Confirmation: The "Confirm" input specifies how a signal is confirmed ('Reverse' or 'Touch').
Zones: The number of "Buy Zones" and "Sell Zones" determines the areas on the grid where buy and sell signals can be generated.
When the trigger condition is met within a buy zone and the confirmation criteria are satisfied, a buy signal is generated. Similarly, a sell signal is generated when the trigger and confirmation occur within a sell zone.
Secondary Signals
Secondary signals are generated when a regular buy or sell signal contradicts the prevailing sentiment. For example:
A buy signal in a bearish market (Sentiment = 'Short') would be considered a "secondary buy" signal.
A sell signal in a bullish market (Sentiment = 'Long') would be considered a "secondary sell" signal.
These secondary signals are visually represented on the chart using hollow triangles, differentiating them from regular signals (filled triangles).
While they can be interpreted as potential contrarian trade opportunities, secondary signals can also serve other purposes within a grid trading strategy:
Exit Signals: A secondary signal can suggest a potential shift in market sentiment or a weakening trend. This could be a cue to consider exiting an existing position, even if it's currently profitable, to lock in gains before a potential reversal
Risk Management: In a strong trend, secondary signals might offer opportunities for cautious counter-trend trades with controlled risk. These trades could utilize smaller position sizes or tighter stop-losses to manage potential downside if the main trend continues
Dollar-Cost Averaging (DCA): During a prolonged trend, the parabolic curve might generate multiple secondary signals in the opposite direction. These signals could be used to implement a DCA strategy, gradually accumulating a position at potentially favorable prices as the market retraces or consolidates within the larger trend
Secondary signals should be interpreted with caution and considered in conjunction with other technical indicators and market context. They provide additional insights into potential market reversals or consolidation phases within a broader trend, aiding in adapting your grid trading strategy to the evolving market dynamics.
Examples
Trigger=Wick, Confirm=Touch. Signals are generated when the wick touches the next gridline.
Trigger=Close, Confirm=Touch. Signals require the close to touch the next gridline.
Trigger=SWMA, Confirm=Reverse. Signals are triggered when the Symmetrically Weighted Moving Average reverse crosses the next gridline.
🧠THEORY AND RATIONALE 🧠
The innovative approach of the Parabolic Grid Bot can be better understood by first examining the limitations of traditional grid trading strategies and exploring how this indicator addresses them by incorporating principles of market cycles and dynamic price behavior
Traditional Grid Bots: One-Dimensional and Static
Traditional grid bots operate on a simple premise: they divide the price chart into a series of equally spaced horizontal lines, creating a grid of trading zones. These bots excel in ranging markets where prices oscillate within a defined range. Buy and sell orders are placed at these grid levels, aiming to profit from mean reversion as prices bounce between the support and resistance zones.
However, traditional grid bots face challenges in trending markets. As the market moves in one direction, the bot continues to place orders in that direction, leading to a stacking of positions. If the market eventually reverses, these stacked trades can be profitable, amplifying gains. But the risk lies in the potential for the market to continue trending, leaving the trader with a series of losing trades on the wrong side of the market
The Parabolic Grid Bot: Adding Dimensions
The Parabolic Grid Bot addresses the limitations of traditional grid bots by introducing two additional dimensions:
Acceleration (Second Dimension): This parameter introduces a second dimension to the grid, allowing it to tilt upwards or downwards to align with the prevailing market trend. A positive acceleration creates an upward-sloping grid, suitable for uptrends, while a negative acceleration results in a downward-sloping grid, ideal for downtrends. The magnitude of acceleration controls the steepness of the tilt, enabling you to fine-tune the grid's responsiveness to the trend's strength
Curvature (Third Dimension): This parameter adds a third dimension to the grid by introducing a parabolic curve. The curve's shape, ranging from gentle bends to sharp turns, is controlled by the curvature value. This flexibility allows the grid to closely mirror the market's evolving structure, potentially identifying turning points and trend reversals.
Mean Reversion in Trending Markets
Even in trending markets, the Parabolic Grid Bot can help identify opportunities for mean reversion strategies. While the grid may be tilted to reflect the trend, the buy and sell zones can capture short-term price oscillations or consolidations within the broader trend. This allows traders to potentially pinpoint entry and exit points based on temporary pullbacks or reversals.
Visualize and Adapt
The Parabolic Grid Bot acts as a visual aid, enhancing your understanding of market dynamics. It allows you to "see the curve" by adapting the grid to the market's patterns. If the market shows a parabolic shape, like an upward curve followed by a peak and a downward turn (similar to a head and shoulders pattern), adjust the Accel and Curve to match. This highlights potential areas of interest for further analysis.
Beyond Straight Lines: Visualizing Market Cycle
Traditional technical analysis often employs straight lines, such as trend lines and support/resistance levels, to interpret market movements. However, many analysts, including Brian Millard, contend that these lines can be misleading. They propose that what might appear as a straight line could represent just a small part of a larger curve or cycle that's not fully visible on the chart.
Markets are inherently cyclical, marked by phases of expansion, contraction, and reversal. The Parabolic Grid Bot acknowledges this cyclical behavior by offering a dynamic, curved grid that adapts to these shifts. This approach helps traders move beyond the limitations of straight lines and visualize potential support and resistance levels in a way that better reflects the market's true nature
By capturing these cyclical patterns, whether subtle or pronounced, the Parabolic Grid Bot offers a nuanced understanding of market dynamics, potentially leading to more accurate interpretations of price action and informed trading decisions.
⚠️ DISCLAIMER⚠️
This indicator utilizes a parabolic curve fitting approach to visualize potential support and resistance levels. The mathematical formulas employed have been designed with adaptability and scalability in mind, aiming to accommodate various assets and price ranges. While the resulting curves may visually resemble parabolas, it's important to note that they might not strictly adhere to the precise mathematical definition of a parabola.
The indicator's calculations have been tested and generally produce reliable results. However, no guarantees are made regarding their absolute mathematical accuracy. Traders are encouraged to use this tool as part of their broader analysis and decision-making process, combining it with other technical indicators and market context.
Please remember that trading involves inherent risks, and past performance is not indicative of future results. It is always advisable to conduct your own research and exercise prudent risk management before making any trading decisions.
🧠 BEYOND THE CODE 🧠
The Parabolic Grid Bot, like the other grid bots in this series, is designed with education and community collaboration in mind. Its open-source nature encourages exploration, experimentation, and the development of new grid trading strategies. We hope this indicator serves as a framework and a starting point for future innovations in the field of grid trading.
Your comments, suggestions, and discussions are invaluable in shaping the future of this project. We welcome your feedback and look forward to seeing how you utilize and enhance the Parabolic Grid Bot.
Gridtrading
FreedX Grid Backtest█ FreedX Grid Backtest is an open-source tool that offers accurate GRID calculations for GRID trading strategies. This advanced tool allows users to backtest GRID trading parameters with precision, accurately reflecting exchange functionalities. We are committed to enhancing trading strategies through precise backtesting solutions and address the issue of unreliable backtesting practices observed on GRID trading strategies. FreedX Grid Backtest is designed for optimal calculation speed and plotting efficiency, ensuring users to achieve fastest calculations during their analysis.
█ GRID TRADING STRATEGY SETTINGS
The core of the FreedX Grid Backtest tool lies in its ability to simulate grid trading strategies. Grid trading involves placing orders at regular intervals within a predefined price range, creating a grid of orders that capitalize on market volatility.
Features:
⚙️ Backtest Range:
→ Purpose: Allows users to specify the backtesting range of GRID strategy. Closes all positions at the end of this range.
→ How to Use: Drag the dates to fit the desired backtesting range.
⚙️ Investment & Compounding:
→ Purpose: Allows users to specify the total investment amount and select between fixed and compound investment strategies. Compounding adjusts trade quantities based on performance, enhancing the grid strategy's adaptability to market changes.
→ How to Use: Set the desired investment amount and choose between "Fixed" or "Compound" for the investment method.
⚙️ Leverage & Grid Levels:
→ Purpose: Leverage amplifies the investment amount, increasing potential returns (and risks). Users can define the number of grid levels, which determines how the investment is distributed across the grid.
→ How to Use: Input the desired leverage and number of grids. The tool automatically calculates the distribution of funds across each grid level.
⚙️ Distribution Type & Mode:
→ Purpose: Users can select the distribution type (Arithmetic or Geometric) to set how grid levels are determined. The mode (Neutral, Long, Short) dictates the direction of trades within the grid.
→ How to Use: Choose the distribution type and mode based on the desired trading strategy and market outlook.
⚙️ Enable LONG/SHORT Grids exclusively:
█ MANUAL LEVELS AND STOP TRIGGERS
Beyond automated settings, the tool offers manual adjustments for traders seeking finer control over their grid strategies.
Features:
⚙️ Manual Level Adjustment:
→ Purpose: Enables traders to manually set the top, reference, and bottom levels of the grid, offering precision control over the trading range.
→ How to Use: Activate manual levels and adjust the top, reference, and bottom levels as needed to define the grid's scope.
⚙️ Stop Triggers:
→ Purpose: Provides an option to set upper and lower price limits, acting as stop triggers to close or terminate trades. This feature safeguards investments against significant market movements outside the anticipated range.
→ How to Use: Enable stop triggers and specify the upper and lower limits. The tool will automatically manage positions based on these parameters.
---
This guide gives you a quick and clear overview of the FreedX Grid Backtest tool, explaining how you can use this cutting-edge tool to improve your trading strategies.
Grid Bot BacktestingBinance, Bybit, Bitget, and other cross-exchange (grid) trading bot backtesting.
Auto bound: Automatically setting upper and lower price bounds.
Manual: Setting upper and lower price bounds manually.
The graph below represents the overall asset changes (initial investment amount + current position profit + grid profit).
Try using backtesting when setting up a grid bot on the exchange!
바이낸스, 바이비트, 비트겟 등 교차거래(그리드) 봇 백테스팅
Auto bound : 자동으로 상,하단 가격 설정
Manual : 직접 상,하단 가격 설정
아래 그래프는 총 자산 변화입니다.(초기투자금액 + 현재 포지션 수익 + 그리드 수익)
거래소에서 그리드 봇 설정할 때 백테스팅 유용하게 써보세요!
Hulk Grid Algorithm V2 - The Quant ScienceIt's the latest proprietary grid algorithm developed by our team. This software represents a clearer and more comprehensive modernization of the deprecated Hulk Grid Algorithm. In this new release, we have optimized the source code architecture and investment logic, which we will describe in detail below.
Overview
Hulk Grid Algorithm V2 is designed to optimize returns in sideways market conditions. In this scenario, the algorithm divides purchases with long orders at each level of the grid. Unlike a typical grid algorithm, this version applies an anti-martingale model to mitigate volatility and optimize the average entry price. Starting from the lower level, the purchase quantity is increased at each new subsequent level until reaching the upper level. The initial quantity of the first order is fixed at 0.50% of the initial capital. With each new order, the initial quantity is multiplied by a value equal to the current grid level (where 1 is the lower level and 10 is the upper level).
Example: Let's say we have an initial capital of $10,000. The initial capital for the first order would be $50 * 1 = $50, for the second order $50 * 2 = $100, for the third order $50 * 3 = $150, and so on until reaching the upper level.
All previously opened orders are closed using a percentage-based stop-loss and take-profit, calculated based on the extremes of the grid.
Set Up
As mentioned earlier, the user's goal is to analyze this strategy in markets with a lack of trend, also known as sideways markets. After identifying a price range within which the asset tends to move, the user can choose to create the grid by placing the starting price at the center of the range. This way, they can consider trading the asset, if the backtesting generates a return greater than the Buy & Hold return.
Grid Configuration
To create the grid, it's sufficient to choose the starting price during the launch phase. This level will be the center of the grid from which the upper and lower levels will be calculated. The grid levels are computed using an arithmetic method, adding and subtracting a configurable fixed amount from the user interface (Grid Step $).
Example: Let's imagine choosing 1000 as the starting price and 50 as the Grid Step ($). The upper levels will be 1000, 1050, 1100, 1150, 1200. The lower levels will be 950, 900, 850, 800, and 750.
Markets
This software can be used in all markets: stocks, indices, commodities, cryptocurrencies, ETFs, Forex, etc.
Application
With this backtesting software, is possible to analyze the strategy and search for markets where it can generate better performance than Buy & Hold returns. There are no alerts or automatic investment mechanisms, and currently, the strategy can only be executed manually.
Design
Is possible to modify the grid style and customize colors by accessing the Properties section of the user interface.
Custom Price Levels and AveragesThe "Custom Price Levels and Averages" indicator is a versatile tool designed for TradingView. It dynamically calculates and displays key price levels based on user-defined parameters such as distance percentages and position size. The indicator plots three ascending and descending price levels (A, B, C, X, Y, Z) around the last candle close on a specified timeframe. Additionally, it provides the average price for both upward and downward movements, considering the user's specified position size and increase factor. Traders can easily customize the visual appearance by adjusting colors for each plotted line. This indicator assists in identifying potential support and resistance levels and understanding the average price movements within a specified trading context.
Avoid SL hunting by acumulating your position with scaled orders.
Input Parameters:
inputTimeframe: Allows the user to select a specific timeframe (default: "D" for daily).
distancePercentageUp: Determines the percentage increase for ascending price levels (default: 1.5%).
distancePercentageDown: Determines the percentage decrease for descending price levels (default: 1.5%).
position: Specifies the position size in USD for calculating average prices (default: $100).
increaseFactor: Adjusts the increase in position size for each subsequent level (default: 1.5).
calcAvgPrice Function:
Parameters:
priceA, priceB, priceC: Ascending price levels.
priceX, priceY, priceZ: Descending price levels.
position: User-defined position size.
increaseFactor: User-defined increase factor.
Calculation:
Calculates the weighted average price for ascending (priceA, priceB, priceC) and descending (priceX, priceY, priceZ) levels.
Utilizes the specified position size and increase factor to determine the weighted average.
Plotting:
Price Calculations:
priceA, priceB, priceC: Derived by applying percentage increases to the last candle's close.
priceX, priceY, priceZ: Derived by applying percentage decreases to the last candle's close.
avgPriceUp, avgPriceDown: Computed using the calcAvgPrice function for ascending and descending levels, respectively.
Plotting Colors:
User-customizable through input parameters (colorPriceA, colorPriceB, colorPriceC, colorAvgPriceUp, colorPriceX, colorPriceY, colorPriceZ, colorAvgPriceDown).
Styling:
All lines are plotted with minimal thickness (linewidth=1) for a clean visualization.
Overall, the indicator empowers traders to analyze potential support and resistance levels and understand average price movements based on their specified parameters. The flexibility of color customization adds a layer of personalization to suit individual preferences.
RSI Box Strategy (pseudo- Grid Bot)This is a strategy intended primarily for algorithmic traders. It's a pseudo-grid bot that uses a dynamic, volume-weighted grid that only updates when the RSI meets certain conditions. It's also a breakout strategy, whereas normal grid bots are not (typical grid bots sell when a higher grid is reached, whereas this strategy sells when a lower grid is breached under specific conditions). This strategy also sells 100% of pyramiding orders on close.
In a nutshell, the strategy updates its grid to the volume-weighted highest/lowest values of your given source ("src" in the settings) each time that there is a RSI crossunder/crossover. From this range it produces an evenly-spaced grid of five lines, and uses the current source to determine which grid line is closest to the source. Then, if the source crosses over the line directly above the current line, it enters a buy order. If the source crosses under the line directly below the current line, it enters a sell order.
You can configure shorts, source, RSI length, and overbought/oversold levels in the settings.
For the strategy results below: fees are at 0.1% per trade, with order size 1% of equity and a max pyramiding value of 33. For a greater R/R profile, you can increase the order size, which will increase drawdown but potentially yield better results.
Grid by Volatility (Expo)█ Overview
The Grid by Volatility is designed to provide a dynamic grid overlay on your price chart. This grid is calculated based on the volatility and adjusts in real-time as market conditions change. The indicator uses Standard Deviation to determine volatility and is useful for traders looking to understand price volatility patterns, determine potential support and resistance levels, or validate other trading signals.
█ How It Works
The indicator initiates its computations by assessing the market volatility through an established statistical model: the Standard Deviation. Following the volatility determination, the algorithm calculates a central equilibrium line—commonly referred to as the "mid-line"—on the chart to serve as a baseline for additional computations. Subsequently, upper and lower grid lines are algorithmically generated and plotted equidistantly from the central mid-line, with the distance being dictated by the previously calculated volatility metrics.
█ How to Use
Trend Analysis: The grid can be used to analyze the underlying trend of the asset. For example, if the price is above the Average Line and moves toward the Upper Range, it indicates a strong bullish trend.
Support and Resistance: The grid lines can act as dynamic support and resistance levels. Price tends to bounce off these levels or breakthrough, providing potential trade opportunities.
Volatility Gauge: The distance between the grid lines serves as a measure of market volatility. Wider lines indicate higher volatility, while narrower lines suggest low volatility.
█ Settings
Volatility Length: Number of bars to calculate the Standard Deviation (Default: 200)
Squeeze Adjustment: Multiplier for the Standard Deviation (Default: 6)
Grid Confirmation Length: Number of bars to calculate the weighted moving average for smoothing the grid lines (Default: 2)
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, 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.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Simple Grid Lines VisualizerAbout Grid Bots
A grid bot is a type of trading bot or algorithm that is designed to automatically execute trades within a predefined price range or grid. It is commonly used in markets that exhibit ranging or sideways movement, where prices tend to fluctuate within a specific range without a clear trend.
The grid bot strategy involves placing a series of buy and sell orders at regular intervals within the predefined price range or grid. The bot essentially creates a grid of orders, hence the name. When the price reaches one of these levels, the bot will execute the corresponding trade. For example, if the price reaches a predefined lower level, the bot will buy, and if it reaches a predefined upper level, it will sell.
The purpose of the grid bot strategy is to take advantage of the price oscillations within the range. As the price moves up and down, the bot aims to generate profits by buying at the lower end of the range and selling at the higher end. By repeatedly buying and selling at these predetermined levels, the bot attempts to capture gains from the price fluctuations.
About this Script
Simple Grid Lines Visualizer is designed to assist traders in visualizing and implementing automated price grids on their charts. With just a few inputs, this script generates gridlines based on your specified top price, bottom price, and the number of grids or profit per grid.
How it Works:
Specify Top and Bottom Prices: Start by setting the top and bottom prices that define the range within which the gridlines will be generated. These prices can be based on support and resistance levels, historical data, or any other factors you consider relevant to your analysis.
Determine Grid Parameters: Choose either the number of grids or profit per grid, depending on your preference and trading strategy. If you select the number of grids, the script will evenly distribute the gridlines within the specified price range. Alternatively, if you opt for profit per grid, the script will calculate the price increment required to achieve your desired profit level per grid.
Note that when choosing Profit per Grid , an approximation usually is performed, as all grid lines must be evenly distributed. To achieve that, the script computes the grid distance using the mean price between top and bottom, then computes how many of those complete distances may enter the entire range, and lastly, creates a grid with evenly distributed distances as close as possible to the previously computed.
Customize Styling and Display: Adjust the line color, line style, transparency, and other visual aspects to ensure clear visibility on your charts.
Analyze and Trade: Once the gridlines are plotted on your chart, carefully observe how the market interacts with them. The gridlines can act as reference points for potential support and resistance levels, as well as simple buy/sell orders for a trading bot.
Try to find gridlines that intersect prices as frequently as possible from one to another.
A grid with too many lines will make lots of potential trades, but the amount traded will be minimal (as the total amount invested is divided over the number of grids).
A grid with too few lines will make lots of profits with each trade, but the trades will be less likely to occur (depending on the top/bottom distance).
This tool aims to help visually which grid parameters seem to optimize this problem.
Future versions may include automatic profit computation.
[DisDev] D-I-Y Gridbot🟩 This script is a “do-it-yourself” Grid Bot Simulator, used for visualizing support and resistance levels. 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 gridline or below the lower gridline. Unlike the previous version, all grids may be adjusted in real-time by dragging the gridlines up and down to the desired support and resistance levels.
When adding the indicator to a new chart, you must choose six grid levels by clicking on the desired support or resistance price. You can change all of these levels at any time directly on the chart.
⚡ OVERVIEW ⚡
The D-I-Y Gridbot is an interactive tool designed for visualizing support and resistance levels. As a continuation of the original Gridbot Simulator , which has received significant recognition on TradingView, earning over 4000 boosts and an Editor's Pick status. This tool serves not only as an evolved version of its predecessor, but also as an open-source template for developing future gridbots. It aims to foster discussions and facilitate innovations around grid-trading strategies.
One of the new features of this gridbot is the real-time adjustability of all gridlines. Users can move these lines up and down to set their desired support and resistance levels in response to changing market conditions. Additionally, the D-I-Y Gridbot is compatible with multiple timeframes and can be used on most TradingView charts.
Drag gridlines up or down to desired price level.
Key Features 🔑
All gridlines are adjustable in real-time, directly on the chart
Signals can be filtered by a customizable moving average or by VWAP
Customizable support and resistance levels
Potentially increases profitability in ranging markets
Benefits 💸
Customizable Support and Resistance Levels : The D-I-Y Gridbot allows users to set their preferred support and resistance levels, which can be changed at any time directly on the chart. This provides users with the ability to customize their trading parameters based on their strategy and risk tolerance.
Various Trading Strategies : The D-I-Y Gridbot supports various trading strategies, including Mean Reversion, Ranging Markets, and Dollar-cost averaging (DCA). This allows users to capitalize on price reversals, execute buy and sell orders at predetermined levels, and buy more of an asset as the price falls, respectively.
Multi-Timeframe and Versatility : The D-I-Y Gridbot is compatible with multiple timeframes and can be used on any TradingView chart.
Experimental and Educational : The D-I-Y Gridbot is considered a proof-of-concept tool that is both experimental and educational. This can provide traders with a deeper understanding of grid trading strategies and the ability to experiment with different trading parameters and strategies.
⚙️ CONFIGURATION & SETTINGS ⚙️
Inputs 🔧
Trigger : Candle location to trigger the signal. "Wick" will use either high or low, depending on the signal direction. "Close" will use the close price. “MA” will use the selected moving average or VWAP.
Confirmation : Market direction to confirm the candle trigger. "Reverse" will confirm the signal when the price crosses back over the trigger. "Breakout" will confirm when the price breaks out of the trigger.
Number of Support/Resistance zones : 1 = Only Top Grid is Support/Only Bottom Grid is Resistance. 2 = Top two grids are Resistance/Bottom two grids are Support. 3 = Top three grids are Resistance/Bottom three grids are Support
MA Type : Exponential Moving Average (EMA), Hull Moving Average (HMA), Simple Moving Average (SMA), Triple Exponential Moving Average (TEMA), Volume Weighted Moving Average (VWMA), Volume Weighted Average Price (VWAP)
MA Filter : Use Moving Average as a reversion filter for signals. When enabled, no buys when above MA, no sells when below. Use in conjunction with S/R zones to reduce false signals.
Allow Repeat Signals . When enabled, signals will reset when nearest gridline is triggered. When disabled, only one signal will be triggered per gridline.
Line/Fill colors
Gridlines . Adjusts gridline prices manually.
Left : Trigger = Wick. Confirm = Breakout. Buys are signaled when LOW breaks below gridline. Sells are triggered when HIGH breaks above gridline.
Right : Trigger = Close. Confirm = Breakout. Buys are signaled when the candle CLOSES below the gridline. Sells are triggered when the candle CLOSES above the gridline.
Left : Confirm=Breakout. Signals on breaking through the next gridline.
Right : Confirm=Reverse. Signals only when crossing back from the gridline.
S/R Zones=1. Upper gridline is Resistance / Lower is Support. Middle 4 are neutral.
S/R Zones = 3. Upper three gridlines are Resistance / Lower three are Support
Notes:
If gridlines are dragged out of order on a live chart, they will auto-sort into the correct order.
Price levels may be entered in settings, or adjusted in real-time directly on the chart.
When changing symbols, remember to adjust the gridlines to accommodate the new symbol.
Alerts 🔔
Users can set alerts based on their chosen parameters for triggers, confirmations, number of support/resistance zones, and smoothing type, enabling precise control over alert conditions.
💡 USAGE & STRATEGY 💡
Trading Strategies 📈
Mean Reversion: The script can be used to capitalize on price reversals back to the mean.
Ranging Markets: The script excels in ranging markets, executing buy and sell orders at predetermined levels.
Dollar-cost averaging (DCA): The script can be used to execute DCA orders, buying more of an asset as the price falls, and lowering the average cost per unit.
Timeframes and Symbols ⌚
Multi-Timeframe: The indicator is compatible with multiple timeframes.
Versatile: Can be used on any crypto trading pair on TradingView.
🤖 DETAILS & METHODOLOGY 🤖
Algorithm and Calculation 🛡️
Grids are set and adjusted when loading the indicator on the chart and may be customized anytime afterward by clicking and dragging the gridlines on the chart.
Gridlines are updated, sorted, and stored in a float array.
Signals are calculated based on candle trigger, market direction, and previous price level.
📚 ADDITIONAL RESOURCES 📚
Chart Examples 📊
S/R Zones = 3: Three Support and Three Resistance. Filter = 50-period Triple Exponential Moving Average (TEMA)
S/R Zones = 1: One Support, One Resistance, and Four Neutral Zones. Support Zones: Buys only. Resistance Zones: Sells only. Neutral Zones: Grid-dependent
When MA filter is enabled, Buys are only triggered below Moving Average, and Sells are only triggered above.
Trigger = Wick. Confirmation = Breakout. Buys are signaled when Low breaks above the next grid level. Sells are signaled when High breaks below the next grid level.
🚀 CONCLUSION 🚀
The D-I-Y Gridbot is a proof-of-concept, emphasizing its experimental and educational nature. In future versions, we will aim to incorporate concepts such as auto-adjusting grids and angled grids for trending markets. The script is designed to evolve through user feedback and suggestions, shaping its future iterations.
Credit: This is a continuation of the Gridbot series by xxattaxx-DisDev . Explicit permission was granted by user xxattaxx-disdev to re-use all Gridbot code and all materials without restrictions.
⚠️ DISCLAIMER ⚠️
This indicator is a proof-of-concept and is considered experimental and educational. When gridlines are drawn in hindsight, signals appear to be predictive and valid. Future results may always vary when the trend direction changes. Comments and suggestions are encouraged.
This indicator is provided as a tool for traders and should not be used as the sole basis for making trading decisions. Always conduct your own research and consider your risk tolerance before entering any trades.
Grid Spot Trading Algorithm V2 - The Quant ScienceGrid Spot Trading Algorithm V2 is the last grid trading algorithm made by our developer team.
Grid Spot Trading Algorithm V2 is a fixed 10-level grid trading algorithm. The grid is divided into an accumulation area (red) and a selling area (green).
In the accumulation area, the algorithm will place new buy orders, selling the long positions on the top of the grid.
BUYING AND SELLING LOGIC
The algorithm places up to 5 limit orders on the accumulation section of the grid, each time the price cross through the middle grid. Each single order uses 20% of the equity.
Positions are closed at the top of the grid by default, with the algorithm closing all orders at the first sell level. The exit level can be adjusted using the user interface, from the first level up to the fifth level above.
CONFIGURING THE ALGORITHM
1) Add it to the chart: Add the script to the current chart that you want to analyze.
2) Select the top of the grid: Confirm a price level with the mouse on which to fix the top of the grid.
3) Select the bottom of the grid: Confirm a price level with the mouse on which to fix the bottom of the grid.
4) Wait for the automatic creation of the grid.
USING THE ALGORITHM
Once the grid configuration process is completed, the algorithm will generate automatic backtesting.
You can add a stop loss that destroys the grid by setting the destruction price and activating the feature from the user interface. When the stop loss is activated, you can view it on the chart.
AUTOMATIC GRID BOT STRATEGY [ilovealgotrading]
OVERVIEW:
This Grid trading strategy can help you maximize your profit in a ranging sideways market with no clear direction.
INDICATOR:
We can get some money by taking advantage of the movement of the price between the range we have determined.
Short positions are opened while the price is rising, long positions are opened while the price is falling.
Therefore, there is no need to predict the trend direction.
What is different in this indicator:
I want to say thank you to © thequantscience. His GRID SPOT TRADING ALGORITHM - GRID BOT TRADING strategy helped me when I was writing my indicator.
I want to explain what I have improved:
1- Grid strategy is a type of strategy that can be traded in very short time frames and users can trade this strategy algorithmically by connecting this strategy to their own accounts with the help of API systems. For this reason, I have developed a software that can give us signals by dynamically changing the long and short messages when users are trading.
2- We can change the start and end dates of our grid bot as we want. It is necessary to use this setting when setting up automatic bots, so that previously opened transactions are not taken into account.
3 - Lot or quantity size should not be excessively small when users are taking automatic trades because exchanges have limitations, to avoid this problem, I have prevented this error by automatically rounding up to the nearest quantity size inside the software.
4 - Users can avoid excessive losses by using stop loss on this grid bot if they wish.
5 - When our price is over the range high or below the range low, our open positions are closed, if the stop button is active. We can also change which close price time frame we take as a basis from the settings.
6 -Users can set how many dollars they can enter per transaction while performing their transactions automatically.
IMPLEMENTATION DETAILS – SETTINGS:
This script allows the user to choose the highs and lows leves of our range. Our bot trades in the specified range.
1. This strategy allows us to set start and end backtest dates.
2. We can change range high and range low leves of our bot
3. IF people want to trade algorithmically with the help of this bot, there are 6 different input systems that will receive the Json codes as an alarm
4. IF the price closes above the upper line or below the lower line, all transactions will be closed. We can determine in which time frame our transactions will be stopped if the price closes outside these levels.We can adjust how our bot works by activating or turning off the Stop Loss button.
5. In this strategy, you can determine your dollar cost for per position.
6. The user can also divide the interval we have determined into 10 parts or 20 equal parts.
7. The grid is divided and colored at the interval we set. At the same time, if we don't want we can turn off colored channels.
Notes:
If you're going to connect this bot to an automatic Long and Short direction,
Don’t forget! you need to Webhook URL,
Don’t miss paste this code to your message window {{strategy.order.alert_message}}
ALSO:
Set your range below the support zones and above the resistance zones.
Don't be afraid to take a wide range, it doesn't matter if you make a little money, the important thing is that you don't lose money.
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Rocket Grid Algorithm - The Quant ScienceThe Rocket Grid Algorithm is a trading strategy that enables traders to engage in both long and short selling strategies. The script allows traders to backtest their strategies with a date range of their choice, in addition to selecting the desired strategy - either SMA Based Crossunder or SMA Based Crossover.
The script is a combination of trend following and short-term mean reversing strategies. Trend following involves identifying the current market trend and riding it for as long as possible until it changes direction. This type of strategy can be used over a medium- to long-term time horizon, typically several months to a few years.
Short-term mean reversing, on the other hand, involves taking advantage of short-term price movements that deviate from the average price. This type of strategy is usually applied over a much shorter time horizon, such as a few days to a few weeks. By rapidly entering and exiting positions, the strategy seeks to capture small, quick gains in volatile market conditions.
Overall, the script blends the best of both worlds by combining the long-term stability of trend following with the quick gains of short-term mean reversing, allowing traders to potentially benefit from both short-term and long-term market trends.
Traders can configure the start and end dates, months, and years, and choose the length of the data they want to work with. Additionally, they can set the percentage grid and the upper and lower destroyers to manage their trades effectively. The script also calculates the Simple Moving Average of the chosen data length and plots it on the chart.
The trigger for entering a trade is defined as a crossunder or crossover of the close price with the Simple Moving Average. Once the trigger is activated, the script calculates the total percentage of the side and creates a grid range. The grid range is then divided into ten equal parts, with each part representing a unique grid level. The script keeps track of each grid level, and once the close price reaches the grid level, it opens a trade in the specified direction.
The equity management strategy in the script involves a dynamic allocation of equity to each trade. The first order placed uses 10% of the available equity, while each subsequent order uses 1% less of the available equity. This results in the allocation of 9% for the second order, 8% for the third order, and so on, until a maximum of 10 open trades. This approach allows for risk management and can help to limit potential losses.
Overall, the Rocket Grid Algorithm is a flexible and powerful trading strategy that can be customized to meet the specific needs of individual traders. Its user-friendly interface and robust backtesting capabilities make it an excellent tool for traders looking to enhance their trading experience.
Grid Indicator - The Quant ScienceQuickly draw a 10-level grid on your chart with our open-source tool.
Our grid tool offers a unique solution to traders looking to maximize their profits in volatile market conditions. With its advanced features, you can create customized grids based on your preferred start price and line distance, allowing you to easily execute trades and capitalize on price movements. The tool works automatically, freeing up your time to focus on other important aspects of your trading strategy.
The benefits of using this tool are numerous. Firstly, it eliminates the need for manual calculation, making the analysis process much more efficient. Secondly, the automatic nature of the tool ensures that each grids are draw at precisely prices, giving you the best possible chance of maximizing your analysis. Finally, the ability to easily customize grids means that you can adapt your strategy quickly and effectively, even in rapidly changing market conditions.
So why wait? Take control of your trading and start using our innovative grid tool today! With its advanced features and ease of use, it's the perfect solution for traders of all levels looking to take their trading to the next level.
HOW TO USE
Using it is easy. Add the script to your chart and set the price and distance between the grids.
Hulk Grid Algorithm - The Quant ScienceGrid-based intraday algorithm that works 50% in trend following and 50% in swing trading. Orders are executed on a grid of 10 levels. The grid levels are dynamic and calculated on the difference between the previous day's open and close. The algorithm makes only long trades based on the following logic:
1. The daily close of the previous day is analyzed, the first condition is met if the previous day was bullish, closing higher than the 'opening.
2. Must pass 'x' number of bars before placing market orders.
3. The range, as the difference between close and open of the previous day must be greater than 'x'.
If these three conditions are met then the algorithm will proceed to place long orders. On a total of 10 grid levels, up to five trades are executed per day.
If the current close is above level 1 of the grid (previous day's close) then trend following trading will take place, working on the upper 5 levels. In this case each order is placed starting at level 1 and closed at each level above.
If the current close is below level 1 of the grid (previous day's open) then swing trading will be carried out, working on the lower 5 levels. In this case each order is placed starting at level 2 and closed at the upper level.
If at the time of order execution the price is above or below the stop loss and take profit levels, the algorithm will cancel the orders and prevent trading.
All orders are closed exclusively for two reasons:
1. If the stop loss or take profit level is confirmed.
2. If the daily session is ended.
UI Interface
You can adjust:
1. Backtesting period
2. 'x' number of bars before placing orders at the market (remember to always add 2 to the number you enter in the user interface if you enter 2 then execution will occur at the market opening after the fourth bar).
3. Intercepted price range between close and open of the previous day, avoiding trading on days when the range is too low.
4. Stop loss, level calculated from the 'last lower grid, if the market breaks this level the grid is destroyed and closes all open positions.
5. Take profit, the level calculated from the last upper grid, if the market breaks this level the grid is destroyed and closes all open positions.
The backtesting you see in the example was generated on:
BINANCE:BTCUSDT
Timeframe 15 min
Stop loss 2%
Take profit 2%
Minimum bars 3
Size grid range 500
This algorithm can be used only on intraday timeframe.
Grid Strategy Back Tester (Long/Short/Neutral)Preface
I'd like to send a thank you to @xxattaxx-DisDev.
The 'Line' Code, which was the most difficult to plan the Grid Indicator, was solved through the 'Grid Bot Simulator' script of @xxattaxx-DisDev.
A brief description of the indicators
These indicators are designed for backtesting of grid trading that can be opened on various exchanges.
Grid trading is a method of selling at particular intervals as prices rise and fall for gird interval price range.
This indicator is actually designed to see what the Long / Short / Neutral grid has achieved and how much it has achieved over a given period of time.
How to use
1. Lower Limit and Upper Limit are required when putting indicators on the chart.
After that, choose the 'Time' when to open the grid.
Also, select Long / Short / Neutral direction if necessary.
2. Statistics Table
Matched Grid shows how many grid pairs were engaged during the backtesting period.
The Daily Average Matching Profit is calculated based on the number of these closed grids.
Total Matching Profit is calculated as Matching Grid * Per Matching Profit.
Position Profit/Loss shows the benefits and losses from your current position.
Total Profit/Loss is sum of Total Matching Profit and Position Profit/Loss.
The Expanded APY shows the benefits of running the strategy on these terms for a year.
Max Loss of Upper is the maximum loss assumed to be directly at the top of the grid range.
BEP days (Upper) show how many days of maintenance relative to Average Matching Profit can result in greater profit than maximum loss if the grid continues to move within range.
(In the case of Long Strategy, it appears to be 'Min Profit', which shows minimal benefit if it reaches the top.)
Max Loss of Lower and BEP days (Lower) shows the opposite.
(In the case of Short Strategy, it is also referred to as 'Min Profit', which shows minimal benefit if it reaches the bottom.)
3. Grid Info
Total Grid Number, Upper Limit, and Lower Limit show the values you set in INPUT.
Grid Open Price shows the price for the period you decide to open.
Starting Position shows the number of positions that were initially held in the case of a Long / Short Strategy.
(0 for Neutral Strategy)
Per Grid qty shows how many positions are allocated to one grid
Grid Interval shows the spacing of each grid.
Per Matched Profit shows how much profit is generated when a single grid is matched.
Caution
Backtesting results for these indicators may vary depending on the time frame.
Therefore, I recommend that you use it only to compare Profit/Loss over time.
*In addition, there is a problem that all lines in the grid are not implemented, but it is independent of the backtest results.
--------------------------------------
서문
지표를 기획함에 있어서 가장 어려웠던 line 코드를 @xxattaxx-DisDev의 'Grid Bot Simulator' 스크립트를 통해 해결할 수 있었습니다.
이에 감사의 말씀을 드립니다.
해당 지표에 대한 간단한 설명
해당 지표는 다양한 거래소에서 오픈할 수 있는 그리드 매매에 대한 백테스팅을 위해 만들어졌습니다.
그리드매매는, 특정 가격 구간에 대해 가격이 오르고 내림에 따라 일정 간격에 맞춰 매매를 하는 방식입니다.
이 지표는 실질적으로 롱/숏/중립 그리드가 어떠한 성과를, 특정 기간동안 얼마나 냈는지를 확인하고자 만들어졌습니다.
사용방법
1. 인풋
지표를 차트위에 넣을 때, Lower Limit과 Upper Limit이 필요합니다.
그 후 그리드를 언제부터 오픈할 것인지를 선택하세요.
또, 필요하다면 Long / Short / Neutral의 방향을 선택하세요.
2. 그리드 통계
Matched Grid는, 백테스팅 기간동안 체결된 그리드 쌍이 몇개인지를 보여줍니다.
이 체결된 그리드의 갯수를 바탕으로 Daily Average Matched Profit이 계산됩니다.
Total Matched Profit은, Matched Grid * Per Matched Profit으로 계산됩니다.
Position Profit/Loss는, 현재 갖고 있는 포지션으로 인한 이익과 손실을 보여줍니다.
Total Matched Profit과 Position Profit/Loss를 합친 금액이 Total Profit/Loss가 됩니다.
Expcted APY는, 이러한 조건으로 전략을 1년동안 운영했을 때의 이익을 보여줍니다.
Max Loss of Upper는, 그리드 범위의 최상단에 바로 도달했을 경우를 가정한 최대 손실입니다.
BEP days(Upper)는, 그리드가 범위 내에서 계속 움직일 경우, Average Matched Profit을 기준으로 며칠동안 유지되어야 최대손실보다 더 큰 이익이 발생할 수 있는지를 보여줍니다.
(Long Strategy의 경우, ‘Min Profit’이라고 나타나는데, 최상단에 도달했을 경우 최소한의 이익을 보여줍니다)
Max Loss of Lower는 그 반대의 경우를 보여줍니다.
(Short Strategy의 경우, 역시 ‘Min Profit’이라고 나타나는데, 최하단에 도착했을 경우 최소한의 이익을 보여줍니다)
3. 그리드 정보
그리드 갯수, Upper Limt, Lower Limt은 자신이 설정한 값을 보여줍니다.
Grid Open Price는, 자신이 오픈하기로 정했던 기간의 가격을 보여줍니다.
Starting Position은, 롱/숏 그리드의 경우에 처음에 들고 시작했던 포지션의 갯수를 보여줍니다.
Neutral Strategy의 경우 0입니다.
Per Grid qty는, 하나의 그리드에 얼마만큼의 포지션이 배분되었는지를 보여주며
Grid Interval은 각 그리드의 간격을 보여줍니다.
또, Per Matched Profit은 하나의 그리드가 체결될 때 얼마만큼의 이익이 발생하는 지를 보여줍니다.
이러한 지표에 대한 역테스트 결과는 시간 프레임에 따라 달라질 수 있습니다.
따라서 시간 경과에 따른 손익을 비교할 때만 사용하는 것이 좋습니다.
*추가로, 그리드의 라인이 모두 구현되지 않는 문제가 있지만, 백테스팅 결과와는 무관합니다.
Dynamic ATH Grid
Indicator to profit all market movements.
The idea behind this indicator is:
- to sell 1% if price reach upside line
- to buy 1% if price reach downside line
This going to take profit from volatility of market.
Use only in the most reliable values, it have risk in less reliable values
- In cases of big crashes / going to 0, it will make loose your capital (exactly as if you have hold )
More indicators will be added.
Thanks for all
GRID SPOT TRADING ALGORITHM - GRID BOT TRADING STRATEGYGRID SPOT TRADING ALGORITHM : LONG ONLY STRATEGY OPEN SOURCE
This is a long only strategy for spot assets.
HOW IT WORKS
Grid trading is a trading strategy where an investor creates a so-called "price grid". The basic idea of the strategy is to repeatedly buy at the pre-specified price and then wait for the price to rise above that level and then sell the position (and vice versa with shorting or hedging).
FEATURES
Grids: This algorithm has a total of 10 grids.
Take profit: The trader can increase or decrease the distance between the grids from the User Interface panel, the distance between one grid and another represents the take profit.
Management: The algorithm buys 10% of the capital every time the price breaks down a grid and sells during a rise to the next higher grid. The initial capital is invested in 10 sizes which represent 10% of the capital per trade.
Stop Loss: The algorithm knows no stop loss as long as it is not activated from the User Interface panel. By activating the stop loss from the User Interface panel the algorithm will insert a close condition on all trades which will be calculated from the last lower grid.
Trades: Trades are opened only if the price is within the grid. If the market leaves the grid the algorithm will not buy new positions or sell new positions.
Optimal market conditions: The favorable market for this algorithm is the sideways market.
LIMITATIONS OF THE MODEL
The trader must take into account that this is a static model. It only works perfectly well if the market is in a sideways phase and incurs heavy losses if the market takes a downward trend. The model is unusable for an uptrend. The trader must therefore carefully analyze the market where he intends to use this strategy, making sure that the price is in a sideways phase.
USES
Indispensable research and backtesting tool for those using bots for their investments. The algorithm produces a backtesting of the strategy for past history. It is used by professional traders to understand if this strategy has been profitable on a market and what parameters to use for bots using this strategy (Kucoin, Binance etc.).
If you would like to develop your own algorithm with customized conditions based on a grid strategy, please contact us.
If you need help in using this tool, please contact us without hesitation.
Fibonacci Grid [LuxAlgo]The following indicator returns multiple diagonal lines forming a grid. Each line has 45-degree and is set depending on Fibonacci ratios as well as the maximum and minimum price value over a certain lookback period. These can be used as potential support and resistance.
Users also have the option to set equidistant lines instead of having them determined by Fibonacci ratios.
Settings
Length: Lookback period for determining the maximum/minimum price value used for constructing the grid.
Resolution: Grid resolution, higher values will return more lines (only available when the "Use Fibonacci Ratios" is disabled)
Use Fibonacci Ratios: Set the lines based on Fibonacci Ratios, 6 ratios are used.
Usage
Each individual diagonal line can be used as support/resistance. Two Diagonal lines form channels where the price might evolve until a breakout.
The underlying logic of this grid determined by Fibonacci ratios is that price variations farther away from the main diagonals (in orange) would tend to move inside tighter channels.
Diagonals set using Fibonacci Ratios will form tighter channels when away from the center of the Lookback area. While equidistant lines will keep the same distance between each line.
Total Percent MovementThe total precent movement indicator charts the total movement (low to high) for a given interval. Use this indicator when analyzing a system for grid trading or when trying to gauge average movement.
The indicator plots three lines.
Total movement (low to high)
A simple moving average of the total movement.
A baseline
Sensible defaults are configured and may be changed in the inputs. The baseline provides a useful visual when determining practical grid width and should be adjusted based on your assumptions. The moving average defaults at 55 and helps smooth out extreme movement.
Use these tools to configure trades that have a high probability of occurrence.
Enjoy and happy wealth building!
Up & Down Trend Trading Strategy - BNB/USDT 15minThis strategy will focus on up trend trading and down trend trading based on several indicators such as;
for up trend
1. SAR indicator
2. Super trend indicator
3. Simple moving average for the period of 100
down trend
1. RSI Indicator
2. Money flow index
3. Relative volatility index
4. Balance of powder
Best delta gridTradingThis indicator help grid traders to chose the best delta in their gridTrading.
The best delta gridTrading indicator is proportional to the Average true range.
RECON ATR Volatility PercentageThe original Average True Range (ATR) indicator is a technical analysis indicator designed to measure volatility. The higher the ATR the higher the volatility.
The RECON ATR Volatility Percentage indicator calculates the Average True Range (ATR) as a percentage.
Suggested chart timeframes: 1h, 4h and 1D seem to produce the most useful intel but can be used on lower timeframes as well.
The Recon ATR Volatility Percentage can be utilized for identifying trading pairs with a desired amount of volatility, for example deploying a grid trading strategy on pairs that are trending up with a high amount of volatility (say over 50%) might produce desirable results.
It is important to note the ATR does not indicate price direction and can be high in both a rising or falling market.
The ATR Length, Period Look Back Length parameters as well as the color of the columns can be configured per your specifications.
Grid Bot AutoThis script is an auto-adjusting grid bot simulator. This is an improved version of the original Grid Bot Simulator. The grid bot is best used 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. Unlike the previous version, the upper and lower limits are calculated automatically. Grid levels are determined by four factors: Smoothing, Laziness, Elasticity, and Grid Intervals.
Smoothing:
A moving average (or linear regression) is applied to each close price as a basis. Options for smoothing are Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average.
Laziness:
Laziness is the percentage change required to reach the next level. If laziness is 1.5, the price must move up or down by 1.5% before the grid will change. This concept is based on Alex Grover’s Efficient Trend Step. This allows the grids to be based on even price levels, as opposed to jagged moving averages.
Elasticity:
Elasticity is the degree of “stickiness” to the current price trend. If the smoothing line remains above (or below) the current grid center without reverting but still not enough to reach the next grid level, the grid line will start to curve toward the next grid level. Elasticity is added to (or subtracted from) the gridline by a factor of minimum system ticks for the current pair. Elasticity of zero will keep the gridlines horizontal. If elasticity is too high, the grid will distort.
Grid Intervals:
Grid intervals are the percentage of space between each grid.
Laziness = 4%, Elasticity = 0. Price must move at least 4% before reaching the next level. With zero elasticity, gridlines are straight.
Laziness = 5%, Elasticity = 100. For each bar at a new grid level, the grid will start “curve” toward the next price level (up if price is greater than the middle grid, down if less than middle grid). Elasticity is calculated by the user-inputted “Elasticity” multiplied by the minimum tick for the current pair (ELSTX = syminfo.mintick * iELSTX)
Try experimenting with different combinations of the Smoothing Length, Smoothing Type, Laziness, Elasticity, and Grid Intervals to find the optimum settings for each chart. Lower-priced pairs (e.g. XRP/ADA/DODGE) will require lower Elasticity. Also note that different exchanges may have different minimum tick values. For example, minimum tick for BITMEX:XBTUSD and BYBIT:BTCUSD is .5, but BINANCE:BTCUSDT and COINBASE:BTCUSD is .01.
s3.tradingview.com
DODGEUSDT, 5min. Laziness: 4%, Elasticity 2.5
Number of Grids: 2. Laziness: 3.75%. Elasticity: 150. Grid Interval 2%.
Settings Overview
Smoothing Length : Smoothing period
Smoothing Type : Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average
Laziness : Percentage required for price to move until it reaches the next level. If price does not reach the next level (up or down), the grid will remain the same as previous grid (because it’s lazy).
Elasticity : Amount of curvature toward the next grid, based on the current price trend. As elasticity increases, gridlines will curve up or down by a factor of the number of ticks since the last grid change.
Grid Interval : Percent between grid levels.
Number of Grids : Number of grids to show.
Cooldown : Number of bars to wait to prevent consecutive signals.
Grid Line Transparency : Lower transparencies brighten the gridlines; higher transparencies dim the gridlines. To hide the gridlines completely, enter 100.
Fill Transparency: Lower transparencies brighten the fill box; higher transparencies dim the fill box. To hide the fill box completely, enter 100.
Signal Size : Make signal triangles large or small.
Reset Buy/Sell Index When Grids Change : When a new grid is formed, resetting the index may prevent false signals (experimental)
Use Highs/Lows 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.
Show Min Tick : If checked, syminfo.mintick is displayed in upper-righthand corner. Useful for estimating Laziness.
Reverse Fill Colors : Default fill for fill boxes is green after buy and red after sell. Check this box to reverse.
Note: The Grid Bot Simulator scripts are experimental and works in progress. Please feel free to comment or contact me if you have suggestions/complaints.