与外汇交易相对应的松树策略配置

发布于 2025-01-24 03:56:06 字数 341 浏览 2 评论 0 原文

我想模拟交易策略,就好像我在外汇上使用了这种策略一样。

假设我有一个1000美元的帐户,杠杆率为100。如果我没记错的话,它将与设置相对应:

initial_capital=1000

而且我可以购买100 000个单位,这将对应于:

default_qty_value=100000

如果这两个设置正确,如果我是否要为每个交易“风险” 20 $,我是否应该设置 default_qty_value 等于2000? (实际上,20 $是我资本的2%,然后(2 /100) * 100 000 = 2000 $)

I want to simulate a trading strategy as if I was using this strategy on the Forex.

Let's say I have a 1000$ account with a leverage of 100. If I am not mistaken it would correspond to set :

initial_capital=1000

and I would be able to buy 100 000 units, which would correspond to:

default_qty_value=100000

If these two settings are correct, if I want to "risk" 20$ for each trade, should I set the default_qty_value to be equal to 2000 ? ( indeed, 20$ is 2% of my capital, then ( 2 / 100 ) * 100 000 = 2000 $ )

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等你爱我 2025-01-31 03:56:06

如果您与 casas

TSLA,1D 上检查它:

//@version=5
strategy("strategy.cash", overlay = true, default_qty_value = 20, default_qty_type = strategy.cash, initial_capital = 1000)

if bar_index == 0
    // As ‘qty’ is not defined, the previously defined values for the `default_qty_type` and `default_qty_value` parameters are used to enter trades, namely 20 units of cash in the currency of `strategy.account_currency`.
    // `qty` is calculated as (default_qty_value)/(close price). If current price is $5, then qty = 20/5 = 4.
    strategy.entry("EN", strategy.long)
    
if bar_index == 100
    strategy.close("EN")

其他类型是 stragity.fixed

You need to set it to 20, if you trading with cash.

Check it on TSLA, 1D:

//@version=5
strategy("strategy.cash", overlay = true, default_qty_value = 20, default_qty_type = strategy.cash, initial_capital = 1000)

if bar_index == 0
    // As ‘qty’ is not defined, the previously defined values for the `default_qty_type` and `default_qty_value` parameters are used to enter trades, namely 20 units of cash in the currency of `strategy.account_currency`.
    // `qty` is calculated as (default_qty_value)/(close price). If current price is $5, then qty = 20/5 = 4.
    strategy.entry("EN", strategy.long)
    
if bar_index == 100
    strategy.close("EN")

Other types is strategy.fixed and strategy.percent_of_equity

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文