Vàng / Đô la Mỹ

Pola N trading

121
import matplotlib.pyplot as plt

# Data points for bullish N pattern (XAU/USD)
x_bullish = [0, 1, 2, 3]
y_bullish = [1800, 1850, 1825, 1900]

# Data points for bearish N pattern (XAU/USD)
x_bearish = [0, 1, 2, 3]
y_bearish = [1900, 1825, 1850, 1750]

# Creating subplots for bullish and bearish N patterns
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 6))

# Plotting the bullish N pattern
ax1.plot(x_bullish, y_bullish, marker='o', color='green')
ax1.set_title('Pola N Bullish XAU/USD')
ax1.set_xlabel('Waktu')
ax1.set_ylabel('Harga ($)')
ax1.annotate('A', xy=(0, 1800), xytext=(0, 1750), arrowprops=dict(facecolor='black', shrink=0.05))
ax1.annotate('B', xy=(1, 1850), xytext=(1, 1875), arrowprops=dict(facecolor='black', shrink=0.05))
ax1.annotate('C', xy=(2, 1825), xytext=(2, 1780), arrowprops=dict(facecolor='black', shrink=0.05))
ax1.annotate('D', xy=(3, 1900), xytext=(3, 1930), arrowprops=dict(facecolor='black', shrink=0.05))
ax1.grid(True)

# Plotting the bearish N pattern
ax2.plot(x_bearish, y_bearish, marker='o', color='red')
ax2.set_title('Pola N Bearish XAU/USD')
ax2.set_xlabel('Waktu')
ax2.set_ylabel('Harga ($)')
ax2.annotate('A', xy=(0, 1900), xytext=(0, 1930), arrowprops=dict(facecolor='black', shrink=0.05))
ax2.annotate('B', xy=(1, 1825), xytext=(1, 1800), arrowprops=dict(facecolor='black', shrink=0.05))
ax2.annotate('C', xy=(2, 1850), xytext=(2, 1880), arrowprops=dict(facecolor='black', shrink=0.05))
ax2.annotate('D', xy=(3, 1750), xytext=(3, 1720), arrowprops=dict(facecolor='black', shrink=0.05))
ax2.grid(True)

plt.show()

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.