valhalla_trader

MAC Spikes(Adam H Grimes)

valhalla_trader Uppdaterad   
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).
Versionsinformation:
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.
Versionsinformation:
updated to have control of upper and lower thresholds
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?