Type/to search
1
Follow
0
Followers
Mở đầu ngôn ngữ Pine
Help
Created 2024-08-10 23:16:33  
 2
 1031

Bạn có biết bao nhiêu phần trăm của tài khoản của bạn trong mỗi đơn vị sau khi bạn muốn một đĩa cứng bằng ngôn ngữ pine?
Làm thế nào viết

Related Recommendations
Comment
All comments (2)
    pine
    //@version=5 strategy("Percent of Equity Order", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100) // 简单的均线交叉策略 longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28)) shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28)) // 如果均线交叉条件满足,则买入或卖出 if (longCondition) strategy.entry("Long", strategy.long) if (shortCondition) strategy.entry("Short", strategy.short) // 指定default_qty_type=strategy.percent_of_equity后,设置default_qty_value为百分比数量(0~100),1即1%。按照账户中的计价货币数量计算下单量 // 例如当前账户有10000USDT,设置1%下单,即使用100USDT规模的下单量下单(卖出时根据当前价格计算)。
    2 years ago

    您好,可以按照资产百分比下单,参考PINE语言文档:

    https://www.fmz.com/bbs-topic/9315#strategy 中的default_qty_type参数。

    2 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)