FTS Toolkit - Bandwidth Ratio - Indicator showing relative Bollinger Band levels

Peter O

Special Consultant to the FPA
Messages
4,766
Fellow Squad Members,


Here is a simple custom indicator that calculates price levels on a scale of standard deviation (Bollinger Bands). That is when price pierces Bollinger Band dev = 2.0 the value of this indicator is 2.0 or -2.0 (upper band and lower band respectively).


Installation and starting:

Download source code from here:



This is a custom indicator code so you need to copy it to {MetaTrader4 folder}/experts/indicators folder and then start the trading platform (or close and restart if it had been open). The tool will appear on Navigator panel (open from View menu) among Custom Indicators as FPA=BandwidthRatio so just drag over your chart.



Settings and Parameters:

You can open Properties window by right clicking indicator line and selecting the first menu item.


On the Inputs tab you will see the only input parameter:


Parameter: Deviation_Period
Possible values: positive integer

This is the calculation period in candles of the moving average and standard deviation (Bollinger Bands) by which bandwidth ratio is calculated.



You can participate:

Tell me and your Squad Members how you like it.
Tell me and your Squad Members how could it be better.
Tell me and your Squad Members if you have any problem while installing or using it.


Who wants to enter the Laboratory:

Right click on Navigator panel/Custom Indicators/FPA=BandwidthRatio and select Modify. MetaEditor opens up showing the full source code I've written for you.


On the first screen you can find some hidden parameters like colors and styles (from line "string indicator_name = ..." to "color indicator_level_line_color = ..."). You can change the values after the equal sign (you can use these color names just write them without spaces and be aware of case sensitivity) and even the default setting "20" above them for the input parameter "extern int Deviation_Period = ...".


After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.


Looking forward to hearing your feedback,

Peter
 
Last edited by a moderator:
I tested all source code links and eventually I replaced all of them because I saw downloading issue in Firefox.

Now I've tested new links and all worked fine for me in Firefox and Chrome as well.

Peter
 
Back
Top