当前位置:网站首页>Pine Script脚本常用内容
Pine Script脚本常用内容
2022-06-24 03:35:00 【码肥人壮】
1、设置指标名字
study("我的指标") //指标名字

2、画线
plot(close, color=osc_color, style=line, linewidth=2)
四个参数,依次为数据、颜色、类型、线宽,好想还有其他不常用参数,除了数据参数,其他都可以省略。
其中style类型有如下几种:
- line:曲线
- histogram:直方图
- 其他的还需要摸索
官方解释:
style (plot_style) Type of plot. Possible values are: plot.style_line, plot.style_stepline, plot.style_stepline_diamond, plot.style_histogram, plot.style_cross, plot.style_area, plot.style_columns, plot.style_circles, plot.style_linebr, plot.style_areabr. Default value is plot.style_line.
3、画线之间的填充
p1 = plot(open)
p2 = plot(close)
fill(p1, p2, color=color.new(color.green, 90))

还有很多内容,后续持续更新。。。
3、参数输入
一般来说,我们不需要定义变量,直接使用就行了,如下面代码左边。可是变量总有个输入来源,那就是参数设置,使用input函数。
length = input.int(9, minval=1)
length2 = input.int(2, minval=1)
length3 = input.int(3, minval=1)

边栏推荐
- [new double 11] the latest interpretation of Tencent cloud double 11! Get 11000 yuan voucher now!!
- web渗透测试----5、暴力破解漏洞--(7)MYSQL密码破解
- Disk partition extension using graphical interface and PowerShell code
- No monitoring information seen in kibana
- golang clean a slice
- Interpreting Tencent cloud product experience through user experience elements
- web渗透测试----5、暴力破解漏洞--(3)FTP密码破解
- LeetCode 1047. Delete all adjacent duplicates in the string
- Live broadcast Reservation: cloud hosting or cloud function, how can the business do a good job in technology selection?
- Rasa 3.x 学习系列-Rasa 3.2.0 新版本发布
猜你喜欢

halcon知识:区域(Region)上的轮廓算子(2)

618大促:手机品牌“神仙打架”,高端市场“谁主沉浮”?

Halcon knowledge: contour operator on region (2)

在pycharm中pytorch的安装

QT creator tips

On Sunday, I rolled up the uni app "uview excellent UI framework"
![[code Capriccio - dynamic planning] t392 Judgement subsequence](/img/59/9da6d70195ce64b70ada8687a07488.png)
[code Capriccio - dynamic planning] t392 Judgement subsequence

ModStartCMS 企业内容建站系统(支持 Laravel9)v4.2.0

Do you understand TLS protocol?

ModStartCMS 主题入门开发教程
随机推荐
Can elastic public IP be bound to a home server? The difference between elastic public IP and fixed IP
What is the difference between server leasing and hosting?
Mocktio usage (Part 2)
Big coffee face to face | Dr. Chen Guoguo talks about intelligent voice
web渗透测试----5、暴力破解漏洞--(2)SNMP密码破解
Highlights of future cloud native CIF Forum
What is edge computing? What are the characteristics of the Internet platform edge calculator?
13. Tencent cloud IOT device side learning - data template function and Implementation
Paste board based on curl and COS
golang clean a slice
RPM 包的构建 - SPEC 基础知识
How to install CentOS 6.5 PHP extension
Why does the fortress machine use an application publisher? What are the main functions of the fortress machine
Troubleshooting and resolution of errors in easycvr calling batch deletion interface
Case analysis | interpret the truth that multi branch enterprises choose sd-wan network reconstruction in combination with real cases
How to design a hybrid system
Psexec right raising
News | detailed explanation of network security vulnerabilities of branch enterprises
MySQL stored procedure + function
Installation of pytorch in pycharm