OPEN-SOURCE SCRIPT
Atualizado Spike EA Trade Strategy

Spike EA Trade Strategy is a price-action backtesting script inspired by an MT4/MT5 expert advisor logic.
The strategy detects spike candles by measuring the range between the high and low of a selected previous bar. If the range is greater than or equal to the configured threshold, the candle direction is used for trade direction. A bullish spike candle triggers a long setup, while a bearish spike candle triggers a short setup.
The default settings are designed around USDJPY on the 15-minute chart. The default spike threshold is 0.5 with a price unit of 1.0, which represents approximately a 0.5 yen candle range on USDJPY.
The strategy version includes approximate stop loss and take profit price-distance settings for TradingView Strategy Tester. Broker-specific execution details such as spread, slippage, order rejection, margin checks, lot handling, and MT4/MT5 magic number management are not replicated.
This script is intended for chart analysis, backtesting support, research, and educational purposes only.
It does not guarantee future performance and should not be considered financial advice.
Please test carefully before using it in any trading decision.
The strategy detects spike candles by measuring the range between the high and low of a selected previous bar. If the range is greater than or equal to the configured threshold, the candle direction is used for trade direction. A bullish spike candle triggers a long setup, while a bearish spike candle triggers a short setup.
The default settings are designed around USDJPY on the 15-minute chart. The default spike threshold is 0.5 with a price unit of 1.0, which represents approximately a 0.5 yen candle range on USDJPY.
The strategy version includes approximate stop loss and take profit price-distance settings for TradingView Strategy Tester. Broker-specific execution details such as spread, slippage, order rejection, margin checks, lot handling, and MT4/MT5 magic number management are not replicated.
This script is intended for chart analysis, backtesting support, research, and educational purposes only.
It does not guarantee future performance and should not be considered financial advice.
Please test carefully before using it in any trading decision.
Notas de Lançamento
The default settings are designed around USDJPY on the 15-minute chart.Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.