valhalla_trader

MAC Spikes(Adam H Grimes)

valhalla_trader Aktualisiert   
From Adam H Grimes: "Introducing a New Tool: The MAC Spike"

Mean Absolute Change Spikes (“MAC Spikes”).

Here are the steps to calculate it:

-Convert each day’s closing price to a change (difference) by subtracting it from the previous day’s closing price.
-Take the absolute value of that change.
-Average the past 20 days absolute values to create the baseline.
-Divide today’s change by yesterday’s baseline. (Still offsetting by one day.)

MAC Spikes- Indicator:

-Indicator Setup: The script defines an indicator with the name "MAC Spikes", not overlaying the main chart, and allows up to 99 lines to be plotted.
-User Inputs: It provides several user-configurable inputs, such as:
Length for standard deviation calculation (len).
-Type of spike to monitor (spikeType), with options for close, range, or open spikes.
-Option to filter spikes based on a threshold (filtered).
-The threshold value for spike significance (spike_thresh).
-Whether to display the spike histogram (disp_Spike).
-Line width for plotting (lw).
Versionshinweise:
Introducing a New Tool: The MAC Spike
-Convert each day’s closing price to a change (difference) by subtracting it from the previous day’s closing price.
-Take the absolute value of that change.
-Average the past 20 days absolute values to create the baseline.
-Divide today’s change by yesterday’s baseline. (Still offsetting by one day.)

How does this measure compare to Sigma Spikes?
-it’s very similar.
-MAC Spikes, at the extremes, are consistently larger (smaller, for downward moves) than Sigma Spikes.
-For values closer to zero, the difference is not as consistent.

The biggest advantage we’ve gotten from this change is that, first, the calculation is much easier to explain. Standard deviation is not complex, but standard deviation of returns can highlight outliers in ways that are not immediately intuitive to all readers. Second, a MAC Spike of five is now exactly what you think it is: that market just made a move that is five times its average daily move.

Take a look at this tool and see if it might be more useful in your own work and thinking about markets.
Versionshinweise:
updated to have control of upper and lower thresholds
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?