Indicators
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
How to installHow to install cBots & Indicators
- Download the Indicator or cBot.
- Double-click on the downloaded file. This will install all necessary files in cAlgo.
- Find the indicator/cbot you want to use from the menu on the left.
- Add an instance of the indicator/cBot to run.
- Download the Indicator
- Double-click on the downloaded file. This will install all necessary files in cTrader.
-
Select the indicator from Custom in the functions (f) menu in the top center of the chart
- Enter the parameters and click OK
Japsian (IchimokuPlus)
1
0
141
free
28 Jan 2023
This indicator is based on "Ichimoku", and with its additional and useful features, it can help traders to get the right positions and help analysts to have an accurate analysis.
Additional features used in this indicator are:
It has two extra KijunSen that user can adjust the period and properties of their lines.(eg 103 and 207)
It has a QualityLine and DirectionLine, which is the same KijunSen that shift 26 Candle to the front and back.
Using these two lines can be a great help in Trading and analysis.
There is a separate "KijunSen" and "TenkanSen" With different settings for shifting forward or backward to the user's desired number
Adjust and modify the Kumo and Chikou and TenkenSen and extra KijunSen and QualityLine and DirectionLine shift to the desired value.
Adjust and change the color of the Kumo.
Show the maximum and minimum Price lines for Last month on the chart.
These two lines are very powerful and strong resistance and support.
All features above have the ability to enable or disable, And the user can change their properties, such as color, thickness and type of lines.
DR/IDR for cTrader
7
0
452
free
22 Dec 2022
This script is showing the IDR and DR for the regular trading session and for the overnight session based on the rules from the creator of the DR / IDR concept.
It works for all major Forex Pairs, BTC , ETH and the US Equity indices. This concept is based on rules and has a 80 % probability to be correct.
It should be applied in the 5 Min. Timeframe.
The timings for the RDR are from 09.30 - 10.30 am New York local time.
The timings for the ODR are from 03.00 - 04.00 am New York local time.
Rules:
1. If price in the 5 Min timeframe closes above the DR high after 10.30 am or 04.00 am then the DR low will be with 80 percent probability the low of the trading session. This is called confirmation.
2. If price in the 5 Min timeframe closes below the DR low after 10.30 am or 04.00 am then the DR high will be with 80 percent probability the high of the trading session. This is called confirmation.
3. If price closes above the IDR high after 10.30 am or 04.00 am it is an early indication that the low of the DR will be the low of the day and vice versa.
For more information:
SupportResistance
2
0
666
by cxc_g
free
23 Nov 2022
//+------------------------------------------------------------------+
//| SupportResistance |
//| Copyright © 2016, UCHE OBI |
//| Developer:UCHE OBI |
//| Skype: OBI.UCHE |
//| email:ucheceleste@Gmail.com |
//+------------------------------------------------------------------+
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class SupportResistance : Indicator
{
[Parameter(DefaultValue = 10)]
public int range { get; set; }
[Parameter(DefaultValue = 3)]
public int confirmations { get; set; }
[Output("Res", Color = Colors.Black, LineStyle = LineStyle.DotsVeryRare)]
public IndicatorDataSeries resistance { get; set; }
[Output("Sup", Color = Colors.Black, LineStyle = LineStyle.DotsVeryRare)]
public IndicatorDataSeries support { get; set; }
public double res;
public double sup;
private MarketSeries Series;
protected override void Initialize()
{
// Initialize and create nested indicators
Series = MarketSeries;
}
public override void Calculate(int index)
{
// Calculate value at specified index
// Result[index] = ...
var upline = (Series.Close.Maximum(range) + Series.High.Maximum(range)) / 2;
var dnline = (Series.Close.Minimum(range) + Series.Low.Minimum(range)) / 2;
resistance[index] = double.NaN;
support[index] = double.NaN;
if (resbarsconfirmed(upline, index) >= confirmations)
{
res = upline;
ChartObjects.DrawLine("resline" + upline.ToString(), Series.OpenTime[index], upline, Series.OpenTime[index - range], upline, Colors.DarkRed, 2, LineStyle.Solid);
}
if (supbarsconfirmed(dnline, index) >= confirmations)
{
sup = dnline;
ChartObjects.DrawLine("supline" + dnline.ToString(), Series.OpenTime[index], dnline, Series.OpenTime[index - range], dnline, Colors.DarkBlue, 2, LineStyle.Solid);
}
}
private int resbarsconfirmed(double line, int index)
{
int touches = 0;
for (int i = index; i > index - range; i--)
{
if (Series.Low[i] < line && Series.High[i] >= line && Series.Close[i] < line)
touches += 1;
if (Series.Close[i] > line)
touches = 0;
}
return touches;
}
private int supbarsconfirmed(double line, int index)
{
int touches = 0;
for (int i = index; i > index - range; i--)
{
if (Series.High[i] > line && Series.Low[i] <= line && Series.Close[i] > line)
touches += 1;
if (Series.Close[i] < line)
touches = 0;
}
return touches;
}
}
}
Time Zones Clock
12
0
565
free
16 Nov 2022
This is a Simple tool that Shows the Time Zones from main Market's Cities Like New York, London, Frankfurt, Tokyo, Sydney, Hong Kong and New Zealand and as well as your Local Time Zone in Real Time. This tool is great to monitor in real time the different hours, and follow the exact time that different Markets participants enter in their markets to play. Consider for instance that you're in Europe and trading the Dax and you monitor the New York time zone, and you prepare yourself for a much higher volatility to enter the markets cause New York players are entering the game at somewhere between 8:00 am New York Time.
Grupo de Telegram Para Brasileiros, Portugueses e todos aqueles que falam portugues: http://t.me/ComunidadeCtrader
Grupo CTrader en Español para Latinos: http://t.me/ComunidadCtrader
Free Volume Profile
11
5
1625
by srlcarlg
free
21 Nov 2022
All core features of TPO Profile but in VOLUME
It also has the features of Order Flow Ticks
Last Update -> 16/11/2022
=================================================================
==== Volume Modes ===
Normal/Gradient Mode = Volume Profile with Fixed/Gradient Color
Buy vs Sell Mode = The name explains itself
Delta Mode = Volume Delta Profile
Normal+Delta Mode = Volume + Delta (Profile)
The Volume Calculation(in Bars Volume Source)
is exported, with adaptations, from the BEST VP I have see/used for MT4/MT5,
of FXcoder's (VP 10.2.1), author of the famous (Volume Profile + Range v6.0)
a BIG THANKS to HIM!
All parameters are self-explanatory.
Update:
16/11/2022 - A "new" and correct way of segmentation has been added, where there is no more "repaint/flicker" when a new high was formed in Live Market.
The old wrong segmentation has been replaced by this one.
=================================================================
Edit Icon Comment
1
5
232
free
09 Nov 2022
This indicator is to solve the problem ver 4.4.12 removed to access and edit the icon's comments
For problem details, please see: https://ctrader.com/forum/ctrader-support/39021
Usage:
1. Select Icon, Alt + D to popup a ChartText with the icon's comment;
2. Edit ChartText as needed;
3. Alt + D to save revised comments, hit again to hide popup ChartText;
Interested in the currency strength meter in the chart?
Get the free download link at Telegram Group: cTrader FOREX Club
Order Flow Ticks
11
5
1428
by srlcarlg
free
07 Dec 2022
Order Flow Ticks brings the main concepts of Order Flow (aka Footprint) for cTrader, adapted for Tick Volume.
Using ideas from my previous creations (Volume for Renko/Range, TPO Profile) made this possible.
Also works on Ticks/Renko/Range* Charts
Last Update -> 07/12/2022
See also -->> Weis & Wyckoff System <<--
See also -->> VWAP Midas Buttons <<--
========================================================================
Comparing with Footprint, we have the features:
Normal Mode = Volume Profile of Bar
Buy vs Sell Divided Mode = Bid/Ask Footprint
Buy vs Sell Profile Mode = Same but Profile
Delta Divided Mode = Delta Footprint
Delta Profile Mode = Same but Profile
Update:
07/12/2022 - Added "Large Result Filter" Area, imported from [Renko] Weis & Wyckoff System, adapted of course.
Large R. Ratio value is optimized for Delta Mode, if you want to use other Modes, change the value between 1 to 2. (recommended less than 1.5)
The smaller the Large R. Ratio value, the more occurrences will appear.
26/11/2022 - Added "[Renko] Show Wicks" Option, giving more accuracy in reading on Renko.
21/11/2022 - Added "Sum or Subtraction Option" in Buy/Sell mode (only), also a small design fix in Delta Profile mode.
16/11/2022 - A "new" and correct way of segmentation has been added, where there is no more "repaint/flicker" when a new high was formed in Live Market.
The old wrong segmentation has been replaced by this one.
=======================================================================
All parameters are self-explanatory.
*Remember that they are Non-Timebased Timeframes, so in Real-time Market on the right side of current bar, the right histogram follows the current time, and because of this (Non-Timebased) it ends up stretching the histogram away giving a impression that goes to infinity... after the bar closes it will be corrected automatically, and this explanation is repeated :).
zignale indicator
1
0
309
by ctid4935132
free
22 Sep 2022
@version=4
Di Mihkel00
Questo script è progettato per il metodo NNFX, quindi è consigliato solo per i grafici giornalieri.
Ho provato a implementare alcune regole VP NNFX
Questo script ha un SSL / Baseline (è possibile scegliere tra SSL o MA), un SSL secondario per le negoziazioni di continiuation e un terzo SSL per le negoziazioni di uscita.
Avvisi aggiunti per le voci baseline, le continuazioni SSL2, le uscite.
Baseline ha un'impostazione Keltner Channel per le candele grigie "in zona"
Aggiunti diamanti "Candle Size > 1 ATR" dal mio vecchio script con i criteri di essere all'interno dell'intervallo ATR di base.
Crediti
Strategia causecelebre https://www.tradingview.com/u/causecelebre/
Canale SSL ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/
Medie mobili jiehonglim https://www.tradingview.com/u/jiehonglim/
Le medie mobili generano https://www.tradingview.com/u/everget/
Sceneggiatura di "Molte medie mobili" Fractured https://www.tradingview.com/u/Fractured/
study("SSL Hybrid", overlay=true)
show_Baseline = input(title="Show Baseline", type=input.bool, defval=true)
show_SSL1 = input(title="Mostra SSL1", type=input.bool, defval=false)
show_atr = input(title="Mostra bande ATR", type=input.bool, defval=true)
Atr
atrlen = input(14, "Periodo ATR")
mult = input(1, "ATR Multi", step=0.1)
smoothing = input(title="ATR Smoothing", defval="WMA", options=["RMA", "SMA", "EMA", "WMA"])
ma_function(source, atrlen) = >
se levigante == "RMA"
rma(fonte, atrlen)
altro
se levigante == "SMA"
sma(fonte, atrlen)
altro
se levigante == "EMA"
ema(fonte, atrlen)
altro
wma(fonte, atrlen)
atr_slen = ma_function(tr(true), atrlen)
ATR Up/Low Bands
upper_band = atr_slen * mult + chiudi
lower_band = chiudi - atr_slen * mult
BASELINE / SSL1 / SSL2 / VALORI DI MEDIA MOBILE IN USCITA
maType = input(title="SSL1 / Baseline Type", type=input.string, defval="HMA", options=["SMA","EMA","DEMA","TEMA","LSMA","WMA","MF","VAMA","TMA","HMA", "JMA", "Kijun v2", "EDSMA","McGinley"])
len = input(title="SSL1 / Baseline Length", defval=60)
SSL2Type = input(title="SSL2 / Continuation Type", type=input.string, defval="JMA", options=["SMA","EMA","DEMA","TEMA","WMA","MF","VAMA","TMA","HMA", "JMA","McGinley"])
len2 = input(title="SSL 2 Length", defval=5)
//
SSL3Type = input(title="EXIT Type", type=input.string, defval="HMA", options=["DEMA","TEMA","LSMA","VAMA","TMA","HMA","JMA", "Kijun v2", "McGinley", "MF"])
len3 = input(title="LUNGHEZZA USCITA", defval=15)
src = input(title="Source", type=input.source, defval=close)
//
tema(src, len) =>
ema1 = ema(src, len)
ema2 = ema(ema1, len)
ema3 = ema(ema2, len)
(3 * ema1) - (3 * ema2) + ema3
kidiv = input(defval=1,maxval=4, title="Kijun MOD Divider")
jurik_phase = input(title="* Jurik (JMA) Only - Phase", type=input.integer, defval=3)
jurik_power = input(title="* Jurik (JMA) Only - Power", type=input.integer, defval=1)
volatility_lookback = input(10, title="* Volatility Adjusted (VAMA) Only - Volatility lookback length")
Mf
beta = input(0.8,minval=0;maxval=1;step=0.1, title="Filtro modulare, solo filtro generale - Beta")
feedback = input(false, title="Solo filtro modulare - Feedback")
z = input(0.5;title="Modular Filter Only - Feedback Weighting",step=0.1, minval=0, maxval=1)
EDSMA ·
ssfLength = input(title="EDSMA - Super Smoother Filter Length", type=input.integer, minval=1, defval=20)
ssfPoles = input(title="EDSMA - Super Smoother Filter Poles", type=input.integer, defval=2, options=[2, 3])
//----
EDSMA ·
get2PoleSSF(src, lunghezza) = >
PI = 2 * asin(1)
arg = sqrt(2) * PI / lunghezza
a1 = exp(-arg)
b1 = 2 * a1 * cos(arg)
c2 = b1
c3 = -pow(a1, 2)
c1 = 1 - c2 - c3
ssf = 0,0
ssf := c1 * src + c2 * nz(ssf[1]) + c3 * nz(ssf[2])
get3PoleSSF(src, lunghezza) = >
PI = 2 * asin(1)
arg = PI / lunghezza
a1 = exp(-arg)
b1 = 2 * a1 * cos(1.738 * arg)
c1 = pow(a1, 2)
coef2 = b1 + c1
coef3 = -(c1 + b1 * c1)
coef4 = pow(c1, 2)
coef1 = 1 - coef2 - coef3 - coef4
ssf = 0,0
ssf := coef1 * src + coef2 * nz(ssf[1]) + coef3 * nz(ssf[2]) + coef4 * nz(ssf[3])
ma(type, src, len) = >
risultato float = 0
se tipo=="TMA"
risultato := sma(sma(src, ceil(len / 2)), floor(len / 2) + 1)
if type=="MF"
ts=0.,b=0.,c=0.,os=0.
//----
alpha = 2/(len+1)
a = feedback ? z*src + (1-z)*nz(ts[1],src) : src
//----
b := a > alpha*a+(1-alpha)*nz(b[1],a) ? a : alpha*a+(1-alpha)*nz(b[1],a)
c := a < alpha*a+(1-alpha)*nz(c[1],a) ? a : alpha*a+(1-alpha)*nz(c[1],a)
os := a == b ? 1 : a == c ? 0 : os[1]
//----
upper = beta*b+(1-beta)*c
lower = beta*c+(1-beta)*b
ts := os*upper+(1-os)*lower
result := ts
if type=="LSMA"
result := linreg(src, len, 0)
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="DEMA" // Double Exponential
e = ema(src, len)
result := 2 * e - ema(e, len)
if type=="TEMA" // Triple Exponential
e = ema(src, len)
result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="VAMA" // Volatility Adjusted
/// Copyright © 2019 to present, Joris Duyck (JD)
mid=ema(src,len)
dev=src-mid
vol_up=highest(dev,volatility_lookback)
vol_down=lowest(dev,volatility_lookback)
result := mid+avg(vol_up,vol_down)
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="JMA" // Jurik
/// Copyright © 2018 Alex Orekhov (everget)
/// Copyright © 2017 Jurik Research and Consulting.
phaseRatio = jurik_phase < -100 ? 0.5 : jurik_phase > 100 ? 2.5 : jurik_phase / 100 + 1.5
beta = 0.45 * (len - 1) / (0.45 * (len - 1) + 2)
alpha = pow(beta, jurik_power)
jma = 0.0
e0 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0[1])
e1 = 0.0
e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])
e2 = 0.0
e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * pow(1 - alpha, 2) + pow(alpha, 2) * nz(e2[1])
jma := e2 + nz(jma[1])
result := jma
if type=="Kijun v2"
kijun = avg(lowest(len), highest(len))//, (open + close)/2)
conversionLine = avg(lowest(len/kidiv), highest(len/kidiv))
delta = (kijun + conversionLine)/2
result :=delta
if type=="McGinley"
mg = 0.0
mg := na(mg[1]) ? ema(src, len) : mg[1] + (src - mg[1]) / (len * pow(src/mg[1], 4))
result :=mg
if type=="EDSMA"
zeros = src - nz(src[2])
avgZeros = (zeros + zeros[1]) / 2
// Ehlers Super Smoother Filter
ssf = ssfPoles == 2
? get2PoleSSF(avgZeros, ssfLength)
: get3PoleSSF(avgZeros, ssfLength)
// Rescale filter in terms of Standard Deviations
stdev = stdev(ssf, len)
scaledFilter = stdev != 0
? ssf / stdev
: 0
alpha = 5 * abs(scaledFilter) / len
edsma = 0.0
edsma := alpha * src + (1 - alpha) * nz(edsma[1])
result := edsma
result
///SSL 1 and SSL2
emaHigh = ma(maType, high, len)
emaLow = ma(maType, low, len)
maHigh = ma(SSL2Type, high, len2)
maLow = ma(SSL2Type, low, len2)
///EXIT
ExitHigh = ma(SSL3Type, high, len3)
ExitLow = ma(SSL3Type, low, len3)
///Keltner Baseline Channel
BBMC = ma(maType, close, len)
useTrueRange = input(true)
multy = input(0.2, step=0.05, title="Base Channel Multiplier")
Keltma = ma(maType, src, len)
range = useTrueRange ? tr : high - low
rangema = ema(range, len)
upperk =Keltma + rangema * multy
lowerk = Keltma - rangema * multy
//Baseline Violation Candle
open_pos = open*1
close_pos = close*1
difference = abs(close_pos-open_pos)
atr_violation = difference > atr_slen
InRange = upper_band > BBMC and lower_band < BBMC
candlesize_violation = atr_violation and InRange
plotshape(candlesize_violation, color=color.white, size=size.tiny,style=shape.diamond, location=location.top, transp=0,title="Candle Size > 1xATR")
//SSL1 VALUES
Hlv = int(na)
Hlv := close > emaHigh ? 1 : close < emaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? emaHigh : emaLow
//SSL2 VALUES
Hlv2 = int(na)
Hlv2 := close > maHigh ? 1 : close < maLow ? -1 : Hlv2[1]
sslDown2 = Hlv2 < 0 ? maHigh : maLow
//EXIT VALUES
Hlv3 = int(na)
Hlv3 := close > ExitHigh ? 1 : close < ExitLow ? -1 : Hlv3[1]
sslExit = Hlv3 < 0 ? ExitHigh : ExitLow
base_cross_Long = crossover(close, sslExit)
base_cross_Short = crossover(sslExit, close)
codiff = base_cross_Long ? 1 : base_cross_Short ? -1 : na
//COLORS
show_color_bar = input(title="Color Bars", type=input.bool, defval=true)
color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray
color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na
//PLOTS
plotarrow(codiff, colorup=#00c3ff, colordown=#ff0062,title="Exit Arrows", transp=20, maxheight=20, offset=0)
p1 = plot(show_Baseline ? BBMC : na, color=color_bar, linewidth=4,transp=0, title='MA Baseline')
DownPlot = plot( show_SSL1 ? sslDown : na, title="SSL1", linewidth=3, color=color_ssl1, transp=10)
barcolor(show_color_bar ? color_bar : na)
up_channel = plot(show_Baseline ? upperk : na, color=color_bar, title="Baseline Upper Channel")
low_channel = plot(show_Baseline ? lowerk : na, color=color_bar, title="Basiline Lower Channel")
fill(up_channel, low_channel, color=color_bar, transp=90)
////SSL2 Continiuation from ATR
atr_crit = input(0.9, step=0.1, title="Continuation ATR Criteria")
upper_half = atr_slen * atr_crit + close
lower_half = close - atr_slen * atr_crit
buy_inatr = lower_half < sslDown2
sell_inatr = upper_half > sslDown2
sell_cont = close < BBMC and close < sslDown2
buy_cont = close > BBMC and close > sslDown2
sell_atr = sell_inatr and sell_cont
buy_atr = buy_inatr e buy_cont
atr_fill = buy_atr ? color.green : sell_atr ? color.purple : color.white
LongPlot = plot(sslDown2, title="SSL2", linewidth=2, color=atr_fill, style=plot.style_circles, transp=0)
u = plot(show_atr ? upper_band : na, "+ATR", color=color.white, transp=80)
l = plot(show_atr ? lower_band : na, "-ATR", color=color.white, transp=80)
AVVISI
alertcondition(crossover(close, sslDown), title='SSL Cross Alert', message='SSL1 has crossed.')
alertcondition(crossover(close, sslDown2), title='SSL2 Cross Alert', message='SSL2 has crossed.')
alertcondition(sell_atr, title='Vendi continuazione', message='Vendi continuazione.')
alertcondition(buy_atr, title='Buy Continuation', message='Buy Continuation.')
alertcondition(crossover(close, sslExit), title='Exit Sell', message='Exit Sell Alert.')
alertcondition(crossover(sslExit, close), title='Exit Buy', message='Exit Buy Alert.')
alertcondition(crossover(close, upperk ), title='Baseline Buy Entry', message='Base Buy Alert.')
alertcondition(crossover(lowerk, close ), title='Baseline Sell Entry', message='Base Sell Alert.')
zignale indicator
0
0
219
by ctid4935132
free
22 Sep 2022
@version=4
Di Mihkel00
Questo script è progettato per il metodo NNFX, quindi è consigliato solo per i grafici giornalieri.
Ho provato a implementare alcune regole VP NNFX
Questo script ha un SSL / Baseline (è possibile scegliere tra SSL o MA), un SSL secondario per le negoziazioni di continiuation e un terzo SSL per le negoziazioni di uscita.
Avvisi aggiunti per le voci baseline, le continuazioni SSL2, le uscite.
Baseline ha un'impostazione Keltner Channel per le candele grigie "in zona"
Aggiunti diamanti "Candle Size > 1 ATR" dal mio vecchio script con i criteri di essere all'interno dell'intervallo ATR di base.
Crediti
Strategia causecelebre https://www.tradingview.com/u/causecelebre/
Canale SSL ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/
Medie mobili jiehonglim https://www.tradingview.com/u/jiehonglim/
Le medie mobili generano https://www.tradingview.com/u/everget/
Sceneggiatura di "Molte medie mobili" Fractured https://www.tradingview.com/u/Fractured/
study("SSL Hybrid", overlay=true)
show_Baseline = input(title="Show Baseline", type=input.bool, defval=true)
show_SSL1 = input(title="Mostra SSL1", type=input.bool, defval=false)
show_atr = input(title="Mostra bande ATR", type=input.bool, defval=true)
Atr
atrlen = input(14, "Periodo ATR")
mult = input(1, "ATR Multi", step=0.1)
smoothing = input(title="ATR Smoothing", defval="WMA", options=["RMA", "SMA", "EMA", "WMA"])
ma_function(source, atrlen) = >
se levigante == "RMA"
rma(fonte, atrlen)
altro
se levigante == "SMA"
sma(fonte, atrlen)
altro
se levigante == "EMA"
ema(fonte, atrlen)
altro
wma(fonte, atrlen)
atr_slen = ma_function(tr(true), atrlen)
ATR Up/Low Bands
upper_band = atr_slen * mult + chiudi
lower_band = chiudi - atr_slen * mult
BASELINE / SSL1 / SSL2 / VALORI DI MEDIA MOBILE IN USCITA
maType = input(title="SSL1 / Baseline Type", type=input.string, defval="HMA", options=["SMA","EMA","DEMA","TEMA","LSMA","WMA","MF","VAMA","TMA","HMA", "JMA", "Kijun v2", "EDSMA","McGinley"])
len = input(title="SSL1 / Baseline Length", defval=60)
SSL2Type = input(title="SSL2 / Continuation Type", type=input.string, defval="JMA", options=["SMA","EMA","DEMA","TEMA","WMA","MF","VAMA","TMA","HMA", "JMA","McGinley"])
len2 = input(title="SSL 2 Length", defval=5)
//
SSL3Type = input(title="EXIT Type", type=input.string, defval="HMA", options=["DEMA","TEMA","LSMA","VAMA","TMA","HMA","JMA", "Kijun v2", "McGinley", "MF"])
len3 = input(title="LUNGHEZZA USCITA", defval=15)
src = input(title="Source", type=input.source, defval=close)
//
tema(src, len) =>
ema1 = ema(src, len)
ema2 = ema(ema1, len)
ema3 = ema(ema2, len)
(3 * ema1) - (3 * ema2) + ema3
kidiv = input(defval=1,maxval=4, title="Kijun MOD Divider")
jurik_phase = input(title="* Jurik (JMA) Only - Phase", type=input.integer, defval=3)
jurik_power = input(title="* Jurik (JMA) Only - Power", type=input.integer, defval=1)
volatility_lookback = input(10, title="* Volatility Adjusted (VAMA) Only - Volatility lookback length")
Mf
beta = input(0.8,minval=0;maxval=1;step=0.1, title="Filtro modulare, solo filtro generale - Beta")
feedback = input(false, title="Solo filtro modulare - Feedback")
z = input(0.5;title="Modular Filter Only - Feedback Weighting",step=0.1, minval=0, maxval=1)
EDSMA ·
ssfLength = input(title="EDSMA - Super Smoother Filter Length", type=input.integer, minval=1, defval=20)
ssfPoles = input(title="EDSMA - Super Smoother Filter Poles", type=input.integer, defval=2, options=[2, 3])
//----
EDSMA ·
get2PoleSSF(src, lunghezza) = >
PI = 2 * asin(1)
arg = sqrt(2) * PI / lunghezza
a1 = exp(-arg)
b1 = 2 * a1 * cos(arg)
c2 = b1
c3 = -pow(a1, 2)
c1 = 1 - c2 - c3
ssf = 0,0
ssf := c1 * src + c2 * nz(ssf[1]) + c3 * nz(ssf[2])
get3PoleSSF(src, lunghezza) = >
PI = 2 * asin(1)
arg = PI / lunghezza
a1 = exp(-arg)
b1 = 2 * a1 * cos(1.738 * arg)
c1 = pow(a1, 2)
coef2 = b1 + c1
coef3 = -(c1 + b1 * c1)
coef4 = pow(c1, 2)
coef1 = 1 - coef2 - coef3 - coef4
ssf = 0,0
ssf := coef1 * src + coef2 * nz(ssf[1]) + coef3 * nz(ssf[2]) + coef4 * nz(ssf[3])
ma(type, src, len) = >
risultato float = 0
se tipo=="TMA"
risultato := sma(sma(src, ceil(len / 2)), floor(len / 2) + 1)
if type=="MF"
ts=0.,b=0.,c=0.,os=0.
//----
alpha = 2/(len+1)
a = feedback ? z*src + (1-z)*nz(ts[1],src) : src
//----
b := a > alpha*a+(1-alpha)*nz(b[1],a) ? a : alpha*a+(1-alpha)*nz(b[1],a)
c := a < alpha*a+(1-alpha)*nz(c[1],a) ? a : alpha*a+(1-alpha)*nz(c[1],a)
os := a == b ? 1 : a == c ? 0 : os[1]
//----
upper = beta*b+(1-beta)*c
lower = beta*c+(1-beta)*b
ts := os*upper+(1-os)*lower
result := ts
if type=="LSMA"
result := linreg(src, len, 0)
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="DEMA" // Double Exponential
e = ema(src, len)
result := 2 * e - ema(e, len)
if type=="TEMA" // Triple Exponential
e = ema(src, len)
result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="VAMA" // Volatility Adjusted
/// Copyright © 2019 to present, Joris Duyck (JD)
mid=ema(src,len)
dev=src-mid
vol_up=highest(dev,volatility_lookback)
vol_down=lowest(dev,volatility_lookback)
result := mid+avg(vol_up,vol_down)
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="JMA" // Jurik
/// Copyright © 2018 Alex Orekhov (everget)
/// Copyright © 2017 Jurik Research and Consulting.
phaseRatio = jurik_phase < -100 ? 0.5 : jurik_phase > 100 ? 2.5 : jurik_phase / 100 + 1.5
beta = 0.45 * (len - 1) / (0.45 * (len - 1) + 2)
alpha = pow(beta, jurik_power)
jma = 0.0
e0 = 0.0
e0 := (1 - alpha) * src + alpha * nz(e0[1])
e1 = 0.0
e1 := (src - e0) * (1 - beta) + beta * nz(e1[1])
e2 = 0.0
e2 := (e0 + phaseRatio * e1 - nz(jma[1])) * pow(1 - alpha, 2) + pow(alpha, 2) * nz(e2[1])
jma := e2 + nz(jma[1])
result := jma
if type=="Kijun v2"
kijun = avg(lowest(len), highest(len))//, (open + close)/2)
conversionLine = avg(lowest(len/kidiv), highest(len/kidiv))
delta = (kijun + conversionLine)/2
result :=delta
if type=="McGinley"
mg = 0.0
mg := na(mg[1]) ? ema(src, len) : mg[1] + (src - mg[1]) / (len * pow(src/mg[1], 4))
result :=mg
if type=="EDSMA"
zeros = src - nz(src[2])
avgZeros = (zeros + zeros[1]) / 2
// Ehlers Super Smoother Filter
ssf = ssfPoles == 2
? get2PoleSSF(avgZeros, ssfLength)
: get3PoleSSF(avgZeros, ssfLength)
// Rescale filter in terms of Standard Deviations
stdev = stdev(ssf, len)
scaledFilter = stdev != 0
? ssf / stdev
: 0
alpha = 5 * abs(scaledFilter) / len
edsma = 0.0
edsma := alpha * src + (1 - alpha) * nz(edsma[1])
result := edsma
result
///SSL 1 and SSL2
emaHigh = ma(maType, high, len)
emaLow = ma(maType, low, len)
maHigh = ma(SSL2Type, high, len2)
maLow = ma(SSL2Type, low, len2)
///EXIT
ExitHigh = ma(SSL3Type, high, len3)
ExitLow = ma(SSL3Type, low, len3)
///Keltner Baseline Channel
BBMC = ma(maType, close, len)
useTrueRange = input(true)
multy = input(0.2, step=0.05, title="Base Channel Multiplier")
Keltma = ma(maType, src, len)
range = useTrueRange ? tr : high - low
rangema = ema(range, len)
upperk =Keltma + rangema * multy
lowerk = Keltma - rangema * multy
//Baseline Violation Candle
open_pos = open*1
close_pos = close*1
difference = abs(close_pos-open_pos)
atr_violation = difference > atr_slen
InRange = upper_band > BBMC and lower_band < BBMC
candlesize_violation = atr_violation and InRange
plotshape(candlesize_violation, color=color.white, size=size.tiny,style=shape.diamond, location=location.top, transp=0,title="Candle Size > 1xATR")
//SSL1 VALUES
Hlv = int(na)
Hlv := close > emaHigh ? 1 : close < emaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? emaHigh : emaLow
//SSL2 VALUES
Hlv2 = int(na)
Hlv2 := close > maHigh ? 1 : close < maLow ? -1 : Hlv2[1]
sslDown2 = Hlv2 < 0 ? maHigh : maLow
//EXIT VALUES
Hlv3 = int(na)
Hlv3 := close > ExitHigh ? 1 : close < ExitLow ? -1 : Hlv3[1]
sslExit = Hlv3 < 0 ? ExitHigh : ExitLow
base_cross_Long = crossover(close, sslExit)
base_cross_Short = crossover(sslExit, close)
codiff = base_cross_Long ? 1 : base_cross_Short ? -1 : na
//COLORS
show_color_bar = input(title="Color Bars", type=input.bool, defval=true)
color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray
color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na
//PLOTS
plotarrow(codiff, colorup=#00c3ff, colordown=#ff0062,title="Exit Arrows", transp=20, maxheight=20, offset=0)
p1 = plot(show_Baseline ? BBMC : na, color=color_bar, linewidth=4,transp=0, title='MA Baseline')
DownPlot = plot( show_SSL1 ? sslDown : na, title="SSL1", linewidth=3, color=color_ssl1, transp=10)
barcolor(show_color_bar ? color_bar : na)
up_channel = plot(show_Baseline ? upperk : na, color=color_bar, title="Baseline Upper Channel")
low_channel = plot(show_Baseline ? lowerk : na, color=color_bar, title="Basiline Lower Channel")
fill(up_channel, low_channel, color=color_bar, transp=90)
////SSL2 Continiuation from ATR
atr_crit = input(0.9, step=0.1, title="Continuation ATR Criteria")
upper_half = atr_slen * atr_crit + close
lower_half = close - atr_slen * atr_crit
buy_inatr = lower_half < sslDown2
sell_inatr = upper_half > sslDown2
sell_cont = close < BBMC and close < sslDown2
buy_cont = close > BBMC and close > sslDown2
sell_atr = sell_inatr and sell_cont
buy_atr = buy_inatr e buy_cont
atr_fill = buy_atr ? color.green : sell_atr ? color.purple : color.white
LongPlot = plot(sslDown2, title="SSL2", linewidth=2, color=atr_fill, style=plot.style_circles, transp=0)
u = plot(show_atr ? upper_band : na, "+ATR", color=color.white, transp=80)
l = plot(show_atr ? lower_band : na, "-ATR", color=color.white, transp=80)
AVVISI
alertcondition(crossover(close, sslDown), title='SSL Cross Alert', message='SSL1 has crossed.')
alertcondition(crossover(close, sslDown2), title='SSL2 Cross Alert', message='SSL2 has crossed.')
alertcondition(sell_atr, title='Vendi continuazione', message='Vendi continuazione.')
alertcondition(buy_atr, title='Buy Continuation', message='Buy Continuation.')
alertcondition(crossover(close, sslExit), title='Exit Sell', message='Exit Sell Alert.')
alertcondition(crossover(sslExit, close), title='Exit Buy', message='Exit Buy Alert.')
alertcondition(crossover(close, upperk ), title='Baseline Buy Entry', message='Base Buy Alert.')
alertcondition(crossover(lowerk, close ), title='Baseline Sell Entry', message='Base Sell Alert.')
Copyright © 2023 Spotware Systems Ltd. All rights reserved.