【问题标题】:Can't understand strategy exit and Pyramiding看不懂策略退出和金字塔
【发布时间】:2021-01-07 06:10:56
【问题描述】:

以下是我的代码

strategy("50 pips a day", shorttitle = '50 pips' , overlay = true , pyramiding = 1)

tradestart = time == timestamp("GMT+0" , year , month , dayofmonth , 7 , 0 , 0)

bgcolor( tradestart ? color.silver : na, transp = 0)

if tradestart
    strategy.entry('Buy' , long = true , stop = high , oca_name = 'Breakout' , oca_type = strategy.oca.cancel )
    strategy.entry('Sell' , long = false  , stop = low , oca_name = 'Breakout' , oca_type = strategy.oca.cancel)
    strategy.exit('Buy Exit' , from_entry = 'Buy' , profit = 50 * 10)

我的条件是在 15:00 之后(具有透明背景色),应该有一个买单

一个。为什么我在 15:00 [我在 GMT +8 ZONE] 的情况下明确指出在 15:00 后做多?

b.金字塔到底是什么意思?这是否意味着如果我将金字塔设置为 1,那么我只能下一个买单,直到我退出它?如果我将金字塔设置为 2,那么我只能下 2 个买入订单,直到我同时退出这两个订单?我真的无法理解这个概念。

c。 strategy.exit('Buy Exit' , from_entry = 'Buy' , profit = 50 * 10),意思是我们从 50 点中获利对吗?这是蜡烛收盘价的 50 点吗?

d。如何查看图像中以紫色突出显示的利润价格?有没有办法在数据窗口看到它?

感谢任何可以回答我问题的人

【问题讨论】:

    标签: pine-script algorithmic-trading trading


    【解决方案1】:

    一个。为什么我在 15:00 [我在 GMT +8 ZONE] 的情况下明确指出在 15:00 后做多?

    我想这个退出是从以前的进入。

    b.金字塔到底是什么意思?这是否意味着如果我将金字塔设置为 1,那么我只能下一个买单,直到我退出它?如果我将金字塔设置为 2,那么我只能下 2 个买入订单,直到我同时退出这两个订单?我真的无法理解这个概念。

    是的。如果金字塔 == 1,那么您只能在同一方向(多头或空头)打开一个条目。如果金字塔 == 2,那么您只能在同一方向打开一两个条目。等等。

    c。 strategy.exit('Buy Exit' , from_entry = 'Buy' , profit = 50 * 10),意思是我们从 50 点中获利对吗?这是蜡烛收盘价的 50 点吗?

    profit = 50 * 10表示您设置了500点的开仓价利润抵消。

    d。如何查看图像中以紫色突出显示的利润价格?有没有办法在数据窗口看到它?

    不,数据窗口中没有任何订单信息。您可以在图表下方面板的交易列表中查看订单的执行价格。

    【讨论】:

      猜你喜欢
      • 2014-06-23
      • 2014-07-02
      • 1970-01-01
      • 2012-06-02
      • 2020-12-13
      • 2019-09-14
      • 2017-06-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多