MACD Strategy
35
Follow
60
Followers
Source
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)
Strategy parameters
Related strategies
Comment
All comments (0)
No data
- 1