Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // BEGIN UNCOMMENT FOR BACKTESTING
- 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)
- strategyEntry(name, direction, myCondition) =>
- if direction==1 and name=="Long"
- strategy.entry("Long", 1, when= myCondition)
- if direction==0 and name=="Short"
- strategy.entry("Short", 0, when= myCondition)
- strategyClose(name, myCondition) =>
- if name=="Long"
- strategy.close("Long", when= myCondition)
- if name=="Short"
- strategy.close("Short", when= myCondition)
- isStrategy = true, isStudy = false
- // END UNCOMMENT FOR BACKTESTING
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement