mForex - Keltner channel + EMA Scalping system

redf0x1 · study · 28 行 · 点赞 2,069 · TradingView 原页

本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。

Pine Script

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © redf0x1
 
//@version=4
study(title="mForex - Keltner channel + EMA Scalping system", shorttitle="mForex - Keltner - EMA", overlay=true)
length = input(42, minval=1, title="Length Keltner")
emaFirst = input(10, minval=1, title="EMA First")
emaSecond = input(110, minval=1, title="EMA Second")
 
esma(source, length)=>
	s = sma(source, length)
	e = ema(source, length)
	e
	
ma = esma(close, length)
rangema = rma(tr(true), length)
upper = ma + rangema * 1.0
lower = ma - rangema * 1.0
c = color.blue
u = plot(upper, color=#0094FF, title="Upper")
plot(ma, color=#0094FF, title="Basis")
l = plot(lower, color=#0094FF, title="Lower")
fill(u, l, color=#0094FF, transp=95, title="Background")
 
outEmaFirst = ema(close, emaFirst)
plot(outEmaFirst, color=color.green, title="EMA First", linewidth=2)
outEmaSecond = ema(close, emaSecond)
plot(outEmaSecond, color=color.red, title="EMA Second", linewidth=3)

← 返回列表