avgtrade

Grid Settings & MM

This script is designed to help you plan your grid trading or when averaging your position in the spot market.
The script has a small error (due to the simplification of the code), it does not take into account the size of the commission.
You can set any values on all parameters on any timeframe, except for the number of orders in the grid (from 2 to 5).

The usage algorithm is quite simple:
1. Connect the script
2. Install a Fibo grid on the chart - optional (settings at the bottom of the description)
3.On the selected pair, determine the HighPrice & LowPrice levels and insert their values
4.Evaluate grid data (levels, estimated profit ’%’, possible profit ‘$’...)
And it's all)

Block of variables for calculating grid and MM parameters
Variables used regularly
--- HighPrice and LowPrice - constant update when changing pairs
--- Deposit - deposit amount - periodically set the actual amount

Variables that do not require permanent changes
--- Grids - set the planned number of grids, default 5
--- Steps - the planned number of orders in the grid, by default 5
--- C_Order - coefficient of increasing the size of orders in the base coin, by default 1.2
--- C_Price - trading levels offset coefficient, default 1.1
--- FirstLevel - location of the first buy level, default 0.5
--- Back_HL - number of candles back, default 150
*** For C_Order and C_Price variables, the value 1 means the same order size and the same distance between buy levels.

The fibo grid is used for visualization, you can do without it, ! it is not tied to the script code !
You can calculate the levels of the Fibo grid using the formula:
(level price - minimum price) / (maximum price - minimum price)
For default values, grid levels are as follows:
1 ... 0.5
2...0.359
3 ... 0.211
4...0.0564
5...-0.1043

Short description:

in the upper right corner
--- indicator of the price movement for the last 150 candles, in % !!! there is no task here to "catch" the peak values - only a relative estimate.

in the upper left corner
--- total amount of the deposit
--- the planned number of grids
--- “cost” of one grid
--- the size of the estimated profit depending on the specified HighPrice & LowPrice

in the lower left corner
--- Buy - price levels for buy orders
--- Amount - the number of purchased coins in the corresponding order
--- Sell - levels of profit taking by the sum of market orders in the grid
--- $$$ - the sum of all orders in the grid, taking into account the last active order
--- TP - profit amount by the amount of orders in the grid
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?