TradingView Alerrt消息问题-(alertcondition自定义消息问题)

时间:2020-07-16 16:03:11

标签: pine-script

我希望有人能帮助我。我知道这可能真的很简单,但我无法弄清楚。

在数据透视脚本中,它可以让用户输入数据透视类型:

pivotType = input(title="Pivot Type", options=["Daily", "Intraday", "Weekly"], defval="Daily")

在警报消息中,我希望它指出警报关闭时枢轴类型命中的位置。我希望该消息说“每日枢轴水平命中”或“每周枢轴水平命中”。我在下面尝试了以下方法,但是似乎没有用。

alertcondition(condition=cross(close, r1), title="All Pivots Alert", message="A {{pivotType}} Pivot level hit")

我尝试了上面的格式,但是似乎没有用。我需要输入什么代码才能在数据中显示ivotType?

非常感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

当前无法在import React from "react"; import SliderImage from "./SliderImage"; import M from "materialize-css"; const Slider = () => { document.addEventListener("DOMContentLoaded", function () { var elems = document.querySelectorAll(".slider"); M.Slider.init(elems, { indicators: false, height: 600, transition: 500, interval: 6000, }); }); return ( <div class="slider test"> <ul class="slides"> <SliderImage image={ "https://raw.githubusercontent.com/Shihara-Dilshan/img/master/ITP/Front-image-2.jpg" } title={"Jewellery"} description={"Find your perfect jewellery piece to mark your special moment."} classPosition={"caption center-align"} /> <SliderImage image={ "https://raw.githubusercontent.com/Shihara-Dilshan/img/master/ITP/Front-image-5.jpg" } title={"Rings that bind time"} description={"Here's our small slogan."} classPosition={"caption left-align"} /> <SliderImage image={ "https://raw.githubusercontent.com/Shihara-Dilshan/img/master/ITP/Front-image-3.jpg" } title={"Clasped with class"} description={"Stylish bracelets that put you in a class of your own."} classPosition={"caption right-align"} /> <SliderImage image={ "https://raw.githubusercontent.com/Shihara-Dilshan/img/master/ITP/Front-image-6.jpg" } title={"Hanging art"} description={"Pendants that are modern art or spiritual symbols, includes a range of Dhammachackras and Crosses."} classPosition={"caption center-align"} /> </ul> </div> ); }; export default Slider; 消息文本中包含动态文本。有关更多详细信息,请参见Is it possible to use a string that varies as an argument to the alertcondition() function’s message= parameter?

您可以使用此技术来绘制与每个条件相对应的变化的数值:How can I include values that change in my alerts?