Consecutive Up/Down Strategy


The Consecutive Up/Down Strategy enters long if for at least X consecutive bars the current close is greater than the previous close. It enters short if for at least Y consecutive bars the current close is lower than the previous close. The X and Y inputs are managed in the strategy settings, which can be accessed by right-clicking on the strategy when it’s overlaid on the chart or by clicking the Settings wheel in the top left region of the chart. 


Pine Script
//@version=4 strategy("ChannelBreakOutStrategy", overlay=true) length = input(title="Length", type=input.integer, minval=1, maxval=1000, defval=5) upBound = highest(high, length) downBound = lowest(low, length) if (not na(close[length])) strategy.entry("ChBrkLE", strategy.long, stop=upBound + syminfo.mintick, comment="ChBrkLE") strategy.entry("ChBrkSE", strategy.short, stop=downBound - syminfo.mintick, comment="ChBrkSE") //plot(strategy.equity, title="equity",, linewidth=2, style=plot.style_areabr)


The Consecutive Up/Down Strategy is primarily designed for trends. It can be used on any timeframe and it’s dependent on the values you assign to the Consecutive Bars Up and Consecutive Bars Down. This can be adjusted in the strategy Settings and it’s up to you to decide. The strategy’s default option is 3 consecutive up bars and 3 consecutive down bars. This means that if there are 3 consecutive bars that are above or below the previous bar close, the strategy will go long or short.

홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 정보 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터