搜索
产品
社区
市场
新闻
经纪商
更多
CN
开始
社区
/
指标和策略
/
Camarilla Screener
OPEN-SOURCE SCRIPT
Camarilla Screener
由Sayonee提供
关注
关注
13小时前
0
添加到收藏
添加到收藏
13小时前
//
version
=5
indicator("Camarilla Screener", overlay=false)
// Input for timeframe (Yearly or Monthly)
timeframe = input.timeframe("1M", "Timeframe for Analysis")
// Fetch high, low, and close of the selected timeframe
high_tf = request.security(syminfo.tickerid, timeframe, high)
low_tf = request.security(syminfo.tickerid, timeframe, low)
close_tf = request.security(syminfo.tickerid, timeframe, close)
// Calculate Camarilla levels
range_hl = high_tf - low_tf
S3 = close_tf - (range_hl * 1.1 / 4)
S4 = close_tf - (range_hl * 1.1 / 2)
S5 = close_tf - (range_hl * 1.1)
// Current month candle details
open_current = request.security(syminfo.tickerid, "1M", open)
close_current = request.security(syminfo.tickerid, "1M", close)
low_current = request.security(syminfo.tickerid, "1M", low)
high_current = request.security(syminfo.tickerid, "1M", high)
// Conditions
low_sweep = low_current < low_tf // Monthly low sweeps previous month's low
bullish_close = close_current > open_current // Bullish close
doji_condition = math.abs(close_current - open_current) < (0.005 * close_current) // Doji condition
cross_camarilla = high_current > S3 or high_current > S4 or high_current > S5 // Camarilla levels breached
// Combine all conditions
condition_met = low_sweep and bullish_close and doji_condition and cross_camarilla
// Plot signals
plotshape(condition_met, title="Signal", location=location.top, color=color.green, style=shape.labelup, text="Camarilla Setup")
// Display levels for reference
plot(S3, color=color.red, title="S3")
plot(S4, color=color.orange, title="S4")
plot(S5, color=color.yellow, title="S5")
educational
开源脚本
本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受
网站规则
约束。 您可以收藏它以在图表上使用。
想在图表上使用此脚本?
添加到收藏
Sayonee
关注
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在
使用条款
阅读更多信息。