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

Money Flow Index+ v1.1.0

Money Flow Index (MFI) ที่บอกสถานะของตัวเอง: เส้นเปลี่ยนสีเป็นขาขึ้น ขาลง หรือยังไม่ชัดเจน ตามตำแหน่งของ MFI เทียบกับแถบกลาง 45 – 55 และมีโมดูล Divergence ที่หาไดเวอร์เจนซ์จาก MFI เส้นเดียวกับที่วาด เส้นไดเวอร์เจนซ์จึงลงตรงจุดกลับตัวที่เห็นบนเส้นเสมอ คำนวณบนไทม์เฟรมอื่นได้ในกลุ่ม Calculation alert ทั้งหมดส่งผ่าน alert ตัวเดียว MFI ใช้ volume ถ้าสินทรัพย์ไม่มี volume อินดิเคเตอร์จะหยุดพร้อมข้อความแจ้ง กราฟทุกอันในหน้านี้เป็นกราฟจริงที่กดได้: ราคาอยู่ด้านบน หน้าต่างของ MFI อยู่ด้านล่าง เลื่อนเมาส์ไปบนแท่งไหน ค่าในหน้าต่างจะแสดงตามแท่งนั้น กด ตั้งค่า เพื่อเปิดแผงตั้งค่าแบบเดียวกับบน TradingViewA Money Flow Index (MFI) that states its own read: the line is coloured bull, bear or undecided by where MFI sits against the 45 – 55 middle band, plus a Divergence module found on the same MFI that is drawn, so every divergence line lands on a turn you can see. It can be computed on another timeframe in the Calculation group. Every alert goes through one alert. MFI uses volume: on a symbol without volume it stops with a message. Every chart on this page is live: price on top, the MFI 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

เส้นสถานะThe state line

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

MFI วัดแรงซื้อขายจากทั้งราคาและ volume อยู่ระหว่าง 0 ถึง 100 อินดิเคเตอร์นี้ให้เส้นบอกสถานะเองจากตำแหน่งของค่าบนแท่งนั้น: เหนือ 55 เป็นขาขึ้น (เขียว) ใต้ 45 เป็นขาลง (แดง) และระหว่าง 45 – 55 เป็นยังไม่ชัดเจน (เทา) สีบอกว่า MFI อยู่ตรงไหน ไม่ใช่ว่ามาถึงอย่างไร ถอยกลับเข้าแถบกลางเมื่อไร แท่งนั้นก็เป็นสีเทาทันที ไม่มีการจำสถานะเดิมMFI measures buying and selling pressure from price and volume together, on a 0 to 100 scale. Here the line states its own read from where the value sits on that bar: above 55 is bull (green), below 45 is bear (red), and 45 – 55 is undecided (grey). The colour says where MFI is, not how it got there: fall back into the middle band and that bar turns grey at once. No state is carried over.

ค่าเริ่มต้น Length 7 ตั้งใจให้เร็ว ตอบสนองเร็วและแกว่งบ่อย ซึ่งแถบกลางมีไว้รับการแกว่งนั้น ขอบบนล่างจึงอยู่ที่ 90 / 10 แทน 80 / 20 แบบทั่วไป เพราะ MFI 7 แท่งแตะ 80 และ 20 บ่อยเกินกว่าจะมีความหมาย เมื่อ MFI ขึ้นเกิน 90 ช่วงที่เกินจะแรเงาแดง ลงต่ำกว่า 10 แรเงาเขียว ระดับ 90 / 55 / 45 / 10 และสีของสถานะเป็นค่าคงที่ในโค้ด ไม่มีในแท็บ Inputs เส้นระดับและพื้นทั้งสี่ปรับได้ในแท็บ Style แถบบรรทัดสถานะแสดง MFI และ LengthThe default Length of 7 is deliberately fast: it reacts early and whipsaws, which the middle band exists to absorb. So the extremes sit at 90 / 10 rather than the usual 80 / 20, because a 7-bar MFI tags 80 and 20 too often for them to mean much. Above 90 the overshoot is shaded red, below 10 green. The 90 / 55 / 45 / 10 levels and the state colours are constants in the code, not inputs; the level lines and the four fills are editable in the Style tab. The status line shows MFI and its Length.

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

  • เส้น MFI ขาขึ้น เหนือ 55 ขาลง ใต้ 45 ยังไม่ชัดเจนThe MFI line bull, above 55 bear, below 45 undecided
  • แถบกลาง พื้นเทาระหว่าง 45 กับ 55 มีเส้นจุดที่ขอบ และเส้น 50 ตรงกลางThe middle band grey fill between 45 and 55, dotted at its edges, with the 50 line inside
  • 90 / 10 เส้นประ แรเงาแดงเมื่อ MFI เกิน 90 เขียวเมื่อต่ำกว่า 1090 / 10: dashed lines; red shading while MFI is above 90, green below 10

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.

MFIเส้น MFIThe MFI2
Calculationไทม์เฟรมที่คำนวณComputing timeframe2

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

  1. เร็วหรือช้าFast or slow

    ตั้ง Length 14 แล้ว 21 สีเทาจะน้อยลงและเส้นแกว่งน้อยลงSet Length to 14, then 21: fewer grey stretches and a calmer line.

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

  • สีไม่ได้บอกทิศที่กำลังไปThe colour is not a direction of travel

    เส้นสีเขียวที่กำลังลงแต่ยังเหนือ 55 ยังเป็นสีเขียว สีบอกตำแหน่ง ไม่ใช่ทิศA green line falling but still above 55 stays green: the colour is position, not direction.

  • ปรับระดับใน Inputs ไม่ได้The levels are not inputs

    90 / 55 / 45 / 10 เป็นค่าคงที่ในโค้ด แท็บ Style เปลี่ยนได้แค่สีและการแสดงของเส้นกับพื้น ไม่ได้เปลี่ยนเกณฑ์ของสถานะ90 / 55 / 45 / 10 are constants in the code; the Style tab changes how the lines and fills look, not the state thresholds.

  • ไทม์เฟรมสูงกว่าทำให้เส้นเป็นขั้นA higher timeframe makes the line step

    เมื่อคำนวณบนไทม์เฟรมที่สูงกว่าและเปิด Wait for timeframe closes ค่าจะคงที่ตลอดแท่งของไทม์เฟรมนั้น แล้วขยับทีเดียวเมื่อแท่งปิดComputed on a higher timeframe with Wait for timeframe closes on, the value holds through each of that timeframe's bars and moves once at its close.

ส่วนที่ 2Part 2

Divergence

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

โมดูลนี้หาจุดกลับตัวของ MFI (ยอดและก้น) แล้วเทียบกับจุดกลับตัวก่อนหน้าชนิดเดียวกัน พร้อมราคาที่แท่งนั้น (Low ของแท่งก้น High ของแท่งยอด) Regular: ราคาทำจุดสุดใหม่แต่กระแสเงินไม่ทำตาม อ่านเป็นแรงที่จางลงระหว่างการวิ่ง Hidden: ราคารักษาโครงสร้างแนวโน้ม ขณะที่กระแสเงินทำจุดสุดใหม่ อ่านเป็นการย่อที่ถูกดูดซับแล้วไปต่อ ค่าเริ่มต้นเปิดแค่ Regular ไดเวอร์เจนซ์หาจาก MFI เส้นที่วาดอยู่ เส้นไดเวอร์เจนซ์จึงลงที่จุดกลับตัวที่มองเห็นเสมอThis module finds MFI's turns (peaks and troughs) and compares each with the previous turn of the same kind, with price on that bar (the Low at a trough, the High at a peak). Regular: price makes a new extreme and money flow does not, participation fading into the move. Hidden: price holds its trend structure while money flow makes the new extreme, a pullback absorbed, a continuation read. Only Regular is on by default. Divergence is found on the MFI that is drawn, so every line lands on a turn you can see.

จุดกลับตัวต้องมีแท่งก่อนและหลังตามจำนวนที่ตั้ง (5 / 5) จึงรู้ได้หลังแท่ง after ปิดครบ ไดเวอร์เจนซ์จึงปรากฏช้ากว่าจุดกลับตัวเท่านั้น และวาดย้อนกลับไปที่จุดกลับตัว นี่คือวิธีหาจุดกลับตัว ไม่ใช่การ repaint สองจุดถูกเทียบเมื่อจำนวนแท่งระหว่างแท่งที่ยืนยันอยู่ในช่วง min / max (5 / 60) บน MFI ที่เร็ว Turn strength คือตัวคุมสัญญาณรบกวนหลักA turn needs the set bars before and after it (5 / 5), so it is known only once the after-bars have closed: a divergence appears that many bars after the turn and is drawn back at it. That is how turns are found, not repainting. Two turns are compared when the bars between their confirmations fall within min / max (5 / 60). On a fast MFI, Turn strength is the main noise control.

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

  • Bull เส้นและป้ายเขียวใต้ก้นของ MFI: ไดเวอร์เจนซ์ขาขึ้นแบบปกติBull a green line and tag under the MFI trough: regular bullish divergence
  • Bear เส้นและป้ายแดงเหนือยอดของ MFI: ไดเวอร์เจนซ์ขาลงแบบปกติBear a red line and tag over the MFI peak: regular bearish divergence
  • H สีเดียวกันแต่จางกว่า: แบบซ่อนH the same colours, paler: hidden
  • ปิดไว้ตามค่าเริ่มต้น HiddenOff by default: Hidden

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.

Modulesสวิตช์ของโมดูลModule switches2
Divergenceชนิด จุดกลับตัว และการแสดงผลKinds, turns and display5

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

  1. กรองจุดกลับตัวFilter the turns

    ตั้ง before 8 จุดกลับตัวเล็ก ๆ หายไป ไดเวอร์เจนซ์น้อยลงSet Before to 8: the small turns drop out and there are fewer divergences.

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

  • ไดเวอร์เจนซ์มาช้าA divergence arrives late

    จุดกลับตัวรู้ได้หลังแท่ง after ปิดครบ เส้นจึงวาดย้อนหลัง และ alert ส่งตอนยืนยันA turn is known only after its after-bars close, so the line is drawn back at the turn and the alert fires at the confirmation.

  • เปลี่ยน Length แล้วไดเวอร์เจนซ์เปลี่ยนหมดA new Length changes every divergence

    ไดเวอร์เจนซ์หาจาก MFI เส้นเดียวกับเส้นสถานะ เปลี่ยน Length จึงเปลี่ยนทั้งสองอย่างDivergence comes from the same MFI as the state line, so a new Length changes both.

ส่วนที่ 3Part 3

Alerts

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

สร้าง alert บน TradingView ตัวเดียว ตั้ง Condition เป็นอินดิเคเตอร์นี้ → Any alert() function call แล้วเลือกเหตุการณ์ในกลุ่ม Alerts · … ต้องเปิด Enable alerts ก่อน (ปิดไว้ตามค่าเริ่มต้น) และทุกเหตุการณ์ปิดไว้ตามค่าเริ่มต้นCreate one TradingView alert with Condition set to this indicator → Any alert() function call, then pick events in the Alerts · … groups. Enable alerts must be on first (off by default), and every event is off by default.

ทุกเหตุการณ์ที่ติ๊กไว้และเกิดในแท่งเดียวกัน มาในข้อความเดียว คั่นด้วย · ในรูปแบบ MFI+ · XAUUSD 5m — MFI turned bull @ 56.31 ตัวเลขหลัง @ คือค่า MFI ของแท่งนั้น (ไม่ใช่ราคา) ไทม์เฟรมเขียนพร้อมหน่วย (5m, 1h, 1D) alert ของไดเวอร์เจนซ์ตามการซ่อนของโมดูลด้วย ส่วน alert ของสถานะไม่ขึ้นกับโมดูลใดEvery ticked event raised on one bar arrives in one message, joined with ·, in the form MFI+ · XAUUSD 5m — MFI turned bull @ 56.31. The number after @ is that bar's MFI, not the price; the timeframe carries its unit (5m, 1h, 1D). Divergence alerts follow the module's visibility; state alerts belong to no module and always can fire.

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

  • จุดสีส้มเหนือแท่งราคาคือแท่งที่มี alert บันทึกใต้กราฟเป็นข้อความที่จะได้รับ กดเพื่อไปที่แท่งนั้นAn orange dot over a price bar marks an alert; the log under the chart shows the messages; press one to go to its bar.
  • กราฟนี้เปิด Enable alerts ไว้ให้ (เฉพาะการ์ดนี้)This card has Enable alerts on (this card only).

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.

Alertsสวิตช์หลักMaster switch2
Alerts · DivergenceDivergence1
Alerts · StateสถานะState3

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

  1. สถานะเปลี่ยนบ่อยแค่ไหนHow often the state changes

    เปิด Turned bull / bear แล้วนับรายการ จากนั้นเปลี่ยน Length เป็น 14 ในส่วนที่ 1 แล้วกลับมาดูSwitch Turned bull / bear on and count the entries; then set Length to 14 and look again.

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

  • ตัวเลขหลัง @ ไม่ใช่ราคาThe number after @ is not a price

    ข้อความของ MFI+ ลงท้ายด้วยค่า MFI ทศนิยมไม่เกินสองตำแหน่งMFI+ messages end with the MFI value, to at most two decimals.

  • ติ๊กแล้วไม่มี alertTicked, but nothing arrives

    ต้องเปิด Enable alerts และสร้าง alert แบบ Any alert() function call alert ไดเวอร์เจนซ์ต้องเปิดโมดูลและไม่ถูกซ่อนบนไทม์เฟรมนั้นEnable alerts must be on and an Any alert() function call alert must exist; divergence alerts also need the module on and not hidden on that timeframe.

อ้างอิงReference

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

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