Median Candle

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Median Candle

Postby Apprentice » Tue Apr 01, 2025 4:17 am

EURUSD D1 (04-01-2025 1144).png

Calculation (Update function):
Called for each bar/candle (period) to calculate and update indicator values.

Logic varies based on the "Repetitions" parameter:

Calculation Logic:
Repetitions = 0:

Original candle prices are displayed without modification.

Repetitions > 0:

The indicator calculates the median price by averaging the current and previous periods' OHLC values for the first repetition.

For subsequent repetitions, each OHLC value is recalculated as the average of the previously smoothed values from the current and preceding period.

After the set number of repetitions, the final smoothed candle values (open, high, low, close) are plotted.

Practical Use:
The indicator provides clear visualization of price trends, filtering out short-term volatility and noise
Median Candle.lua
(7.45 KiB) Downloaded 308 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38821
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 121 guests