查看: 260|回复: 0
打印 上一主题 下一主题

求教关于PC端盘立方加载指标代码的问题

[复制链接]
跳转到指定楼层
1
 楼主| 发表于 2023-12-3 16:44:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
有件事想请教下各路大神,自己在盘立方上如何加载指标代码?
比如说我在 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))








您需要登录后才可以回帖 登录 | 注册入住  

本版积分规则

易家网  ©2015-2023  郑州期米信息技术有限公司版权所有  豫公网安备 41010502005136号 豫ICP备16010300号