INVITE-ONLY SCRIPT
Byakko_Telepathy_Logic2

//version=6
indicator("白虎② (Gold M1 Long)", overlay=true, max_labels_count=500)
//====================
// Inputs
//====================
osLevel = input.float(30.0, "Oversold level (<=)", step=0.1)
waitBars = input.int(7, "Entry window after oversold (bars)", minval=1)
coolBars = input.int(10, "Cooldown bars (連発防止)", minval=1)
useMA7Filter = input.bool(true, "7MA filter (flat/up only)")
showTriangle = input.bool(true, "Show ▲")
//====================
// Indicators
//====================
// RSI
rsi7 = ta.rsi(close, 7)
rsi9 = ta.rsi(close, 9)
// MFI
mfi7 = ta.mfi(hlc3, 7)
mfi9 = ta.mfi(hlc3, 9)
// Stoch① (7,3,3)
k1_raw = ta.stoch(high, low, close, 7)
k1 = ta.sma(k1_raw, 3)
// Stoch② (9,6,3)
k2_raw = ta.stoch(high, low, close, 9)
k2 = ta.sma(k2_raw, 3)
d2 = ta.sma(k2, 6)
// MA7 filter
ma7 = ta.sma(close, 7)
ma7Ok = not useMA7Filter or (ma7 >= ma7[1])
//====================
// ① 6個中「4個以上」が30以下
//====================
countOS =
(rsi7 <= osLevel ? 1 : 0) +
(rsi9 <= osLevel ? 1 : 0) +
(mfi7 <= osLevel ? 1 : 0) +
(mfi9 <= osLevel ? 1 : 0) +
(k1 <= osLevel ? 1 : 0) +
(k2 <= osLevel ? 1 : 0)
oversoldNow = countOS >= 4
//====================
// State
//====================
var bool armed = false
var int armedBar = na
var int lastSignalBar = na
canFire = na(lastSignalBar) or (bar_index - lastSignalBar > coolBars)
// oversold 検出
if barstate.isconfirmed and oversoldNow and not armed
armed := true
armedBar := bar_index
// 期限切れ(7分)
if armed and not na(armedBar) and (bar_index - armedBar > waitBars)
armed := false
armedBar := na
//====================
// ② Entry(確定足・shift=1)
//====================
entry = barstate.isconfirmed and armed and (d2 < k2) and ma7Ok and canFire
if entry
lastSignalBar := bar_index
armed := false
armedBar := na
//====================
// Plot: ピンク▲(ローソク下)
//====================
plotshape(
showTriangle and entry,
title="Logic② BUY ▲",
style=shape.triangleup,
location=location.belowbar,
color=color.fuchsia,
size=size.small
)
//====================
// Alert
//====================
alertcondition(
entry,
title="Logic② BUY ▲",
message="Logic② BUY ▲\n🐯 白虎②\n{{ticker}} {{interval}}\n6個中4個<=30 → 7分以内に D<K(確定足) + MA7 平行/上向き"
)
indicator("白虎② (Gold M1 Long)", overlay=true, max_labels_count=500)
//====================
// Inputs
//====================
osLevel = input.float(30.0, "Oversold level (<=)", step=0.1)
waitBars = input.int(7, "Entry window after oversold (bars)", minval=1)
coolBars = input.int(10, "Cooldown bars (連発防止)", minval=1)
useMA7Filter = input.bool(true, "7MA filter (flat/up only)")
showTriangle = input.bool(true, "Show ▲")
//====================
// Indicators
//====================
// RSI
rsi7 = ta.rsi(close, 7)
rsi9 = ta.rsi(close, 9)
// MFI
mfi7 = ta.mfi(hlc3, 7)
mfi9 = ta.mfi(hlc3, 9)
// Stoch① (7,3,3)
k1_raw = ta.stoch(high, low, close, 7)
k1 = ta.sma(k1_raw, 3)
// Stoch② (9,6,3)
k2_raw = ta.stoch(high, low, close, 9)
k2 = ta.sma(k2_raw, 3)
d2 = ta.sma(k2, 6)
// MA7 filter
ma7 = ta.sma(close, 7)
ma7Ok = not useMA7Filter or (ma7 >= ma7[1])
//====================
// ① 6個中「4個以上」が30以下
//====================
countOS =
(rsi7 <= osLevel ? 1 : 0) +
(rsi9 <= osLevel ? 1 : 0) +
(mfi7 <= osLevel ? 1 : 0) +
(mfi9 <= osLevel ? 1 : 0) +
(k1 <= osLevel ? 1 : 0) +
(k2 <= osLevel ? 1 : 0)
oversoldNow = countOS >= 4
//====================
// State
//====================
var bool armed = false
var int armedBar = na
var int lastSignalBar = na
canFire = na(lastSignalBar) or (bar_index - lastSignalBar > coolBars)
// oversold 検出
if barstate.isconfirmed and oversoldNow and not armed
armed := true
armedBar := bar_index
// 期限切れ(7分)
if armed and not na(armedBar) and (bar_index - armedBar > waitBars)
armed := false
armedBar := na
//====================
// ② Entry(確定足・shift=1)
//====================
entry = barstate.isconfirmed and armed and (d2 < k2) and ma7Ok and canFire
if entry
lastSignalBar := bar_index
armed := false
armedBar := na
//====================
// Plot: ピンク▲(ローソク下)
//====================
plotshape(
showTriangle and entry,
title="Logic② BUY ▲",
style=shape.triangleup,
location=location.belowbar,
color=color.fuchsia,
size=size.small
)
//====================
// Alert
//====================
alertcondition(
entry,
title="Logic② BUY ▲",
message="Logic② BUY ▲\n🐯 白虎②\n{{ticker}} {{interval}}\n6個中4個<=30 → 7分以内に D<K(確定足) + MA7 平行/上向き"
)
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 KenKen511에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
ダライラマ
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
초대 전용 스크립트
이 스크립트는 작성자가 승인한 사용자만 접근할 수 있습니다. 사용하려면 요청 후 승인을 받아야 하며, 일반적으로 결제 후에 허가가 부여됩니다. 자세한 내용은 아래 작성자의 안내를 따르거나 KenKen511에게 직접 문의하세요.
트레이딩뷰는 스크립트의 작동 방식을 충분히 이해하고 작성자를 완전히 신뢰하지 않는 이상, 해당 스크립트에 비용을 지불하거나 사용하는 것을 권장하지 않습니다. 커뮤니티 스크립트에서 무료 오픈소스 대안을 찾아보실 수도 있습니다.
작성자 지시 사항
ダライラマ
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.