var x = '123'
x := x + '211'
plotshape(true, style=shape.labelup, color=close>open ?color.green:color.red, text= x, location=location.belowbar)
will具有错误的第39行:不能用参数调用plotshape (文字bool、style=const字符串、color=seriescolor、text=string、location=const字符串);可用重载:plotshape(序列化、const、输入字符串、输入整
我尝试了这么多,但不幸的是,我不能转换这个策略,交易视图策略到V4松树脚本,有人可能会在这种情况下帮助我。我搜索了这么多关于这个案例,但我不能解决我的问题,请帮助我。另外,pine脚本是phyton编程语言吗?pine脚本只有1个参考资料,这真的不完整,我想有什么好的参考资料可以参考这种语言吗? strategy(title='Sepehr Heydari Hi Crypto Test Project', overlay=true, currency=currency.USD)
useHA = input(false, title='Use Heikken Ashi
我也在尝试将15分钟内的相同形状绘制到《每日新闻》上。这是在15分钟内绘制一个形状的代码,效果很好; if crossover(s3K,s3D) and s3K<25 and (s4K-s4D<3 and s4K-s4D>-3) and s4K<35//or s4D-s4K>0 and s4D-s4K<1 and s4K<50 and s1K<40
rwCross:=true
plotshape(rwCross, style = shape.arrowup, location = location.belowbar, color=c
这是我写的一个简单的脚本,用来表示一个简单的反转模式。我想添加到每一行,所以当随机%D大于80将触发一个红色向下箭头,而当%D低于20时,触发一个绿色向上箭头。
study("Ringed HL", overlay=true)
datadown = open[1] > open[2] and close[1] > close[2] and close[2] > open[2] and close[1] > open[1] and close < open
dataup = open[1] < open[2] and close[1] <
我试图打印一个三角形形状在松树脚本中的3个具体日期。我无法在以下任何日期打印形状。
//@version=4`
study(title = "Mercury Pivot", shorttitle="Mercury Pivot", overlay =true)`
//These are the dates which i want the Triangle to be printed below
t1 = timestamp(2017, 11, 1, 0, 0) // 1st of November 2017
t2 =
我正在尝试编写一个代码,当heiken ashi条改变颜色时发送警报,但每次条件为真时它都会发送警报,但我只希望在满足条件时触发警报 study("Heikin Ashi Candle Colour Change Alerts", overlay=true)
val = (open + high + low + close) / 4
up = val > val[1]
down = val <= val[1]
alertcondition(condition = up, title = 'Up Candle', message =
我正在tradingview中创建一个趋势指标来跟踪趋势的走向。具体地说,我想要一个在几天内保持不变的变量,但当满足某个特定条件时,它将发生变化。这看起来应该很简单,但每次我尝试时,我都会陷入一个永无止境的循环中,我似乎无法理解它。变量“趋势” ///Condition
pos = close > open
neg = close < open
pos_cond = pos and pos[1]
neg_cond = neg and neg[1]
///Variables to keep track of trend
Trend = iff(***pos_cond or n
我正在编写一个简单的pine脚本来显示昨天和上周的min和max以及其他一些参数。问题是High和Low函数的输出是串联的,而hline函数只有一个浮点值!我已经尝试过使用plot函数。这种情况下的主要问题是,它显示了前几周的最小和最大值,而不仅仅是最近一周。在我的策略中不需要较旧的数据。 https://www.tradingview.com/x/kBXx404J/ `// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//
试图使用barssince函数取消登录订单。
希望它取消,如果没有填补相同的蜡烛订单是放置/蜡烛后,进入条件被满足。我不明白为什么它不起作用--它看起来如此简单。
rp1 = close[1] >= open [1] and close < open and high >= high[1]
rp1p = highest(high,1)
plotshape(rp1, style=shape.circle, location=location.abovebar, color=color.red)
if rp1 and strategy.opentrades == 0