股票的K线图之什么叫大阴线?小阴线?大阳线?小阳线?

K线共有三大类,22种形态。

第一大类是以收盘价与开盘价来划分的,分为阴线和阳线两种。

(1)收盘价低于开盘价的K线,称为阴线。实体部分为黑色。

(2)收盘价高于开盘价的K线,称为阳线。实体部分为白色。


第二大类是以时间划分的,分为日线,周线,月线和年线(这类K线中,还包括5分钟线,10分钟线,15分钟线,30分钟线,60分钟线等五种分时线。)

(1)以每天的开盘价,最高价,最低价和收盘价做出图线,称为日K线,简称日线。

(2)以每周第一天的开盘价作为周开盘价,每周最后一天的收盘价作为周收盘价,以一周当中的最高价和最低价作为一周的最高价和最低价做出的图线,称为周K线,简称周线。

(3) 以每年的第一天的开盘价作为年开盘价,以每年最后一天的收盘价作为年收盘价,以一年最高价和最低价作为一年的最高价和最低价做出和图线,称为年K线,简称为年线。


第三大类是以实体的不同形态划分的,可分为全秃阳线和全秃阴线,开盘秃阳线和开盘秃阴线,收盘秃阳线和收盘秃阴线,大阳线和大阴线,小阳线和小阴线,星形阳线和星形阴线,上吊阳线和上吊阴线,上影阳线和上影阴线以及四值同一线,丁字线,倒丁字线,十字线等20种图线。
回答者:栖息游牧 - 江湖新秀 五级 5-5 11:41

阳线---收盘价>开盘价。
阴线---收盘价<开盘价。

大阳线---收盘价/开盘价>7%
大阴线---收盘价/开盘价<7%
中阳线---7%>收盘价/开盘价>3%

小阳线---3%>收盘价/开盘价>1%
小阴线---3%<收盘价/开盘价<1%
小阳星---1%>收盘价/开盘价 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个简单的 Windows API 绘制交互式 K 线图的示例代码,其中使用了 GDI+ 库进行绘制。 ```c++ #include <windows.h> #include <gdiplus.h> #pragma comment(lib, "gdiplus.lib") using namespace Gdiplus; // K 线数据结构 struct KLine { double open; double high; double low; double close; }; // K 线图数据 KLine klines[] = { { 100, 120, 80, 110 }, { 110, 130, 90, 120 }, { 120, 140, 100, 130 }, { 130, 150, 110, 140 }, { 140, 160, 120, 150 }, { 150, 170, 130, 160 }, { 160, 180, 140, 170 }, { 170, 190, 150, 180 }, { 180, 200, 160, 190 }, { 190, 210, 170, 200 }, }; // K 线图参数 const int klineCount = sizeof(klines) / sizeof(KLine); const int margin = 50; const int width = 800; const int height = 600; const int barWidth = (width - margin * 2) / klineCount; const double maxValue = 220; const double minValue = 70; // 绘制 K 线图 void DrawKLine(HDC hdc) { Graphics graphics(hdc); Pen pen(Color(255, 255, 255)); SolidBrush brush(Color(255, 255, 255)); // 绘制坐标轴 graphics.DrawLine(&pen, margin, margin, margin, height - margin); graphics.DrawLine(&pen, margin, height - margin, width - margin, height - margin); // 绘制 Y 轴标尺 for (double value = minValue; value <= maxValue; value += 20) { int y = height - margin - (value - minValue) * (height - margin * 2) / (maxValue - minValue); graphics.DrawLine(&pen, margin - 5, y, margin, y); graphics.DrawString(std::to_wstring(value).c_str(), -1, &FontFamily(L"Arial"), PointF(0, y - 10), &brush); } // 绘制 K 线 for (int i = 0; i < klineCount; i++) { int x = margin + i * barWidth + barWidth / 2; int openY = height - margin - (klines[i].open - minValue) * (height - margin * 2) / (maxValue - minValue); int highY = height - margin - (klines[i].high - minValue) * (height - margin * 2) / (maxValue - minValue); int lowY = height - margin - (klines[i].low - minValue) * (height - margin * 2) / (maxValue - minValue); int closeY = height - margin - (klines[i].close - minValue) * (height - margin * 2) / (maxValue - minValue); if (klines[i].close > klines[i].open) { // 绘制阳线 graphics.DrawLine(&pen, x, highY, x, lowY); graphics.DrawLine(&pen, x - barWidth / 2, closeY, x, closeY); graphics.DrawLine(&pen, x, openY, x + barWidth / 2, openY); } else { // 绘制阴线 graphics.DrawLine(&pen, x, highY, x, lowY); graphics.DrawLine(&pen, x - barWidth / 2, openY, x, openY); graphics.DrawLine(&pen, x, closeY, x + barWidth / 2, closeY); } } } // 窗口过程 LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); DrawKLine(hdc); EndPaint(hwnd, &ps); } break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } // 程序入口 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // 初始化 GDI+ GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); // 创建窗口 WNDCLASS wc = { 0 }; wc.lpfnWndProc = WndProc; wc.hInstance = hInstance; wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND); wc.lpszClassName = L"KLineWindowClass"; RegisterClass(&wc); HWND hwnd = CreateWindow(L"KLineWindowClass", L"K 线图", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); ShowWindow(hwnd, nCmdShow); // 消息循环 MSG msg = { 0 }; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } // 关闭 GDI+ GdiplusShutdown(gdiplusToken); return (int)msg.wParam; } ``` 这个示例代码使用了一个简单的 K 线数据结构和一些固定的绘图参数进行绘制。在实际应用中,你需要根据实际的数据进行计算和绘制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值