jason5480

Trailing Buy

jason5480 Aggiornato   
This script demonstrates how to do trailing buy. With this approach, given an entry signal, instead of buying directly, you just follow the price downwards (for long positions) and you buy when the price increases by a small percentage. The order will be executed when the next bar is closed. This approach may increase the profits (slightly) in some strategies! This script can be used as a template for your own strategy. Be aware that the simulated data may produce unrealistic results.
Note di rilascio:
  • Fix some bugs in some edge cases
  • Refactor the code to better reflect what it does
Note di rilascio:
  • Fix minor typos
Note di rilascio:
  • Use stop orders when trailing instead of market orders at the start of the next candle (suggestion by @freyadog)
  • Use time_filter library
Note di rilascio:
  • Minor code clean up
  • Change color scheme
Note di rilascio:
  • Update time_filters library
Note di rilascio:
  • Replace deprecated "when=" with if statements in strategy calls
Note di rilascio:
  • Change fastMA default color to yellow
  • Change trailing entry price default color to blue
Note di rilascio:
  • Increase max labels to 150
  • Minor refactoring
Note di rilascio:
  • Update time_filters library
Note di rilascio:
  • Change the settings so the order type (market, stop-limit) is independent from the trailing
  • Some minor label/color changes
Note di rilascio:
  • Added option for limit orders
Note di rilascio:
  • small refactoring
Note di rilascio:
  • Update time_filters library version
Note di rilascio:
  • Update time_filters library version
Note di rilascio:
  • Use the 'chrono_utils' library for the date-time window filter

If you're interested in exploring and discovering other high quality free strategies come join us in Discord: discord.gg/2wkm9QqSuY
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?