Custom Bear Power Input - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resource



Two settings have been added to the input parameters: line color ( color ) and line width ( width ).

Why are line color ( color ) and line width ( width ) provided as input parameters, while line color and width in standard indicators can be changed manually ? If you test the strategy in the tester, or if the indicator is added to the chart by the Expert Advisor ( added via Chart Indicators ), Bears Power is always displayed with default color and width:

In my opinion, such a display is not very convenient, so here we customize an indicator to customize the bearing power input (use customization ), and pass the color and width through parameters.
//--- Create a handle for the iBearsPower indicator handle_iBearsPower= custom (m_symbol.Name(), period (), "Customize Bears Power Input" , InpMAP period, Inp bear color , Inp bear with ); //--- if handle is not created if (handle_iBearsPower== INVALID_HANDLE ) { //--- Inform of failure and output error code printing format ( "Unable to create handle of iBearsPower indicator for symbol %s/%s, error code %d" , symbol (), Enumeration to string ( period ()), getLastError ()); //--- The indicator stops returning early ( initialization failed ); }
This allows you to see prettier indicators on the tester or terminal chart:

Attachment download
📎 custom_bears_power_inputs.mq5 (7.78 KB)
Source: MQL5 #21781
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •