valhalla_trader

MAC Spikes(Adam H Grimes)

valhalla_trader Aggiornato   
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).
Note di rilascio:
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.
Note di rilascio:
updated to have control of upper and lower thresholds
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?