peace of mind Version: 1.0

×

Peace of Mind Indicator - Complete Explanation

This MetaTrader 4 (MT4) indicator, called "Peace of Mind", is a trend-following and stop-loss management tool based on Bollinger Bands. It helps traders identify trend direction, potential reversals, and optimal stop-loss levels.


Key Features

1. Indicator Components

The indicator consists of six buffers (arrays) that display different elements:


BufferDescriptionVisual Style

UpTrendBufferBullish trend stop level (dynamic support)Arrow (159)

DownTrendBufferBearish trend stop level (dynamic resistance)Arrow (159)

UpTrendSignalBuy signal when trend shifts bullishArrow (233)

DownTrendSignalSell signal when trend shifts bearishArrow (234)

UpTrendLineContinuous line showing bullish trend stops (if Line=1)Line (Lime)

DownTrendLineContinuous line showing bearish trend stops (if Line=1)Line (Gold)

2. Input Parameters

ParameterDescription

LengthBollinger Bands period (default: 8)

DeviationStandard deviation multiplier (default: 1)

MoneyRiskAdjusts stop levels (higher values widen stops, default: 1.0)

SignalControls signal display: 0 (only stops), 1 (signals + stops), 2 (only signals)

LineToggles trend lines: 0 (off), 1 (on)

NbarsNumber of bars to calculate (default: 1000)

SoundONEnables/disables alert sounds (default: true)

How It Works

1. Bollinger Bands Foundation

The indicator uses Bollinger Bands (iBands) to determine:


Upper Band (MODE_UPPER) → Resistance


Lower Band (MODE_LOWER) → Support


2. Trend Detection Logic

Bullish Trend (trend=1):


Triggered when price closes above the upper Bollinger Band.


The stop level (bsmin) adjusts dynamically, acting as trailing support.


Bearish Trend (trend=-1):


Triggered when price closes below the lower Bollinger Band.


The stop level (bsmax) adjusts dynamically, acting as trailing resistance.


3. Stop Calculation

The indicator modifies the Bollinger Bands stops using:


Bullish Stop = Lower Band - 0.5*(MoneyRisk-1)*(Band Width)


Bearish Stop = Upper Band + 0.5*(MoneyRisk-1)*(Band Width)


This adjustment allows traders to widen or tighten stops based on volatility.


4. Signal Generation

Buy Signal (Lime Arrow, Code 233):


Generated when price shifts from bearish to bullish (UpTrendBuffer[shift+1] == -1).


Sell Signal (Gold Arrow, Code 234):


Generated when price shifts from bullish to bearish (DownTrendBuffer[shift+1] == -1).


5. Alerts

If SoundON=true, the indicator sends alerts when:


Buy Signal: "BBands Stop Alert Buy -- [Symbol]@TF[Timeframe]"


Sell Signal: "BBands Stop Alert Sell -- [Symbol]@TF[Timeframe]"


Practical Trading Applications

1. Trend-Following Strategy

Go Long (Buy) when:


Price closes above the upper Bollinger Band.


The UpTrendSignal arrow appears.


Place stops at UpTrendLine.


Go Short (Sell) when:


Price closes below the lower Bollinger Band.


The DownTrendSignal arrow appears.


Place stops at DownTrendLine.


2. Stop-Loss Management

The trend lines (UpTrendLine & DownTrendLine) act as trailing stops.


Adjust MoneyRisk to control stop distance:


MoneyRisk=1.0 → Default Bollinger Bands width.


MoneyRisk=1.5 → Wider stops (less sensitive).


MoneyRisk=0.5 → Tighter stops (more aggressive).


3. Reversal Signals

When the trend changes, the indicator marks it with arrows, helping traders spot reversals early.


Conclusion

The "Peace of Mind" indicator is a versatile tool for:

✅ Trend identification (bullish/bearish shifts)

✅ Stop-loss placement (dynamic trailing stops)

✅ Signal-based trading (arrows for entries)

✅ Risk management (adjustable stop width)


It works best in trending markets and can be combined with other indicators (e.g., RSI, MACD) for confirmation.



Leave a comment

$20