Gesundheit

Starting Template

This script sets defaults that I like to start with:
  • Trade commission set to 0.25%
  • Allow multiple buys before sells
  • Fixed trade size

Also included are setting a minimum desired gain (change gain_protection to 0 if you want to sell regardless of your gain), and buying only if it will reduce your average bought price (change avg_protection to 0 to turn this feature off).

This strategy only takes long positions since Gunbot does not make short positions.

We also start the backtesting at a specific time, to avoid going over the maximum of 2000 trades. Especially helpful when trying to tune a high frequency strategy, or when comparing the efficacy of a strategy on candlesticks with different time periods (this is why I did not use max bars back).

Cheers!
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

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.

Quer usar esse script no gráfico?