SMA pine语言教学策略脚本
35
Follow
60
Followers
Source
Pine
//@version=4
study("SMA Cross", overlay=true)
//strategy("strategy.percent_of_equity", overlay = false, default_qty_value = 100, default_qty_type = strategy.percent_of_equity, initial_capital = 1000000)
//SMA
fastSMA = sma(close, 10)
slowSMA = sma(close, 200)
//Buy
longCondition = crossover(fastSMA, slowSMA)
longStop = strategy.position_avg_price * 0.95Related strategies
Comment
All comments (0)
No data
- 1