Algox 13 Basic Version Test
Algox 13 Basic Version Test
tf = my_time //input('15')
trade_size = input(125)
r = ticker.heikinashi(syminfo.tickerid)
ro = request.security(r, tf, open, lookahead=barmerge.lookahead_on)
rc = request.security(r, tf, close, lookahead=barmerge.lookahead_on)
plot(ro, color=color.new(color.lime, 0), linewidth=3)
plot(rc, color=color.new(color.red, 0), linewidth=3)
sel_entry = rc < ro
buy_entry = rc > ro
strategy.entry('sell', direction=strategy.short, qty=trade_size, comment='sell',
when=sel_entry)
strategy.entry('buy', direction=strategy.long, qty=trade_size, comment='buy',
when=buy_entry)