Deterministic Boltzmann-like Energy Indicator (No randomness)
Description:
This Lua indicator for FXCM Trading Station 2 calculates a deterministic "Energy" value inspired by Boltzmann Machines. It provides clear signals regarding trend strength and direction based purely on momentum and volatility, without any random or stochastic elements.
How it works:
The indicator calculates two main components:
- Momentum: Difference between the current closing price and the closing price from a defined lookback period.
- Volatility: Average absolute price change over the same lookback period.
Using these two components, the indicator calculates the "Energy," which indicates how strongly price is trending:
- Code: Select all
Energy = Momentum / Volatility
Interpretation of Energy Values:
- Positive Energy: Indicates a strong upward market trend.
- Negative Energy: Indicates a strong downward market trend.
- Energy near zero: Indicates weak or sideways market movements.
Indicator Parameters:
- Lookback Period: Number of bars used to calculate momentum and volatility (default: 14, recommended range: 5-30).
Visual Settings:
- Positive Energy Color: Green bars indicate a bullish or upward trend.
- Negative Energy Color: Red bars indicate a bearish or downward trend.