Pine Script是TradingView提供的专属编程语言,旨在帮助交易者创建自定义指标和策略,进行回测和实时分析。作为一种轻量级但功能强大的语言,Pine Script 使用户能够在TradingView平台上实现个性化的技术分析工具。要在TradingView上使用Pine Script,首先需要在图表界面打开“Pine 编辑器”。在编辑器中,用户可以编写脚本并将其应用于图表。脚本可以是指标(如移动平均线、RSI 等)或策略(用于回测交易信号)。
官方文档提供了详细的函数和示例,帮助用户理解和应用各种功能。此外,TradingView拥有一个活跃的社区,用户可以在“公共库”中浏览和使用他人分享的脚本。通过搜索功能,可以找到各种类型的指标和策略,满足不同的交易需求。许多脚本是开源的,用户可以查看其源代码,学习他人的编程思路,并根据自己的需要进行修改和优化。介绍完 Pine Script 的基础功能后,接下来我们将动手实战,编写第一个简单的均线技术指标,并将其应用到K线图中。
indicator("MA #1",overlay=true)short = 20long = 120shortMA = ta.ema(close, short)longMA = ta.ema(close, long)plot(shortMA, color = color.blue)plot(longMA, color = color.orange)这段Pine Script脚本实现了在TradingView的主图(也就是 K 线图)上绘制两条不同周期的指数移动平均线(EMA)。它的作用是帮助交易者观察市场的短期与长期趋势,是很多技术分析中常见的基础工具。首先,脚本通过indicator("MA #1", overlay=true)定义了指标的基本信息。其中"MA #1"是该指标在图表上显示的名称,而overlay=true表示该指标将直接绘制在价格图上,而不是在单独的副图中显示。接下来,脚本定义了两个变量short=20和long=120,分别代表短期和长期均线的周期。周期指的是计算均线时所参考的历史K线数量,比如在日线图中,20就代表20个交易日。之后,使用ta.ema(close, short)和ta.ema(close, long)计算出这两个周期的EMA值,分别赋值给shortMA 和longMA。EMA是一种常用的平滑移动平均方式,相较于简单移动平均(SMA),它对最新的数据更敏感,因此在趋势判断上更及时。最后,通过plot(shortMA, color=color.blue) 和 plot(longMA, color=color.orange) 将两条 EMA 线绘制到图表上,分别使用蓝色和橙色加以区分。这样,交易者在图表中就可以直观地看到短期与长期的价格趋势,有助于进行技术分析、识别趋势方向或寻找潜在的买卖点。
整体而言,这段代码是非常适合初学者的 Pine Script 示例,简洁清晰,同时具备实用性,为后续扩展更多交易逻辑(如信号提示、策略测试等)打下良好基础。
免责声明:GO Markets 分析师或外部发言人提供的信息基于其独立分析或个人经验。所表达的观点或交易风格仅代表其个人;并不代表 GO Markets 的观点或立场。
联系方式:
墨尔本 03 8658 0603
悉尼 02 9188 0418
中国地区(中文) 400 120 8537中国地区(英文) +248 4 671 903
作者:
Michael Miao | GO Markets 悉尼中文部
By
Michael Miao
The information provided is of general nature only and does not take into account your personal objectives, financial situations or needs. Before acting on any information provided, you should consider whether the information is suitable for you and your personal circumstances and if necessary, seek appropriate professional advice. All opinions, conclusions, forecasts or recommendations are reasonably held at the time of compilation but are subject to change without notice. Past performance is not an indication of future performance. Go Markets Pty Ltd, ABN 85 081 864 039, AFSL 254963 is a CFD issuer, and trading carries significant risks and is not suitable for everyone. You do not own or have any interest in the rights to the underlying assets. You should consider the appropriateness by reviewing our TMD, FSG, PDS and other CFD legal documents to ensure you understand the risks before you invest in CFDs. These documents are available here.
免责声明:文章来自 GO Markets 分析师和参与者,基于他们的独立分析或个人经验。表达的观点、意见或交易风格仅代表作者个人,不代表 GO Markets 立场。建议,(如有),具有“普遍”性,并非基于您的个人目标、财务状况或需求。在根据建议采取行动之前,请考虑该建议(如有)对您的目标、财务状况和需求的适用程度。如果建议与购买特定金融产品有关,您应该在做出任何决定之前了解并考虑该产品的产品披露声明 (PDS) 和金融服务指南 (FSG)。
Markets are navigating a familiar mix of macro and event risk with China growth signals, US inflation updates, central-bank guidance and earnings that will help confirm whether the growth narrative is broadening or narrowing.
At a glance
China: Q4 GDP + December activity + PBOC decision
US: PCE inflation (date per current BEA schedule)
Japan: BOJ decision (JPY/carry sensitivity)
Earnings: tech, industrials, energy, materials in focus
Gold: near record highs (yields/USD/geopolitics watch)
Geopolitics remain fluid. Any escalation could shift risk sentiment quickly and produce price action that diverges from current baselines.
China
China Q4 GDP: Monday, 19 January at 1:00 pm (AEDT)
Retail sales: Monday, 19 January at 1:00 pm (AEDT)
PBOC policy decision: Monday, 19 January at 12.30 pm (AEDT)
China’s Q4 GDP and December activity data, together with the PBOC decision, will shape expectations for China's growth momentum and the durability of policy support.
Market impact
Commodity-linked FX: AUD and NZD may react if growth expectations or the policy tone shifts.
Equities: The Shanghai Composite, Hang Seng and ASX 200 could respond to any change in how investors view demand and stimulus traction.
Commodities: Industrial metals and oil may move on any reassessment of China-linked demand.
US
PCE Inflation: Friday, 23 January at 2:00 am (AEDT)
PSI: Friday, 23 January at 2:00 am (AEDT)
S&P Flash (PMI): Saturday, 24 January at 1:45 am (AEDT)
Netflix: Tuesday, 20 January 2026 at 8:00 am (AEDT)
The personal consumption expenditures (PCE) price index is the Federal Reserve’s preferred inflation gauge and a key input for rate expectations and (by extension) Treasury yields, the USD, and growth stocks. Markets are likely to focus on whether the reading changes the inflation path that is currently priced, rather than simply matching consensus.
Market impact
USD: May move if rate expectations shift, particularly against JPY and EUR.
US equities: Growth and small caps, including the Nasdaq and Russell 2000, may be sensitive if the data or interpretation challenge the current rate outlook.
Gold futures: May be influenced indirectly via moves in Treasury yields and the USD.
Japan
Key reports
Inflation: Friday, 23 January at 10:30 am (AEDT)
Bank of Japan (BoJ) Interest Rate Meeting: Friday, 23 January at ~2:00 pm (AEDT)
Markets will focus on what the BOJ signals about inflation, wages and the policy path. A shift in tone can move JPY quickly and flow through to broader risk via carry positioning.
Market impact:
JPY/USD pairs and crosses: Pairs are sensitive to any guidance change and the USD/JPY has broken above 158, but the move could reverse if the BOJ strikes a more hawkish tone.
Japan equities and global sentiment: Could react if the dynamics shift.
Broader risk assets: May be influenced via moves in the USD and volatility conditions.
Netflix: Tuesday, 20 January 2026 at 8:00 am (AEDT)
Johnson & Johnson: Wednesday, 21 January at 10:20 pm (AEDT)
Intel Corporation: Thursday, 22 January at 8:00 am (AEDT)
A busy week of US earnings is expected with large-cap names across multiple sectors reporting. Early results and, importantly, forward guidance may help clarify whether growth is broadening or becoming more selective.
With the S&P 500 close to the psychological 7,000 level, earnings could be a catalyst for a fresh test of highs or a pullback if guidance disappoints.
Market impact
Upside scenario: Results that exceed expectations and are supported by steady guidance could support sector and broader market sentiment.
Downside scenario: Cautious guidance, particularly on margins and capex, could weigh on individual names and spill into broader indices if it becomes a repeated message.
Read-through: Early reporters in each sector may influence expectations for related stocks, especially where peers have not yet provided updated guidance.
Bottom line: This is a week where the market may trade the forward picture more than the rear-view numbers. The key is whether guidance supports the idea of broad, durable growth, or whether it points to a more selective backdrop as 2026 unfolds.
Continued strength in gold may support gold equities and gold-linked ETFs relative to the broader market but geopolitical developments and policy uncertainty may influence demand for defensive assets.
A sustained reversal in gold could be interpreted by some market participants as a sign of improved risk confidence. The driver set matters, especially whether the move is led by yields, USD strength, or a fade in event risk.
The Australian Securities Exchange (ASX) is one of the world's top 20 exchanges, hosting over 2,000 listed companies worth approximately $2 trillion.
Quick Facts:
The ASX operates as Australia's primary stock exchange, combining market trading, clearinghouse operations, and trade and payment settlement.
It represents roughly 80% of the Australian equity market value through its flagship ASX 200 index.
2,000+ companies and 300+ ETFs are listed on the exchange, spanning from mining giants to tech innovators.
How does the ASX work?
The ASX combines three critical functions in one system.
As a market operator, it provides the electronic platform where buyers and sellers meet. Trading occurs through a sophisticated computer system that matches orders in milliseconds, replacing the traditional floor-based trading that once defined stock exchanges globally.
The exchange also acts as a clearinghouse, ensuring trades settle correctly. When you buy shares, the ASX guarantees the transaction completes, managing the transfer of securities and funds between parties.
Finally, it serves as a payments facilitator, processing the money flows that accompany each trade. This integrated approach reduces settlement risk and keeps the market running smoothly.
What are ASX trading hours?
The ASX operates from 10:00am to 4:00pm Sydney time (AEST/AEDT) on business days, with a pre-open phase from 7:00am.
Stocks open alphabetically in staggered intervals starting at 10:00am, followed by continuous trading until the closing auction at 4:00pm.
The exchange observes Australian public holidays and adjusts for daylight saving time between October and April, which can affect coordination with international markets.
ASX trading hours by time zone
Phase
Sydney (AEST)
Tokyo (JST)
London (BST)
New York (EDT)
Pre-Open
7:00am - 10:00am
6:00am - 9:00am
10:00pm - 1:00am
5:00pm - 8:00pm*
Normal Trading
10:00am - 4:00pm
9:00am - 3:00pm
1:00am - 7:00am
8:00pm - 2:00am*
Closing Auction
4:00pm - 4:10pm
3:00pm - 3:10pm
7:00am - 7:10am
2:00am - 2:10am
*Previous day. Note: Times shown assume daylight saving time in effect (AEST/BST/EDT). Japan does not observe daylight saving. Time differences vary when regions switch between standard and daylight saving at different dates.
Top ASX Indices
S&P/ASX 200
This is the exchange's flagship index. It tracks the 200 largest companies by market capitalisation and represents approximately 80% of Australia's equity market.
It serves as the primary benchmark for most investors and fund managers and is rebalanced quarterly to ensure it reflects the current market leaders.
The ASX also breaks down into 11 sector-specific indices, allowing investors to track performance in areas like financials, materials, healthcare, and technology.
These indices can help identify which parts of the Australian economy are strengthening or weakening.
ASX sector breakdown as of 31 December 2025. Source: S&P Global
Financials dominates as the largest sector, driven by Commonwealth Bank, NAB, Westpac, and ANZ. These banking giants provide lending, wealth management, and insurance services across Australia.
Materials ranks second, led by mining powerhouses BHP and Rio Tinto. This sector extracts and processes resources, including iron ore, coal, copper, and gold.
Consumer Discretionary includes retailers, media companies, and hospitality groups that benefit when household spending rises.
Industrials encompasses construction firms, airlines, and professional services businesses.
Healthcare features companies like CSL, a global biotech leader, and Cochlear, which produces hearing implants.
Real Estate features property developers and Real Estate Investment Trusts (REITs) that own and manage commercial and residential assets.
Communication Services includes telecommunications providers like Telstra alongside media and entertainment companies.
Energy tracks oil and gas producers (many renewable energy companies typically fall under utilities).
Consumer Staples covers essential goods providers like supermarkets and food producers.
Information Technology includes software developers and IT services firms.
Utilities covers electricity, gas, and water suppliers, including renewable energy.
ASX Symbol
Sector
Top Stocks
% of ASX 200
XFJ
Financials
CBA, NAB, ANZ
33.4%
XMJ
Materials
Orica, Amcor, BHP
23.2%
XDJ
Consumer Discretionary
Harvey Norman, Crown
7.4%
XNJ
Industrials
Qantas, Transurban
7.4%
XHJ
Health Care
ResMed, CSL and Cochlear
7.1%
XRE
Real Estate
Mirvac, LendLease, Westfield
6.7%
XTJXIJ
Communication Services
Telstra, Airtasker
3.7%
XEJ
Energy
Santos, Woodside
3.6%
XSJ
Consumer Staples
Woolworths, Westfarmers
3.4%
XIJ
Information Technology
Dicker Data, Xero
2.5%
XUJ
Utilities
AGL, APA Group
1.4%
Data accurate as of 31 December 2025
Top ASX companies
Three companies consistently lead the S&P/ASX 200 by market capitalisation.
Commonwealth Bank (Mkt cap: A$259 bln)
Commonwealth Bank holds the top position on the ASX as Australia's biggest lender.
Founded in 1911 and fully privatised by 1996, CBA offers retail banking, business lending, wealth management, and insurance.
Its performance often signals the health of the domestic economy.
BHP Group (Mkt cap: A$241 bln)
BHP Group stands as the world's largest mining company.
Its diversified portfolio spans iron ore, copper, coal, and nickel operations globally.
It serves as a bellwether for Australian commodity markets.
CSL Limited (Mkt cap: A$182 bln)
CSL Limited leads the Australian healthcare sector as a global biotech firm.
Established in 1916, CSL develops treatments for rare diseases and manufactures influenza vaccines.
The company demonstrates Australian innovation competing on the world stage.
The ASX serves as a vital mechanism for capital formation in Australia. It tends to provide price signals that reflect market expectations.
When share prices rise, it suggests optimism about economic conditions. Falling markets may indicate concerns about future growth.
Australian companies raise funds through initial public offerings and follow-on share sales on the ASX, using proceeds to expand operations, fund research, or pay down debt.
Investors in these shares benefit from potential capital gains and dividend income. Many Australians build retirement savings through superannuation funds that invest heavily in ASX-listed companies.
Employment in financial services also depends partly on a healthy stock market. Brokers, analysts, fund managers, and supporting roles exist because of active capital markets.
Key takeaways
The ASX functions as a market operator, clearinghouse, and payments facilitator, providing the infrastructure that enables capital formation and supports retirement savings for millions of Australians.
Its flagship index, the S&P/ASX 200, tracks the 200 largest companies and captures about 80% of market capitalisation, while the All Ordinaries index covers the top 500.
Financials and Materials dominate the exchange, led by Commonwealth Bank, BHP, and CSL, reflecting Australia's strength in banking and resources.