14561 vizualizações
Simple and accurate strategy
If you can improve the script to skip the noise entries spanning less then 4 USD please let me know.
Enjoy
If you can improve the script to skip the noise entries spanning less then 4 USD please let me know.
Enjoy
//@version=2 strategy("ChopBot v1.0", overlay=true) rangeup = close[1]+tr[1] rangedown = close[1]-tr[1] over() => high > rangeup and close > open under() => low < rangedown and close < open longCondition = over() if (longCondition) strategy.entry("ChopBot Long", strategy.long) shortCondition = under() if (shortCondition) strategy.entry("ChopBot Short", strategy.short)
Comentários
//@version=2
study("ChopBot v1.0", overlay=false)
rangeup = close+tr
rangedown = close-tr
over() => high > rangeup and close > open
under() => low < rangedown and close < open
longCondition = over()
shortCondition = under()
last_long = longCondition ? time : nz(last_long)
last_short = shortCondition ? time : nz(last_short)
long_signal = crossover(last_long, last_short)
short_signal = crossover(last_short, last_long)
plot(long_signal, title="long", linewidth=6, color=green)
plot(short_signal, title="short", linewidth=3, color=red)