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

边栏推荐
- Grpc: how to make grpc provide restful API services?
- Case analysis | interpret the truth that multi branch enterprises choose sd-wan network reconstruction in combination with real cases
- What is the price of the elastic public network IP bandwidth
- Tencent cloud launched its new 100g+ cloud server product!! Expect more than 400g+ in the future!
- Industrial security experts talk about how to build security protection capability for government big data platform?
- LeetCode 129. Find the sum of numbers from root node to leaf node
- Rasa 3.x 学习系列-Rasa 3.2.0 新版本发布
- How to solve the problem of easycvr playing the total recording time in the specified time period?
- Community pycharm installation visual database
- Installation of pytorch in pycharm
猜你喜欢

Old popup explorer Exe has stopped working due to problems. What should I do?

On game safety (I)

浅谈游戏安全 (一)
![[code Capriccio - dynamic planning] t392 Judgement subsequence](/img/59/9da6d70195ce64b70ada8687a07488.png)
[code Capriccio - dynamic planning] t392 Judgement subsequence

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

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

Ar 3D map technology

Community pycharm installation visual database

在pycharm中pytorch的安装

Do you understand TLS protocol?
随机推荐
Iguard6.0 - appropriate website protection system
An example of SPM manual binding execution plan
web rdp Myrtille
Ar 3D map technology
What technology does cloud computing elasticity scale? What are the advantages of elastic scaling in cloud computing?
左滑从小窗到大窗口DispatchFrameLayout
Cross platform RDP protocol, RDP like protocol and non RDP protocol remote software
Supply chain system platform: two management areas
Record the creation process of a joke widget (I)
Modstartcms enterprise content site building system (supporting laravel9) v4.2.0
What does elastic public IP mean? The advantages of elastic public IP
Differences between EDI and VMI
Summary of common SSH commands
Hprof information in koom shark with memory leak
How to bypass CDN to get web pages? How many options are available?
内存泄漏之KOOM
QT creator tips
Why does the fortress machine use an application publisher? What are the main functions of the fortress machine
Independent innovation and localization technology: SMT production line monitoring and management visualization of intelligent manufacturing
Using RDM (Remote Desktop Manager) to import CSV batch remote