- Topics: 5
- Replies: 487
- Posts: 492
MACD has its own scripting function, OSC() is for other tools, so the values won’t match.
Additionally as the Pivot is calculated from the MACD data you don’t need to set a Time Frame override on that line, just the MACD.
The adjusted script is:
V1 = MACD(Week(PERIODAMOUNT=1), BAR1=12, BAR2=24);
V2 = PIVOT(V1, MIN=22) ;
V1 < 0 and V2 < 0
On the chart the Show Bars on the daily time frame match those on the Weekly: