อินดิเคเตอร์สำหรับ TradingView · แสดงในหน้าต่างของตัวเองTradingView indicator · draws in its own pane

Stochastic + Dual Zone Entry

Stochastic แบบคลาสิก เส้น %K และ %D ระหว่างแถบบนและล่าง ที่เพิ่มอย่างเดียวคือมาร์กเกอร์เมื่อทั้งสองเส้นเข้าโซนพร้อมกัน: สามเหลี่ยมแดงเมื่อ %K และ %D อยู่ที่หรือเหนือแถบบนทั้งคู่ และสามเหลี่ยมเขียวเมื่ออยู่ที่หรือใต้แถบล่างทั้งคู่ แสดงครั้งเดียวที่แท่งแรกที่เข้า ไม่แสดงทุกแท่งที่อยู่ในโซน อินดิเคเตอร์นี้ไม่มี alert ของตัวเอง กราฟทุกอันในหน้านี้เป็นกราฟจริงที่กดได้: ราคาอยู่ด้านบน หน้าต่างของ Stochastic อยู่ด้านล่าง เลื่อนเมาส์ไปบนแท่งไหน ค่าในหน้าต่างจะแสดงตามแท่งนั้น กด ตั้งค่า เพื่อเปิดแผงตั้งค่าแบบเดียวกับบน TradingViewA classic Stochastic, %K and %D between an upper and a lower band. The one addition is a marker when both lines enter a zone together: a red triangle when %K and %D are both at or above the upper band, a green one when both are at or below the lower band, printed once on the entry bar, not on every bar spent in the zone. The indicator has no alerts of its own. Every chart on this page is live: price on top, the Stochastic pane below. Move the cursor over a bar to read that bar in the pane, and press Settings for the same settings you have on TradingView.

ส่วนที่ 1Part 1

%K, %D และแถบ%K, %D and the bands

1โมดูลนี้คืออะไรWhat it is

Stochastic บอกว่าราคาปิดอยู่ตรงไหนของช่วงราคาล่าสุด อยู่ระหว่าง 0 ถึง 100 %K (สีน้ำเงิน) คือเส้นหลัก ปรับให้เรียบได้ด้วย %K Smoothing (ค่าเริ่มต้น 1 คือไม่ปรับ) %D (สีส้ม) คือ %K ที่ปรับให้เรียบอีกชั้น โซนเหนือ Upper Band (80) และใต้ Lower Band (20) คือโซนซื้อมากเกินและขายมากเกิน มีพื้นสีฟ้าอ่อนระหว่างสองแถบ และเส้นกลางที่ 50The Stochastic shows where the close sits within the recent price range, on a 0 to 100 scale. %K (blue) is the main line, smoothable with %K Smoothing (1 by default, no smoothing); %D (orange) is %K smoothed once more. Above the Upper Band (80) and below the Lower Band (20) are the overbought and oversold zones, with a light blue fill between the bands and a middle line at 50.

โค้ดประกาศ timeframe = "" TradingView จึงเพิ่มช่อง Timeframe และ Wait for timeframe closes ให้เอง ใช้คำนวณ Stochastic บนไทม์เฟรมอื่นแล้วแสดงบนกราฟนี้ ค่าเริ่มต้นใช้ไทม์เฟรมของกราฟThe code declares timeframe = "", so TradingView adds a Timeframe and a Wait for timeframe closes input of its own, to compute the Stochastic on another timeframe and show it on this chart. By default it uses the chart's timeframe.

2อ่านบนกราฟยังไงReading it on the chart

  • %K และ %D ค่าล่าสุดอยู่บนแกนขวา%K and %D , latest values on the right axis
  • แถบ เส้นประที่ 80 และ 20 พื้นสีฟ้าอ่อนระหว่างกัน เส้นจางที่ 50The bands dashed at 80 and 20 with a light blue fill between, a faint line at 50

3ปรับแล้วได้อะไรWhat each setting changes

เรียงตามหน้าตั้งค่าบน TradingView ปุ่มสีทองในแต่ละข้อจะเปลี่ยนค่าบนกราฟด้านบนให้ดูทันทีIn the order TradingView lists them. The gold buttons change the chart above so you can see the effect.

การคำนวณและแถบCalculation and bands4
Calculationช่องที่ TradingView เพิ่มให้Inputs TradingView adds2

4ทดลองปรับค่าเองTry it

  1. แบบ SlowThe slow version

    ตั้ง %K Smoothing เป็น 3 เส้นเรียบขึ้นและมาร์กเกอร์น้อยลงSet %K Smoothing to 3: smoother lines and fewer markers.

5จุดที่มักเข้าใจผิดCommon pitfalls

  • ค่าเริ่มต้นเป็นแบบ FastThe default is the fast version

    %K Smoothing ค่าเริ่มต้นคือ 1 %K จึงไม่ถูกปรับให้เรียบ ถ้าคุ้นกับ Stochastic 14, 3, 3 ให้ตั้ง %K Smoothing เป็น 3%K Smoothing defaults to 1, so %K is not smoothed; for the familiar 14, 3, 3 set %K Smoothing to 3.

ส่วนที่ 2Part 2

มาร์กเกอร์เข้าโซนZone markers

1โมดูลนี้คืออะไรWhat it is

สามเหลี่ยมแดงชี้ลง แสดงที่แท่งที่ %K และ %D อยู่ที่หรือเหนือแถบบนทั้งคู่ โดยแท่งก่อนหน้ายังไม่เป็นแบบนั้น สามเหลี่ยมเขียวชี้ขึ้น แสดงที่แท่งที่ทั้งคู่อยู่ที่หรือใต้แถบล่าง เส้นเดียวในโซนไม่มีมาร์กเกอร์ มาร์กเกอร์บอกว่าทั้งสองเส้นเพิ่งเข้าโซนสุดขั้วพร้อมกัน ไม่ได้บอกว่าราคาจะทำอะไรต่อA red triangle pointing down prints on the bar where %K and %D are both at or above the upper band and were not both there on the bar before. A green triangle pointing up prints where both are at or below the lower band. One line alone in the zone prints nothing. A marker says both lines have just entered an extreme zone together; it does not say what price will do next.

แสดงครั้งเดียวที่แท่งแรกที่เข้า อยู่ในโซนนานแค่ไหนก็ได้สามเหลี่ยมเดียว มาร์กเกอร์ถัดไปต้องรอให้เส้นใดเส้นหนึ่งออกจากโซนแล้วกลับเข้ามาพร้อมกันอีก สามเหลี่ยมวางไว้นอกแถบ ห่างจากระดับของแถบ 20 จุด (เหนือแถบบนและใต้แถบล่าง) จึงไม่ทับเส้นIt prints once, on the entry bar: however long the stay, one triangle. The next one needs a line to leave the zone and both to come back in together. The triangles sit outside the bands, 20 points beyond the band level (above the upper, below the lower), clear of the lines.

2อ่านบนกราฟยังไงReading it on the chart

  • ▼ แดง ทั้งสองเส้นเข้าโซนบน▼ red both lines entered the upper zone
  • ▲ เขียว ทั้งสองเส้นเข้าโซนล่าง▲ green both lines entered the lower zone

3ปรับแล้วได้อะไรWhat each setting changes

เรียงตามหน้าตั้งค่าบน TradingView ปุ่มสีทองในแต่ละข้อจะเปลี่ยนค่าบนกราฟด้านบนให้ดูทันทีIn the order TradingView lists them. The gold buttons change the chart above so you can see the effect.

Zone Markersมาร์กเกอร์Markers2

4ทดลองปรับค่าเองTry it

  1. แถบที่แคบลงNarrower zones

    ตั้งแถบเป็น 90 / 10 มาร์กเกอร์จะเหลือเฉพาะการเข้าโซนที่สุดขั้วจริงSet the bands to 90 / 10: only the truly extreme entries keep a marker.

5จุดที่มักเข้าใจผิดCommon pitfalls

  • มาร์กเกอร์ไม่ใช่จุดเข้าA marker is not an entry

    บอกแค่ว่าทั้งสองเส้นเข้าโซนพร้อมกัน ราคาอาจวิ่งต่อในทิศเดิมได้นาน ให้อ่านคู่กับโครงสร้างราคาIt only says both lines entered the zone together; price can keep running the same way for a long time. Read it against price structure.

  • เปลี่ยนแถบแล้วมาร์กเกอร์เปลี่ยนNew bands, new markers

    แถบบนล่างเป็นทั้งเส้นที่วาดและเกณฑ์ของมาร์กเกอร์ เปลี่ยนระดับจึงเปลี่ยนตำแหน่งและจำนวนมาร์กเกอร์ด้วยThe band levels are both the lines drawn and the markers' thresholds, so changing them moves and changes the markers too.

ส่วนที่ 3Part 3

Alerts

โค้ดของอินดิเคเตอร์นี้ไม่มีทั้ง alertcondition() และ alert() จึงไม่มีเหตุการณ์ alert ของตัวเองให้เลือก รวมถึงไม่มี alert สำหรับมาร์กเกอร์เข้าโซน บน TradingView ยังสร้าง alert จากค่าของเส้นที่วาด เช่น %K หรือ %D ตัดค่าที่กำหนด ได้จากหน้าต่าง alert ของ TradingView เอง เหมือนกับอินดิเคเตอร์ทั่วไปThe code has neither alertcondition() nor alert(), so the indicator offers no alert events of its own, including none for the zone markers. On TradingView you can still build an alert from the plotted values, such as %K or %D crossing a value, in TradingView’s own alert dialog, as with any indicator.

อ้างอิงReference

การตั้งค่าทั้งหมดAll settings

ทุกช่องตั้งค่าของโค้ด เรียงตามหน้าตั้งค่าบน TradingView ช่องที่มีจุดทอง เปลี่ยนแล้วกราฟเปลี่ยนตาม กด (i) เพื่ออ่านคำอธิบายของช่องนั้นEvery input of the code, in the order TradingView shows them. Inputs with a gold dot change the chart; press (i) for an input’s description.