跳到内容
折叠侧栏
BPAX Lab
搜索
个人工具
创建账号
登录
工具
链入页面
相关更改
特殊页面
页面信息
English
中文
查看“3+ Consecutive Bars Accelerating Up or Down”的源代码
页面
中文
不转换
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
阅读
查看源代码
查看历史
更多
阅读
查看源代码
查看历史
←
3+ Consecutive Bars Accelerating Up or Down
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于这些用户组的用户执行:
管理员
、editor、super-saiyan-1、super-saiyan-2、super-saiyan-3、super-saiyan-blue、super-saiyan-red、flashcard-user、PA老友记管理员
不允许您执行您所请求的操作。
您可以查看和复制此页面的源代码。
== Pine script == <blockquote>//@version=5 indicator("3 CCBA", overlay=true) // * overlay = true will prevent the indicator from showing in seperate panel goodTrendBarThreshold = 0.8 okTrendBarThreshold = 0.5 // * 3 bull bars allBLB = (close > open) and (close[1] > open[1]) and (close[2] > open[2]) // * current bar closed above 80%; -1 bar closed above 50%; -2 bar closed above 50% allBLBOkBody = ((close - low) / (high - low) >= goodTrendBarThreshold) and ((close[1] - low[1]) / (high[1] - low[1]) >= okTrendBarThreshold) and ((close[2] - low[2]) / (high[2] - low[2]) >= okTrendBarThreshold) // * all 3 bars closed above 80% of bar size, i.e. good trending BLBCH allBLBCH = ((close - low) / (high - low) >= goodTrendBarThreshold) and ((close[1] - low[1]) / (high[1] - low[1]) >= goodTrendBarThreshold) and ((close[2] - low[2]) / (high[2] - low[2]) >= goodTrendBarThreshold) // * all 3 bars body is bigger than 50% of bar size noDojiBLB = ((close - open) / (high - low) >= okTrendBarThreshold) and ((close[1] - open[1]) / (high[1] - low[1]) >= okTrendBarThreshold) and ((close[2] - open[2]) / (high[2] - low[2]) >= okTrendBarThreshold) // * bar sizes are increasing allBLBA = ((close[2] - open[2]) <= (close[1] - open[1])) and ((close[1] - open[1]) <= (close - open)) threeCCBLBA = allBLB and allBLBOkBody and noDojiBLB and allBLBA threeCCBLBCH = allBLB and allBLBCH and noDojiBLB // * 3 bear bars allBRB = (close < open) and (close[1] < open[1]) and (close[2] < open[2]) // * current bar closed below 80%; -1 bar closed below 50%; -2 bar closed below 50% allBRBOkBody = ((high - close) / (high - low) >= goodTrendBarThreshold) and ((high[1] - close[1]) / (high[1] - low[1]) >= okTrendBarThreshold) and ((high[2] - close[2]) / (high[2] - low[2]) >= okTrendBarThreshold) // * all 3 bars closed below 80% of bar size, i.e. good trending BRBCL allBRBCL = ((high - close) / (high - low) >= goodTrendBarThreshold) and ((high[1] - close[1]) / (high[1] - low[1]) >= goodTrendBarThreshold) and ((high[2] - close[2]) / (high[2] - low[2]) >= goodTrendBarThreshold) // * all 3 bars body is bigger than 50% of bar size noDojiBRB = ((open - close) / (high - low) >= okTrendBarThreshold) and ((open[1] - close[1]) / (high[1] - low[1]) >= okTrendBarThreshold) and ((open[2] - close[2]) / (high[2] - low[2]) >= okTrendBarThreshold) // * bar sizes are increasing allBRBA = ((open[2] - close[2]) <= (open[1] - close[1])) and ((open[1] - close[1]) <= (open - close)) threeCCBRBA = allBRB and allBRBOkBody and noDojiBRB and allBRBA threeCCBRBCL = allBRB and allBRBCL and noDojiBRB allConditions = threeCCBLBA or threeCCBLBCH or threeCCBRBA or threeCCBRBCL alertcondition(allConditions, title='3 CCBA!', message= '3 CCBA!') plot(series=close)</blockquote> [[Category:TradingView]]
返回
3+ Consecutive Bars Accelerating Up or Down
。