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 Futures Del Rame HG1 Timeframe 1H!
- // Ticker HG1!, 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 Rame Bias HG1! 1H SOLO LONG ", overlay=true, initial_capital=20000,
- slippage=2, commission_type=strategy.commission.cash_per_contract,
- commission_value=2, currency=currency.EUR)
- in_Long = input.int(22, "Long entrata")
- exit_long = input.int(7, "Long uscita")
- highestValue = input.int(5, "highestValue")
- longCondition = strategy.opentrades == 0 and hour == in_Long and close > ta.highest(low, highestValue)[1]
- if longCondition
- strategy.entry("Long", strategy.long)
- strategy.close("Long", when = hour == exit_long)
Add Comment
Please, Sign In to add comment