OPEN-SOURCE SCRIPT

McMillan's VIX 20/200 DMA Trend Signal (No Look-Ahead)

484
Key Changes Made:
Index Shifting [1]: In the low_vol_regime_cond and high_vol_regime_cond definitions, I added [1] to vix_close, vix20, and vix200. This forces the script to look at the data from the candle that just closed, rather than the data of the candle the signal is currently printing on.
Logic Logic: The regime variable now updates based on that confirmed historical data. This means the background color and the triangles will only appear on the first bar of the "new" day (or the next candle if you are on a lower timeframe) after the VIX conditions have been met and locked in.
Table Update: The info table now displays the "Last Close" values for the VIX and its MAs to reflect what is actually driving the current signal.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน