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

Resistance and Support - MetaTrader 5 Script | Forex Indicator Downloads - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 6 reads | 0 comments |

Resistance & Support - indicator for MetaTrader 5

The drawing of resistance and support lines is based on the fractal indicator. The indicator takes into account the fact that the last value of the fractal can be redrawn, therefore +5 additional bars are analyzed :

 //--- Integer number of values ​​to copy from iFractals indicator Values ​​to copy =- 1 ; //--- If this is the first start of indicator calculation if (previous calculation == 0 )
      value_to_copy=rates_total;
other {
//--- This means that this is not the first time the indicator is calculated and since the last call to OnCalculate() //--- no more than one bar is added to the calculation //--- the value "+5" - due to the properties of drawing fractals
      value_to_copy=(rates_total-prev_calculated)+ 5 ; }

In order to compare Resistance & Support and Fractals in the Strategy Tester, do the following:

The test of the "Resistance and Support" indicator in the strategy tester looks like this:

Resistance & Support - indicator for MetaTrader 5


Attachment download

📎 resistance_l_support.mq5 (14.11 KB)

Source: MQL5 #19241

Verification code Refresh