Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Prosperity Index Spike Pattern - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

Boom Index Spike Pattern - indicator for MetaTrader 5

Boom Index Spike Pattern - indicator for MetaTrader 5

First candle: Green, large real body (bullish spike).

Second candle: red (pullback).

Third candle: Green, larger real body (bullish spike).

When this pattern occurs, the zone has been created .

A blue rectangle is drawn from the high/low range of 3 candles.

A lime green horizontal entry line is drawn at the opening price of the middle (second) candle.

This line extends far into the future until price returns.

Boom Index Spike Pattern - indicator for MetaTrader 5

 MQ5 input color box color = clear blue ; // 3 candle form box color
Input color entry line color = Clelem ; // Input line color
Input ENUM_LINE_STYLE entry line style = style_entity ; // Enter the style of the line
Input integer box width = 2 ; // width of box border
Input integer entrance line width = 2 ; //Input line width
Enter integer entrance line length = 200 ; // How far the relief line extends ````
These inputs give you complete control over the style of the box and input lines.

We look for a 3 candle bullish pattern

1. First Candle – Strong Bullish (Spike)

2. Second Candle – Bearish Retracement

3. Third Candle – Strong Bullish Again

When this happens, we draw:

- There is a frame around the pattern

- The horizontal line of the opening price of the second candle (entry point

Once price returns to this line ("eases"), we shorten the line and avoid redrawing it.

 structure pattern information {
  date time time; // time of pattern double the entry; // entry price (opening price of the second candle) double the high; // high of 3 candles double the low; // low of 3 candles boolean relief ; // Has the price returned to the entry level? };

CArrayObj activePatterns;
````
We use a struct `PatternInfo` to keep track of each valid pattern and store it in an array. This helps avoid duplication of processing.

Initialization function

 Integer initialization () {
IndicatorSetInteger ( INDICATOR_DIGITS , _numbers );
arrayInit (activeMode, 0 );
Return initialization successful ;
}
````
We set the indicator precision and prepare the array.


Pattern detection (per tick)

 ````mq5 order ( integer i = limit - 3 ; i >= 0 ; i --) {
````
We cycled through the candles and came back looking at 3 bars.

````mq5 if (is bullish(i+ 2 ) && is bearish(i+ 1 ) && is bullish(i))
````
We check if the last 3 candles match the spike pattern: green-red-green.

````mq5
Double high = MathMax(MathMax(High[i], High[i+ 1 ]), high[i+ 2 ]);
Double Low = MathMin(MathMin(Low[i], Low[i+ 1 ]), Low[i+ 2 ]);
Duplex input = open[i+ 1 ];
````
We extract the high/low order box and entry level from this 2nd (middle) candle.

````mq5
Mode information * mode = new mode information;
mode.time = time[i];
mode.entry = entry;
mode.high = high;
mode.low = low;
mode.mitigation = false;
````
Create and add this pattern to our list .
picture frame and lines
````mq5
String box name = "box_" + IntegerToString(time[i]);
ObjectCreate( 0 , box name, OBJ_RECTANGLE, 0 , time[i+ 2 ], high, time[i], low);
````
Draw a rectangle (box) from this 3 -candle pattern.

````mq5
String row name = "entry line_" + IntegerToString(time[i]);
ObjectCreate( 0 , rowname, OBJ_TREND, 0 , Time[i], entry, Time[i] + periodSeconds() * EntryLineLength, entry);
````
Draw the entry line from this 2nd candle opening forward in time.

Mitigation check (check every time)

 Loop through all patterns:
```` mq5order ( integer p = 0 ; p < activePatterns.Total(); p++) {
  PatternInfo *pt = (PatternInfo*)activePatterns.At(p);
````
If not relieved, check:
````mq5 if (!pt.mitigated && low [ 0 ] <= pt.entry)
````
If current prices reach entry level:
````mq5
pt.mitigation = true ; object delete ( "entry line_" + integer to string (time point));
````
Delete the original long line.

````mq5 object creation ( 0 , "ease line_" + integer to string (time point), OBJ_trend , 0 ,
Click time, click item,
time[ 0 ], pt.entry);
````
Create a short line showing where the relief occurs.
 Accessibility ### Checking Bullish/Putish:
````mq5 boolean is bullish( integer i) {
return close[i] > open[i];
} boolean is put( integer i) {
return close[i] < open[i];
}

This indicator is simple but powerful:

You can now conduct live testing on the Boom 500 or Boom 1000.


Attachment download

📎candel_2.mq5 (10.74 KB)

Source: MQL5 #61749

Prosperity Index Spike Pattern - Important Points Before Using the MetaTrader 5 Script

This page has been supplemented with structured instructions, focusing on the purpose of trading scripts, MT4/MT5 platform compatibility, testing procedures and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.

Suitable for who to use

  • Users who want to quickly screen trading scripts and are willing to do simulation verification first.
  • People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
  • Traders who wish to record backtests, parameters and risk boundaries before placing a trade.

Testing and risk control suggestions

  • First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
  • Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
  • It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.

FAQ

Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.

Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.

What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .

English Search Notes

This page is also optimized for English search intent around Prosperity Index Spike Pattern - MetaTrader 5 script . Related search terms include: trading script, MT4 script, MT5 script. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.

Verification code Refresh