Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © Maurizio-Ciullo
- // Strategia Bias Sul Futurex Del Vix Che E' L'indice Di Volatilità Sull S&P 500
- // Ticker VX1!, Il Bot Dovrà Girare Sui Contratti Non Continuous, Il Continuous Serve Solo Per Il Backtest
- // Andranno Fatti I Rollower A Scadenza Del Contratto
- // La Strategia Non E' Completa Ma E' Solo Un'Idea Che Ci Si Può Lavorare
- //@version=5
- strategy("Bot Just-In-Time Bias VIX VX1! 1D SOLO LONG", overlay=false)
- entrylong = input.int(1, "Giorno entrata long")
- exitlong = input.int(1, "Giorno uscita long")
- maxPrice = input.int(30, "Price max for trading") // Valore Del Volatilità Del Vix La Volglio Sotto Il 30
- giornoDellaSettimana = dayofweek(time)
- plot(giornoDellaSettimana)
- longCondition = giornoDellaSettimana == entrylong and strategy.opentrades == 0 and close <= open and open < maxPrice
- if longCondition
- strategy.entry("Long", strategy.long)
- strategy.close("Long", when = (giornoDellaSettimana == exitlong))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement