Easy Loot 'Golden Cross'

kyer · study · 21 行 · 点赞 131 · 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/
// Simple Code for the Moving Averages that I use in my trading
// Easy Loot
// created on 11/4/20
// © kyer
//@version=4
 
study(title="Easy Loot 'Golden Cross'", overlay=true)
 
 
short = sma(close, 30)
long = sma(close, 100)
longest = sma(close, 200)
 
plot(short, title='SMA 30', color = color.yellow, linewidth = 2)
plot(long, title='SMA 100', color = color.green, linewidth = 2)
plot(longest, title='SMA 200', color = color.black, linewidth = 3)
 
plot(cross(short, long) ? short : na, title='SMA Cross 30/100', style = plot.style_cross, linewidth = 3, color = color.black)
plot(cross(short, longest) ? short: na, title='SMA Cross 30/200', style=plot.style_cross, linewidth = 3, color = color.black)
plot(cross(long, longest) ? long : na, title='SMA Cross 100/200', style = plot.style_cross, linewidth = 3, color = color.black)

← 返回列表