Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // BEGIN UNCOMMENT FOR BACKTESTING
  2. strategy(title="strategy", shorttitle="strategy", overlay=true, pyramiding=0, default_qty_value=100, commission_value=0.1, commission_type=strategy.commission.percent, initial_capital=1000)
  3. strategyEntry(name, direction, myCondition) =>
  4. if direction==1 and name=="Long"
  5. strategy.entry("Long", 1, when= myCondition)
  6. if direction==0 and name=="Short"
  7. strategy.entry("Short", 0, when= myCondition)
  8. strategyClose(name, myCondition) =>
  9. if name=="Long"
  10. strategy.close("Long", when= myCondition)
  11. if name=="Short"
  12. strategy.close("Short", when= myCondition)
  13. isStrategy = true, isStudy = false
  14. // END UNCOMMENT FOR BACKTESTING
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement