This script is designed to create a trading bot for the spot market, specifically for buying and selling bitcoins profitably. Recommended for timeframes above two hours. Here are the main functions and features of the script:
Strategy Setup: The bot is set up with a custom grid strategy, defining parameters like pyramiding (allowed number of simultaneous trades), margin requirements, commission, and initial capital.
Order Requirements: It calculates the order price and amount based on the minimum requirements set by the exchange and rounds them appropriately.
Entry Conditions: The bot makes new entries if the closing price falls a certain percentage below the last entry price. It continues to make entries until the closing price rises a certain percentage above the average entry price.
Targets and Plots:
It calculates and plots the target profit level.
It plots the average entry price and the last entry price.
It plots the next entry price based on the defined conditions.
It plots the maximum number of orders allowed based on equity and the number of open orders.
Timerange: The bot can start trading from a specific date and time defined by the user.
Entries: It places orders if the timerange conditions are met. It also places new orders if the closing price is below the last entry price by a defined percentage.
Profit Calculation: The script calculates open profit or loss for the open positions.
Exit Conditions: It closes all positions if the open profit is positive and the closing price is above the target profit level.
Performance Table: The bot maintains and displays statistics like the number of open and closed trades, net profit, and equity in a table format.
The script is customizable, allowing users to adjust parameters like initial capital, commission, order values, and profit targets to fit their specific trading needs and exchange requirements.
Script de código aberto
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.