Lion Trend S
Похожие материалы по тегам
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «indicator lion trend s_5974369984854367030.pine» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
О программе
Lion Trend S — это индикатор для TradingView, накладывающий на график комплексный анализ тренда. Он объединяет расчёты Heikin Ashi, облачную зону скользящих средних EMA и линию Half Trend, окрашивая элементы в зависимости от текущего направления тренда.
Индикатор вычисляет несколько экспоненциальных скользящих средних (EMA 9, 21, 55, 100, 200, 300) и определяет бычий или медвежий тренд по соотношению цены с диапазоном между ними. Цвет облачной зоны и EMA-линий меняется в соответствии с выявленным трендом, а при необходимости отображаются свечи Heikin Ashi.
В состав также входят линия Half Trend на основе скользящей средней и экстремумов, а также индикатор SuperTrend с возможностью отображения сигналов покупки и продажи. Дополнительно реализованы визуальные инструменты уровней стоп-лосса и двух тейк-профитов, отрисовываемые линиями и метками с настраиваемым внешним видом.
Все компоненты настраиваются пользователем: цвета трендов, периоды и параметры расчётов, отображение сигналов, смещение и стиль графических элементов. Индикатор работает поверх графика и не является торговым советником.
Настройки программы
| Настройка | Описание |
|---|---|
| showHA | Включить Heikin Ashi — Включение или отключение отображения свечей Heikin Ashi |
| up_trend_color | Цвет бычьего тренда — Цветовая тема для бычьего тренда |
| dn_trend_color | Цвет медвежьего тренда — Цветовая тема для медвежьего тренда |
| ht_enable | Включить Half Trend — Включение или отключение отображения линии Half Trend |
| amp | Амплитуда Half Trend — Длина периода для расчёта Half Trend |
| Periods | Период ATR SuperTrend — Период ATR для расчёта SuperTrend |
| src | Источник SuperTrend — Источник данных для расчёта SuperTrend |
| Multiplier | Множитель ATR SuperTrend — Множитель ATR для расчёта SuperTrend |
| changeATR | Метод расчёта ATR SuperTrend — Переключатель метода расчёта ATR для SuperTrend |
| showsignals | Показывать сигналы покупки/продажи — Отображение сигналов покупки и продажи SuperTrend |
| offset | Смещение от последней свечи — Смещение от последней свечи для отображения TP/SL |
| len | Длина линий — Длина линий TP/SL |
| labelSizeOption | Размер меток — Размер меток TP/SL |
| lineWidth | Толщина линий — Толщина линий TP/SL |
| lineStyleOption | Стиль линий — Стиль линий TP/SL |
Поиск по коду файла
indicator("Lion Trend S",overlay = true)
showHA = input.bool(true, "Enable Heikin Ashi")
haClose = (open + high + low + close) / 4
var float haOpen = na
haOpen := na(haOpen) ? (open + close) / 2 : (haOpen + haClose[1]) / 2
haHigh = math.max(high, math.max(haOpen, haClose))
haLow = math.min(low, math.min(haOpen, haClose))
emaSrc= haClose
up_trend_color= input.color(#00bcd4,"BULL TREND THEME")
dn_trend_color=input.color(#e91e63,"BEAR TREND THEME")
price=plot(haClose,display = display.none)
emma300=ta.ema(emaSrc, 300)
emma200=ta.ema(haClose,200)
lowest_h=math.min(emma200,emma300)
highest_h=math.max(emma200,emma300)
emma100=ta.ema(haClose,100)
emma55=ta.ema(haClose,55)
lowest_l=math.min(emma100,emma55)
highest_l=math.max(emma100,emma55)
final_lowest=math.min(lowest_h,lowest_l)
final_highest=math.max(highest_h,highest_l)
var bool isUpTrend=false
var bool isDnTrend=false
var color emaColor=na
upTrend=haClose>final_lowest
dnTrend=haClose<final_highest
if(upTrend)
isUpTrend:=true
emaColor:=up_trend_color
if (dnTrend)
isDnTrend:=true
emaColor:=dn_trend_color
if upTrend and dnTrend
emaColor:=emaColor[1]
ema200 = plot(ta.ema(emaSrc,200), title='EMA 200', linewidth=3, color=color.new(emaColor, 50), offset=0, display=display.none)
fill(price, ema200, title='EMA 200 Fill', color=color.new(emaColor, 90), editable=true)
ema9 = plot(ta.ema(emaSrc,9), title='EMA 9', linewidth=3, color=color.new(emaColor,90), offset=0, display=display.none)
fill(price, ema9, title='EMA 9 Fill', color=color.new(emaColor, 90), editable=true)
ema21 = plot(ta.ema(emaSrc,21), title='EMA 21', linewidth=3, color=color.new(emaColor, 50), offset=0, display=display.none)
fill(price, ema21, title='EMA 21 Fill', color=color.new(emaColor, 90), editable=true)
ema55 = plot(ta.ema(emaSrc,55), title='EMA 55', linewidth=3, color=color.new(emaColor, 50), offset=0, display=display.none)
fill(price, ema55, title='EMA 55 Fill', color=color.new(emaColor, 90), editable=true)
ema100 = plot(ta.ema(emaSrc,100), title='EMA 100', linewidth=3, color=color.new(emaColor, 50), offset=0, display=display.none)
fill(price, ema100, title='EMA 100 Fill', color=color.new(emaColor, 90), editable=true)
plotcandle(showHA ? haOpen : na,showHA ? haHigh : na,showHA ? haLow : na,showHA ? haClose : na,title="Heikin Ashi Candles",color=emaColor,wickcolor=emaColor,bordercolor=emaColor)
bool ht_enable=input.bool(true,"Enable Half Trend Indicator",group = "Half Trend Indicator")
int amp = input.int(5, 'Amplitude', minval = 1,group = "Half Trend Indicator") // Length for indicator calculations
series float closeMA = ta.sma(close, amp) // Moving average of close prices
series float highestHigh = ta.highest(amp) // Highest high over the period
series float lowestLow = ta.lowest(amp) // Lowest low over the period
var float hl_t=0.0
if barstate.isfirst
hl_t := close
hl_t
switch
closeMA < hl_t and highestHigh < hl_t =>
hl_t := highestHigh
hl_t
closeMA > hl_t and lowestLow > hl_t =>
hl_t := lowestLow
hl_t
=>
hl_t := hl_t
hl_t
plot( ht_enable ? hl_t:na,title = "Half Trend", color = emaColor, linewidth = 2, editable = true)
Periods = input(title = 'SuperTrend ATR Period', defval = 10,group="SuperTrend")
src = input(hl2, title = 'SuperTrend Source')
Multiplier = input.float(title = 'SuperTrend ATR Multiplier', step = 1, defval = 3,group="SuperTrend")
changeATR = input(title = 'SuperTrend Change ATR Calculation Method ?', defval = true,group="SuperTrend")
showsignals = input(title = 'Show Buy/Sell Signals ?', defval = true,group="SuperTrend")
atr2 = ta.sma(ta.tr, Periods)
atr = changeATR ? ta.atr(Periods) : atr2
up = src - Multiplier * atr
up1 = nz(up[1], up)
up := close[1] > up1 ? math.max(up, up1) : up
dn = src + Multiplier * atr
dn1 = nz(dn[1], dn)
dn := close[1] < dn1 ? math.min(dn, dn1) : dn
trend = 1
trend := nz(trend[1], trend)
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
buySignal = trend == 1 and trend[1] == -1 and emaColor==up_trend_color
sellSignal = trend == -1 and trend[1] == 1 and emaColor==dn_trend_color
useFractal = true//input.bool(true, title = 'Use Fractal for Stop Loss', group = 'Trade Levels')
tradeSide = emaColor==up_trend_color?"Buy":"Sell"
showLabels = true// input.bool(true, title = 'Show TP&SL Labels?', group = 'TP&SL STYLE')
offset = input.int(10, title = 'Offset from Last Bar', minval = 1, maxval = 100, group = 'TP&SL STYLE')
len = input.iПоказано первые 50% кода (символов: 7637)
Открыть по тарифу
Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.
Разовая покупка файла
На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.
Зачем нужен email? После подтверждения оплаты файл сохранится в кабинете на этот email. Если аккаунта ещё нет, мы создадим его и пришлём ссылку для задания пароля. Если аккаунт уже есть, покупка добавится в него. Укажите адрес, к которому у вас есть доступ.
Чтобы оформить заказ, введите email и перейдите к оплате.