当前位置:网站首页>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)

边栏推荐
- Is it necessary to buy EIP? Price analysis of EIP
- What is the maximum bandwidth of EIP? Mbps how to modify the bandwidth of EIP
- What is the difference between server leasing and hosting?
- ModStartCMS 企业内容建站系统(支持 Laravel9)v4.2.0
- No monitoring information seen in kibana
- Old popup explorer Exe has stopped working due to problems. What should I do?
- Ar 3D map technology
- take the crown! Tencent security won the 2021 national network security week outstanding innovation achievement award
- Iguard6.0 - appropriate website protection system
- How to build glasses website what are the functions of glasses website construction
猜你喜欢

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

Modstartcms enterprise content site building system (supporting laravel9) v4.2.0

Community pycharm installation visual database

Ar 3D map technology

元气森林推“有矿”,农夫山泉们跟着“卷”?

Koom of memory leak

【代码随想录-动态规划】T392.判断子序列

你了解TLS协议吗?
![[code Capriccio - dynamic planning] t392 Judgement subsequence](/img/59/9da6d70195ce64b70ada8687a07488.png)
[code Capriccio - dynamic planning] t392 Judgement subsequence

QT creator tips
随机推荐
Use lightweight application server to automatically download and upload to onedrive
Several key tools for cloud native implementation
Rasa 3.x 学习系列-Rasa 3.2.0 新版本发布
内存泄漏之KOOM-Shark中的Hprof信息
Building RPM packages - spec Basics
hprofStringCache
How to choose excellent server hosting or server leasing in Beijing
Supply chain system platform: two management areas
Why can't the fortress machine open the port? There is a problem with the use of the fortress machine port
What does elastic scaling of cloud computing mean? What are the application scenarios for elastic scaling of cloud computing?
老弹出explorer.exe遇到问题已停止工作,怎么办?
Understand Devops from the perspective of leader
Chapter 6: UART echo case of PS bare metal and FreeRTOS case development
LeetCode 129. Find the sum of numbers from root node to leaf node
Technical dry goods - how to use AI technology to accurately identify mining Trojans
Tencent cloud ASR product -php realizes the authentication request of the extremely fast version of recording file identification
Highlights of future cloud native CIF Forum
Event id:7001: after restarting the machine, the World Wide Web failed to start automatically, resulting in inaccessible websites
halcon知识:区域(Region)上的轮廓算子(2)
Hprof information in koom shark with memory leak