Azgard Grid MAX

This script allows you to set up a grid bot using step buy orders, martingale and take profit and test its past performance and roughly see the financial results that depend on the initial order and leverage you set up.
This script is designed to analyze no more than 20 buy orders, dynamic step of buy orders no more than 2 and martingale no more than 2. This script does not supply signals by itself, but only analyzes signals of other indicators.
If you have any indicator that you want to connect to the backtest - write a private message here.
Warning: using the script can not guarantee that the results obtained in the past, do not guarantee success in the future.
Тhe rules of this platform require a detailed description of the principle of grid trading: Grid trading is a bot for automating the trading of futures contracts. It is designed to place orders at specified intervals in a given price range.
While using this strategy, orders are placed above and below the set price, creating a grid of orders with gradual increase and decrease of prices. The result is a trading grid. For example, a trader might place orders to buy BTC every 1,000 USDT below the market price and sell orders every 1,000 USDT above the market price. This allows you to benefit from trading under different conditions.
Grid trading is ideal for use in volatile and "sideways" markets when prices fluctuate within a given range. This strategy allows you to profit from small price changes. The more elements in the grid, the more often transactions are made. However it leads to increased costs, because the profit on each of the orders becomes lower.
Thus, it is necessary to find a compromise between receiving small profit from committing a lot of transactions and the strategy with a smaller number of orders, but generating more profit on each of them.
The rules also require me to describe what's original in the script. Here are two fundamental differences from the other backtesters:
1. This script allows you to simultaneously configure to adjust the number of orders, the distance between them, the dynamic grid step and set a takeprofit.
2. This script is sutable not only trading on well-known cryptocurrency exchanges, but also for third-party platforms that allow you to run trading bots.
The thing is that not only on Binance you can run a grid bot, which on Binance is a grid of orders above and below the price. There are other platforms that are not exchanges, but provide the ability to connect to an exchange account and run trading bots with more sophisticated settings. Because of platform policy it is impossible to give their names here, but you can easily find them in a search on the appropriate request. Here for such platforms with advanced settings of trading robots this strategy is also suitable.
Thus, when the first order is placed, all other orders are not placed at an automatic distance from it, but at a user-configurable distance, which allows you to fine-tune the bot's grid. When the price reaches the order it is considered as executed and the takeprofit automatically changes, which can be seen by changes in the blue line. If the price reaches the blue line, the trade is closed.
HOW IT WORKS
Grid trading is a trading strategy in which an investor creates a so-called "price grid". The basic idea of the strategy is to repeatedly buy at a predetermined price, then wait until the price rises above that level and then sell the position (and vice versa when shorting or hedging).
LIMITATIONS OF THE MODEL
A trader should keep in mind that this is a static model. It works fine only if the market is in a sideways phase, and incurs heavy losses if the market takes a downtrend without a turn. The model is also unsuitable for a flip-flop in an uptrend. Therefore, the trader must carefully analyze the market in which he is going to use this strategy, making sure that the price is in a sideways phase.
-подключение любого индикатора на вход
-подключение любого индикатора для фильтра
+ циклы
+ минимальное расстояние до ликвидации
- устранение ошибок
- добавлен фильтр на выход
- добавлены ручные выходы и усреднения
- добавлен вывод прибыли
1. Сетка СО с шагом меньше 1, которая "сжимается" к последнему СО
2. Добавлены новые стандартные фильтры с обязательными к прочтению комментариями
3. Перевод ТП в БУ при срабатывании последнего СО
4. Уведомление о срабатывании последнего СО - настраивается как ОТДЕЛЬНОЕ уведомление, отличное от уведомлений для веб-хуков
5. Определение времени торговой сессии
-обновлен фильтр расстояния
- улучшена работа на барах реального времени, что уменьшит расхождения при работе стратегии, подключенной к бирже или брокеру
- удалено оповещение о последнем СО из-за возникающей путаницы
- для форвард-тестирования введены метки для тейк-профитов, которые срабатывают на исторических или реальных барах
- добавлен трейлинг-профит по ATR
- добавлен стоп от последнего ордера
- исправлен фильтр расстояния
- добавлен режим глубокого тестирования, в котором данные о расстоянии до ликвидации и длительность сделок записываются в отчет о глубоком тестировании
- подписаны все поля настроек для корректной выгрузки и загрузки настроек стратегии с использованием оптимайзера
- оптимизирована скорость отрисовки
- обновлены стандартные фильтры
- обновлен фильтр тренда
- встроенная стратегия MACD
- работа с изолированной маржой
- добавлена проверка подключаемых индикаторов "Изменение" и "появление"
- добавлен выход по сигналам только при положительном PNL
- добавлена таблица помесячной доходности
- в режим глубокого тестирования добавлена индикация вывода средств
- улучшена работа ATR-профита
- убран трейлинг ТВ
- при закрытии противоположным сигналом можно устанавливать минимальную прибыль
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AzgardScript directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AzgardScript directly.
Note that this private, invite-only script has not been reviewed by script moderators, and its compliance with House Rules is undetermined. TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.