策略源码
Pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Wunderbit Trading
//@version=4
strategy("MACD Strategy", overlay=true, pyramiding=2, commission_type=strategy.commission.percent, commission_value=0.04, initial_capital=100, default_qty_type = strategy.cash, default_qty_value = 100, currency = currency.USD)
// FUNCTIONS
Ema(src,p) =>
ema = 0.
sf = 2/(p+1)
ema := nz(ema[1] + sf*(src - ema[1]),src)
策略参数
相关策略
评论
全部评论 (0)
暂无数据
- 1