Attachments forums

List of attachments posted on this forum.


All files on forums: 136768

Re: MT4 Indicator requests and ideas

dmnik, Wed Dec 06, 2023 2:24 am

kvak wrote: Tue Dec 05, 2023 10:12 am I little correct code lines....how you want use this levels?
Image
Hello kvak! The issue with the indicator still persists: it seems that the channel lags and then suddenly appears. Please review this issue. Thank you for your attention!

This Pine Script for TradingView creates an indicator that visualizes channels based on the Average True Range (ATR). Here's a breakdown of the key aspects:

Settings:
Pips:

This parameter defines how far the upper and lower levels will be from the current minimum and maximum. A value of 0.5 likely represents half a pip.
ATR Length:

This parameter sets the period for calculating the Average True Range (ATR). In this case, 14 periods are used.
Multiplier for monATR2:

This parameter determines the multiplier for the second ATR level (monATR2), used to create a wider range.
Logic and Channel Construction:
ATR Calculation:

monATR - is the Average True Range for 14 periods.
monATR2 - is the doubled value of the Average True Range for the same period, multiplied by the multiplier.
Upper Levels:

up1, up2, up3, up4 - are calculated based on the previous and current minimum, decreased by pips, and increased by monATR or monATR2.
Lower Levels:

dn1, dn2, dn3, dn4 - are calculated based on the previous and current maximum, increased by pips, and decreased by monATR or monATR2.
Channel Construction:

The upper channel is built using the lines up3 and up4, represented by blue color.
The lower channel is built using the lines dn3 and dn4, represented by red color.
Display on the Chart:
The plot function is used to display linear plots with different colors and styles.
Upper lines are blue (#2196f3).
Lower lines are red (#ff5252).
The plots are drawn with a line thickness of 2 pixels for better visibility.
How It Works:
The channel is constructed around current and previous minimums and maximums, taking into account market volatility measured by ATR.
Four lines (upper and lower) allow visualizing potential support and resistance zones based on current volatility.
All files in topic