allanster

How To Set Backtest Time Ranges


Example how to set the time range window to be backtested for both entries and exits. Additional examples are also included showing how to set the date range and toggle plot visibility.

By incorporating this code with your own strategy's logic, it will allow you to backtest various time windows.

Much gratitude to @LucF and @a.tesla2018 for help with including ':1234567' for time ranges on weekends. Thank you both!


NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Notas de Lançamento: Cosmetic.
Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde 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 utilizá-lo em um gráfico.

Quer usar esse script no gráfico?
Telegram: https://t.me/allanster • Gunbot Tuners: http://www.allanster.com

If you would like to buy me a refreshing beverage :)...

LTC (preferred): LTDaAe7nPzbpBhZVT9o5f9f8M3aZSPa46Y

BTC: 13LhkeXBYrRomVAqbXcoLXHuqMk6Mf7G6N

Comentários

500 moedas
+1 Resposta
allanster PineCoders
@PineCoders, thank you, very much appreciated!
Resposta
Thanks for this, @allanster ! Exactly what I was looking for.
Resposta
allanster thecgreg
@thecgreg, glad to hear you found useful and your feedback is appreciated.
Resposta
Thank you, this was helpful
Resposta
allanster TrustingTurtle
@TrustingTurtle, apologies for missing your comment, it is appreciated.
Resposta
thanks for sharing this script
Resposta
allanster blackcat1402
@blackcat1402, thanks for your comment and sorry for delayed response.
Resposta
wish to work with my strategy from 10 AM to 02:30 PM only . Please guide me how to code that one
Resposta
@iamakp, in script above replace logic for enterLong and exitLong with your own logic.
Resposta
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Sobre Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter