Optuma Forums › Optuma Scripting › macd pivot › Reply To: macd pivot
May 15, 2020 at 11:01 am
#58075

- Topics: 5
- Replies: 332
- Posts: 337
Hi Peter,
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:
1 2 3 4 5 |
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: