|
有件事想请教下各路大神,自己在盘立方上如何加载指标代码?
比如说我在 Tradingview 上已经有代码(我贴在后面)了,该怎么移植到盘立方PC端的软件里呢?
希望万能的盘友大佬可以解答,谢谢!
====================分割线===================
//@version=5
indicator("Smoothed Heiken Ashi", "SHA", overlay=true, timeframe="", timeframe_gaps=true)
import wallneradam/TAExt/8
//
// User inputs
//
ha_smooth_length = input.int(10, "Smooth Length", minval=1, group="Before HA")
ha_smooth_ma_type = input.string('EMA', 'MA Type', options=['SMA', 'EMA', 'WMA', "VWMA", "RMA", "DEMA", "TEMA", "ZLEMA", "HMA", "ALMA", "LSMA", "SWMA", "SMMA", "JMA", "DONCHIAN", "ATRWSMA", "ATRWEMA", "ATRWRMA", "ATRWWMA"], group="Before HA")
ha_after_smooth_length = input.int(10, "After Smooth Length", minval=1, group="After HA")
ha_after_smooth_ma_type = input.string('EMA', 'After MA Type', options=['SMA', 'EMA', 'WMA', "VWMA", "RMA", "DEMA", "TEMA", "ZLEMA", "HMA", "ALMA", "LSMA", "SWMA", "SMMA", "JMA", "DONCHIAN", "ATRWSMA", "ATRWEMA", "ATRWRMA", "ATRWWMA"], group="After HA")
//
// Calculation
//
[o, h, l, c] = TAExt.heiken_ashi(smooth_length=ha_smooth_length, smooth_ma_type=ha_smooth_ma_type, after_smooth_length=ha_after_smooth_length, after_smooth_ma_type=ha_after_smooth_ma_type)
//
// Plotting
//
plotcandle(o, h, l, c, title="Smoothed Heiken Ashi",
color=o > c ? color.new(color.red, 60) : color.new(color.lime, 60),
wickcolor=o > c ? color.new(color.red, 20) : color.new(color.lime, 20),
bordercolor=o > c ? color.new(color.red, 10) : color.new(color.lime, 10))
|
|