Every Candle Trade

 avatar
user_6299896
plain_text
2 years ago
516 B
674
No Index
//@version=5
strategy("every candle", overlay = true, initial_capital = 100, max_bars_back = 10)
quant=input(1,"Order Size")
buy = close>open
sell = close<=open

if buy and bar_index>last_bar_index-3000
    strategy.entry("Buy", strategy.long, qty = quant)
    strategy.exit("Buy", limit = close+0.00000001, stop=close-0.00000001)

if sell and bar_index>last_bar_index-3000
    strategy.entry("Sell", strategy.short, qty = quant)
    strategy.exit("Sell", limit = close+0.00000001, stop=close-0.00000001)
Editor is loading...