Type/to search

SMA pine语言教学策略脚本

Cryptocurrency
Created: 2023-02-15 17:04:18
Last modified: 3 years ago
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.95
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)