OPEN-SOURCE SCRIPT
ที่อัปเดต: jrhSAR Daily/Weekly Trend System

⭐ What you should look for before entering a trade
1. Daily SAR dot flips from above → below price
This is the first sign of a possible long.
2. Candle turns green (your barcolor logic)
This means the trend filters agree.
3. A green “LONG” label appears
This is the final confirmation.
If you see the SAR flip but no LONG label, it means:
ADX too weak
RSI not above 50
Price not above 20 EMA
Weekly trend disagrees
So you ignore it.
⭐ How to actually trade it (simple rules)
LONG ENTRY
Enter on the candle where the LONG label appears
(or on the next candle if you prefer confirmation).
STOP‑LOSS
Use the daily SAR dot as your stop.
This is how SAR was originally designed.
EXIT
Exit when:
Daily SAR flips bearish
Or your own TP/SL is hit
This keeps the system clean and mechanical.
⭐ What the SAR dots tell you visually
Daily SAR (blue dots)
Tracks short‑term trend
Flips often
Used for entries + trailing stop
Weekly SAR (orange dots)
Tracks long‑term trend
Flips rarely
Used as a trend filter
Keeps you out of bad trades
If weekly SAR is bearish, you will never get a LONG label — even if daily SAR flips.
⭐ What a perfect long setup looks like
You want to see this sequence:
Price closes above daily SAR
Candle is above 20 EMA
RSI > 50
ADX > threshold (trend strength)
Weekly SAR below price
Candle turns green
“LONG” label prints
When all seven align → high‑probability long entry.
⭐ What to avoid
SAR flips during sideways chop
ADX below 20–25
RSI hovering around 50
Price stuck inside EMA
Weekly SAR against your direction
Your indicator already filters these out — that’s why you sometimes see SAR flips but no LONG flag.
1. Daily SAR dot flips from above → below price
This is the first sign of a possible long.
2. Candle turns green (your barcolor logic)
This means the trend filters agree.
3. A green “LONG” label appears
This is the final confirmation.
If you see the SAR flip but no LONG label, it means:
ADX too weak
RSI not above 50
Price not above 20 EMA
Weekly trend disagrees
So you ignore it.
⭐ How to actually trade it (simple rules)
LONG ENTRY
Enter on the candle where the LONG label appears
(or on the next candle if you prefer confirmation).
STOP‑LOSS
Use the daily SAR dot as your stop.
This is how SAR was originally designed.
EXIT
Exit when:
Daily SAR flips bearish
Or your own TP/SL is hit
This keeps the system clean and mechanical.
⭐ What the SAR dots tell you visually
Daily SAR (blue dots)
Tracks short‑term trend
Flips often
Used for entries + trailing stop
Weekly SAR (orange dots)
Tracks long‑term trend
Flips rarely
Used as a trend filter
Keeps you out of bad trades
If weekly SAR is bearish, you will never get a LONG label — even if daily SAR flips.
⭐ What a perfect long setup looks like
You want to see this sequence:
Price closes above daily SAR
Candle is above 20 EMA
RSI > 50
ADX > threshold (trend strength)
Weekly SAR below price
Candle turns green
“LONG” label prints
When all seven align → high‑probability long entry.
⭐ What to avoid
SAR flips during sideways chop
ADX below 20–25
RSI hovering around 50
Price stuck inside EMA
Weekly SAR against your direction
Your indicator already filters these out — that’s why you sometimes see SAR flips but no LONG flag.
Release Note
Fixed SAR and Buy/Sell flag to floatRelease Note
⭐ What the SAR + LONG flag actually meansYour indicator is doing four things at once, and the LONG flag only appears when all four agree:
1. Daily SAR flipped bullish
Price moved above the daily SAR dot
→ This signals a potential trend change.
2. Trend filters confirm the move
All must agree:
Price above the 20 EMA
RSI > 50
ADX > your threshold (trend strength)
This prevents false signals in choppy markets.
3. Weekly SAR agrees with the direction (if enabled)
Weekly SAR below price → macro trend is bullish
This keeps you trading with the larger trend.
4. The flip happened on this candle
The LONG flag only prints on the exact bar where:
Daily SAR flips bullish
Trend filters confirm
Weekly bias agrees
This is your entry bar.
⭐ What you should look for before entering a trade
1. Daily SAR dot flips from above → below price
This is the first sign of a possible long.
2. Candle turns green (your barcolor logic)
This means the trend filters agree.
3. A green “LONG” label appears
This is the final confirmation.
If you see the SAR flip but no LONG label, it means:
ADX too weak
RSI not above 50
Price not above EMA
Weekly trend disagrees
So you ignore it.
⭐ How to actually trade it (simple rules)
LONG ENTRY
Enter on the candle where the LONG label appears
(or on the next candle if you prefer confirmation).
STOP‑LOSS
Use the daily SAR dot as your stop.
This is how SAR was originally designed.
EXIT
Exit when:
Daily SAR flips bearish
Or your own TP/SL is hit
This keeps the system clean and mechanical.
⭐ What the SAR dots tell you visually
Daily SAR (blue dots)
Tracks short‑term trend
Flips often
Used for entries + trailing stop
Weekly SAR (orange dots)
Tracks long‑term trend
Flips rarely
Used as a trend filter
Keeps you out of bad trades
If weekly SAR is bearish, you will never get a LONG label — even if daily SAR flips.
⭐ What a perfect long setup looks like
You want to see this sequence:
Price closes above daily SAR
Candle is above 20 EMA
RSI > 50
ADX > threshold (trend strength)
Weekly SAR below price
Candle turns green
“LONG” label prints
When all seven align → high‑probability long entry.
⭐ What to avoid
SAR flips during sideways chop
ADX below 20–25
RSI hovering around 50
Price stuck inside EMA
Weekly SAR against your direction
Your indicator already filters these out — that’s why you sometimes see SAR flips but no LONG flag.
⭐ When a SHORT is valid (the 4‑part checklist)
Your indicator only prints a SHORT label when all four of these conditions align:
1. Daily SAR flips bearish
Price closes below the daily SAR dot.
This is the first sign of a potential downtrend.
What it looks like:
SAR dot jumps from below price → above price
Candle closes under the dot
This alone is not enough to short.
2. Trend filters confirm the downside move
All must agree:
• Price below the 20 EMA
Shows short‑term trend direction.
• RSI < 50
Momentum is bearish.
• ADX > threshold (trend strength)
Confirms it’s not just noise or chop.
If any of these fail → no SHORT label, even if SAR flips.
3. Weekly SAR agrees (if enabled)
Weekly SAR must be above price.
This prevents shorting into a strong weekly uptrend.
If weekly SAR is bullish → no SHORT, even if daily flips.
4. The flip happens on this candle
The SHORT label prints only on the bar where all conditions align.
This is your entry bar.
⭐ What a perfect SHORT setup looks like
You want to see this sequence:
Price closes below daily SAR
Candle is below the 20 EMA
RSI < 50
ADX > your threshold
Weekly SAR above price
Candle turns red
“SHORT” label prints
When all seven align → high‑probability short entry.
⭐ How to actually trade a SHORT
SHORT ENTRY
Enter on the candle where the SHORT label appears
(or the next candle if you prefer confirmation).
STOP‑LOSS
Use the daily SAR dot as your stop.
This is how SAR was originally designed — a trailing stop‑and‑reverse.
EXIT
Exit when:
Daily SAR flips bullish
Or your own TP/SL is hit
This keeps the system mechanical and consistent.
⭐ What to avoid (common traps)
SAR flips during sideways chop
ADX below 20–25
RSI hovering around 50
Price stuck inside EMA
Weekly SAR against your direction
Your indicator already filters these out — that’s why you sometimes see SAR flips but no SHORT label.
⭐ Quick visual summary
SHORT =
SAR flips bearish
Trend filters confirm
Weekly trend agrees
Label prints
If any one of these is missing → ignore the signal.
Release Note
Added Exit Flag for Long/ShortRelease Note
Added Daily/Weekly SAR Flip in flag logicRelease Note
Added Calculated TP's that are selectable.Release Note
Removed TP's as they were problematicสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน