Maydo

Market Sniper

This Pine Script is a simplified trading algorithm designed to detect and signal potential buying and selling points based on the WaveTrend Oscillator and the volume traded.

Inputs and Setup:
The script initiates by defining key parameters: 'Wave Channel Length' (n1) set at 9 and 'Wave Average Length' (n2) set at 12. It also establishes a 'Volume Multiplier' (set at 2), and a 'Lookback Period' for volume calculation (set at 60 minutes). These values can be customized according to user preferences.

WaveTrend Oscillator Calculation:
It then calculates the WaveTrend Oscillator. The WaveTrend Oscillator is a momentum-based indicator that determines trend direction and potential reversal points. This is accomplished by applying an exponential moving average (EMA) and a simple moving average (SMA) to the average price data.

Volume Average Calculation:
Simultaneously, the script calculates the simple moving average of the volume over the defined 'Lookback Period'.

Buy and Sell Signals Definition:
The core of the trading signals lies in the crossing of the two lines of the WaveTrend Oscillator (wt1 and wt2) and whether the volume is higher than a certain threshold (defined by the 'Volume Multiplier' times the average volume). Specifically:

A 'Buy' signal is defined when the wt1 line crosses up the wt2 line and the volume is greater than the 'Volume Multiplier' times the average volume.
Conversely, a 'Sell' signal is defined when the wt1 line crosses down the wt2 line and the volume is greater than the 'Volume Multiplier' times the average volume.
Signal Plotting and Alert Creation:
Each time a 'Buy' or 'Sell' condition is met, the script plots a corresponding label directly on the price chart: a 'Buy' label below the bars for buy signals, and a 'Sell' label above the bars for sell signals. Additionally, it sets alerts based on these 'Buy' and 'Sell' signals with corresponding messages.
Script protetto
Questo script è pubblicato con codice protetto, ma puoi comunque usarlo gratuitamente. Mettendolo tra i preferiti potrai applicarlo al grafico, senza però la possibilità di visualizzare o modificare il codice sorgente.
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?