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

Custom Bull Power Input - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Custom Bulls Power Inputs - indicator for MetaTrader 5

Custom Bulls Power Inputs - indicator for MetaTrader 5

Custom Bulls Power Inputs - indicator for MetaTrader 5

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

Custom Bulls Power Inputs - indicator for MetaTrader 5

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 the indicator is added to the chart by Expert Advisor ( added via Chart Indicator ), Bulls Power is always displayed with default color and width:

Custom Bulls Power Inputs - indicator for MetaTrader 5

In my opinion, such a display is not very convenient, so here we customize an indicator to customize the Bulls power input (use customization ), and pass the color and width through parameters.

 //--- Create a handle to the iBullsPower indicator handle_iBullsPower= custom (m_symbol.Name(), period (), "Customized Bulls power input" ,
                            InpMAP period, InpBullsColor , InpBulls ); //--- if handle is not created if (handle_iBullsPower== INVALID_HANDLE )
    {
//--- Inform of failure and output error code print format ( "Unable to create handle of iBullsPower 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:

Custom Bulls Power Inputs - indicator for MetaTrader 5


Attachment download

📎 custom_bulls_power_inputs.mq5 (7.8 KB)

Source: MQL5 #21780

Verification code Refresh