PINE LIBRARY
ที่อัปเดต: GB_Cond_Lib

Library "GB_Cond_Lib"
Condition operator evaluator + AND/OR combiner for GB-RMBP+ strategy.
Replaces 12-branch ternary chains and the 50-branch combiner used for external filter rules.
eval_cond_op(v1, op, v2)
Evaluate a binary condition between two series given an operator string.
Parameters:
v1 (float): Left-hand series
op (simple string): Operator: "CrossUp", "CrossDown", ">", ">=", "<", "<=", "==",
"> Previous", ">= Previous", "< Previous", "<= Previous", "== Previous"
v2 (float): Right-hand series
Returns: Boolean result; false if op is unrecognized (including "🚫 None")
eval_cond_op_with_default(v1, op, v2, default_true)
Same as eval_cond_op, but if op is unrecognized returns `default_true`
(preserves the v1.0.77 quirk for LCond5/SCond5 which used `(make_custom ? true : true)` fallback).
Parameters:
v1 (float): Left-hand series
op (simple string): Operator string
v2 (float): Right-hand series
default_true (bool): Value returned when op is "🚫 None" or unknown
combine_AND(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with AND, gated by 5 "use" flags.
Matches v1.0.77 condition_function_AND exactly: if no flags are checked,
returns (make_custom ? false : true) — the strategy's "no filters = pass" default.
Parameters:
u1 (simple bool)
u2 (simple bool)
u3 (simple bool)
u4 (simple bool)
u5 (simple bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (simple bool): The make_custom strategy flag
Returns: Combined boolean
combine_OR(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with OR, gated by 5 "use" flags.
Matches v1.0.77 condition_function_OR exactly.
Parameters:
u1 (simple bool)
u2 (simple bool)
u3 (simple bool)
u4 (simple bool)
u5 (simple bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (simple bool)
Condition operator evaluator + AND/OR combiner for GB-RMBP+ strategy.
Replaces 12-branch ternary chains and the 50-branch combiner used for external filter rules.
eval_cond_op(v1, op, v2)
Evaluate a binary condition between two series given an operator string.
Parameters:
v1 (float): Left-hand series
op (simple string): Operator: "CrossUp", "CrossDown", ">", ">=", "<", "<=", "==",
"> Previous", ">= Previous", "< Previous", "<= Previous", "== Previous"
v2 (float): Right-hand series
Returns: Boolean result; false if op is unrecognized (including "🚫 None")
eval_cond_op_with_default(v1, op, v2, default_true)
Same as eval_cond_op, but if op is unrecognized returns `default_true`
(preserves the v1.0.77 quirk for LCond5/SCond5 which used `(make_custom ? true : true)` fallback).
Parameters:
v1 (float): Left-hand series
op (simple string): Operator string
v2 (float): Right-hand series
default_true (bool): Value returned when op is "🚫 None" or unknown
combine_AND(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with AND, gated by 5 "use" flags.
Matches v1.0.77 condition_function_AND exactly: if no flags are checked,
returns (make_custom ? false : true) — the strategy's "no filters = pass" default.
Parameters:
u1 (simple bool)
u2 (simple bool)
u3 (simple bool)
u4 (simple bool)
u5 (simple bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (simple bool): The make_custom strategy flag
Returns: Combined boolean
combine_OR(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with OR, gated by 5 "use" flags.
Matches v1.0.77 condition_function_OR exactly.
Parameters:
u1 (simple bool)
u2 (simple bool)
u3 (simple bool)
u4 (simple bool)
u5 (simple bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (simple bool)
Release Note
v2Updated:
eval_cond_op(v1, op, v2)
Evaluate a binary condition between two series given an operator string.
Parameters:
v1 (float): Left-hand series
op (string): Operator: "CrossUp", "CrossDown", ">", ">=", "<", "<=", "==",
"> Previous", ">= Previous", "< Previous", "<= Previous", "== Previous"
v2 (float): Right-hand series
Returns: Boolean result; false if op is unrecognized (including "🚫 None")
eval_cond_op_with_default(v1, op, v2, default_true)
Same as eval_cond_op, but if op is unrecognized returns `default_true`
(preserves the v1.0.77 quirk for LCond5/SCond5 which used `(make_custom ? true : true)` fallback).
Parameters:
v1 (float): Left-hand series
op (string): Operator string
v2 (float): Right-hand series
default_true (bool): Value returned when op is "🚫 None" or unknown
combine_AND(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with AND, gated by 5 "use" flags.
Matches v1.0.77 condition_function_AND exactly: if no flags are checked,
returns (make_custom ? false : true) — the strategy's "no filters = pass" default.
Parameters:
u1 (bool)
u2 (bool)
u3 (bool)
u4 (bool)
u5 (bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (bool): The make_custom strategy flag
Returns: Combined boolean
combine_OR(u1, u2, u3, u4, u5, c1, c2, c3, c4, c5, make_custom)
Combine 5 condition booleans with OR, gated by 5 "use" flags.
Matches v1.0.77 condition_function_OR exactly.
Parameters:
u1 (bool)
u2 (bool)
u3 (bool)
u4 (bool)
u5 (bool)
c1 (bool)
c2 (bool)
c3 (bool)
c4 (bool)
c5 (bool)
make_custom (bool)
ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน