绘制没有水平线的安全功能?
Plotting the security function without the horizontal lines?
如果我运行这个脚本
Custom_time_frame_close = security(syminfo.tickerid, '12M', close)
plot(Custom_time_frame_close)
情节会有很多这样的水平线
如何删除水平线,使其看起来与我使用 1 年分辨率(不更改为 1 年分辨率)时相同?
当您调用年度收盘数据系列时,它包含年末(收盘)的每个新值,并且没有关于年内变化的信息。
最简单的解决方法是使用简单移动平均线平滑数据系列:
//@version=4
study("")
Custom_time_frame_close = security(syminfo.tickerid, '12M', close)
plot(Custom_time_frame_close)
Smoothed_custom_time_frame_close = sma(Custom_time_frame_close, 50)
plot(Smoothed_custom_time_frame_close, color = color.red)
否则,您将不得不根据当前时间范围的数据计算年内值,而不是安全调用。
如果我运行这个脚本
Custom_time_frame_close = security(syminfo.tickerid, '12M', close)
plot(Custom_time_frame_close)
情节会有很多这样的水平线
如何删除水平线,使其看起来与我使用 1 年分辨率(不更改为 1 年分辨率)时相同?
当您调用年度收盘数据系列时,它包含年末(收盘)的每个新值,并且没有关于年内变化的信息。
最简单的解决方法是使用简单移动平均线平滑数据系列:
//@version=4
study("")
Custom_time_frame_close = security(syminfo.tickerid, '12M', close)
plot(Custom_time_frame_close)
Smoothed_custom_time_frame_close = sma(Custom_time_frame_close, 50)
plot(Smoothed_custom_time_frame_close, color = color.red)
否则,您将不得不根据当前时间范围的数据计算年内值,而不是安全调用。