Maurizio-Ciullo

Bot Rame Bias HG1! 1H SOLO LONG

May 8th, 2022 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © Maurizio-Ciullo
  3.  
  4. // Strategia Bias Sul Futures Del Rame HG1 Timeframe 1H!
  5. // Ticker HG1!, Il Bot Dovrà Girare Sui Contratti Non Continuous, Il Continuous Serve Solo Per Il Backtest
  6. // Andranno Fatti I Rollower A Scadenza Del Contratto
  7. // La Strategia Non E' Completa Ma E' Solo Un'Idea Che Ci Si Può Lavorare
  8.  
  9. //@version=5
  10. strategy("Bot Rame Bias HG1! 1H SOLO LONG ", overlay=true, initial_capital=20000,
  11.          slippage=2, commission_type=strategy.commission.cash_per_contract,
  12.          commission_value=2, currency=currency.EUR)
  13.  
  14.  
  15. in_Long = input.int(22, "Long entrata")
  16. exit_long = input.int(7, "Long uscita")
  17. highestValue = input.int(5, "highestValue")
  18.  
  19.  
  20. longCondition = strategy.opentrades == 0 and hour == in_Long and close > ta.highest(low, highestValue)[1]
  21.  
  22. if longCondition
  23.     strategy.entry("Long", strategy.long)
  24. strategy.close("Long", when = hour == exit_long)
Add Comment
Please, Sign In to add comment