COCO研究院

 找回密碼
 註冊
搜索
查看: 7066|回復: 2

[教學] 超基本的AmiBroker畫線教學

[複製鏈接]
發表於 10-1-25 22:30 | 顯示全部樓層 |閱讀模式
本帖最後由 綠茶妹 於 10-1-25 10:59 PM 編輯

這篇真的很簡單,但是我想,我邊學就邊放上來,
這樣子如果我忘記了還可以上來查。

下面是很基本的畫顏色線功能,
colorBlue是藍色。
  1. Plot(C,"Close",colorBlue,styleLine);
複製代碼

"Close"是這條線的名稱。

畫線.gif

還有幾個基本顏色,如黑色、綠色等等。
colorBlack,colorGreen,colorRed,colorWhite。
除了基本色,也可以開調色盤調任意的顏色。

如果你要開調色盤可以這樣子寫。

  1. color = ParamColor("color",colorRed);
  2. Plot(C,"Close",color);
複製代碼


此時color會變成可編輯的參數。如下圖可以改色。

k1.gif

k2.gif

這是我最後選的顏色。

k3.gif

----------------------------------------------------------

線的形式分成好幾種。


  1. styleLine = 1 − normal (line) chart (default)
  2. styleHistogram = 2 − histogram chart
  3. styleThick =4 − fat (thick)
  4. styleDots = 8 − include dots
  5. styleNoLine = 16 − no line
  6. styleDashed = 32 − dashed line style
  7. styleCandle = 64 − candlestick chart
  8. styleBar = 128 − traditional bar chart
  9. styleNoDraw = 256 − no draw (perform axis scaling only)
  10. styleStaircase = 512 − staircase (square) chart
  11. styleSwingDots = 1024 − middle dots for staircase chart
  12. styleNoRescale = 2048 − no rescale
  13. styleNoLabel = 4096 − no value label
  14. stylePointAndFigure = 8192 − point and figure
  15. (new in 4.20):
  16. styleArea = 16384 − area chart (extra wide histogram)
  17. styleOwnScale = 32768 − plot is using independent scaling
  18. styleLeftAxisScale = 65536 − plot is using left axis scale (independent from right
  19. axis)
  20. styleNoTitle − do not display values of this plot in the chart title
  21. styleCloud − cloud style (area between high and low arrays) − to be used with
  22. PlotOHLC function
  23. styleClipMinMax − clip (do not paint) area between min and max levels − note this
  24. style is incompatible with printers and WMF (metafiles).
複製代碼


styleLine: 最基本的實線
styleHistogram: 長條圖?
styleThick: 粗線
styleDots:點點線?(嗯,我猜的,要實際畫畫看才知道,等一下要洗澡睡覺了,
                           有需要的朋友來畫畫看吧)
styleNoLine: 沒有線 (隱形?)
styleDashed: 虛線
styleCandle: K線,陰陽線,蠟燭線
styleBar: 美國線
.....


各位加減看,綠茶看的懂什麼就學什麼,然後就寫下來備忘,
沒辦法很有系統性的介紹。
還需要大家多多指導。
 樓主| 發表於 10-2-11 21:26 | 顯示全部樓層
我補充一下顏色常數。

自定的顏色可以從Tools−>Preferences−>Colors選擇。
the numerical
values that appear after = (equation) mark are for reference only and you don't need to use them. Use just
the name such as colorDarkGreen.
colorCustom1 = 0
colorCustom2 = 1
colorCustom3 = 2
colorCustom4 = 3
colorCustom5 = 4
colorCustom6 = 5
colorCustom7 = 6
colorCustom8 = 7
colorCustom9 = 8
colorCustom10 = 9
colorCustom11 = 10
colorCustom12 = 11
colorCustom13 = 12
colorCustom14 = 13
colorCustom15 = 14
colorCustom16 = 15
colorBlack = 16
colorBrown = 17
colorDarkOliveGreen = 18
colorDarkGreen = 19
colorDarkTeal = 20
colorDarkBlue = 21
colorIndigo = 22
colorDarkGrey = 23
colorDarkRed = 24
colorOrange = 25
colorDarkYellow = 26
colorGreen = 27
colorTeal = 28
colorBlue = 29
colorBlueGrey = 30
colorGrey40 = 31
colorRed = 32
colorLightOrange = 33
colorLime = 34
colorSeaGreen = 35
colorAqua = 35
colorLightBlue = 37
colorViolet = 38
colorGrey50 = 39
colorPink = 40
colorGold = 41
colorYellow = 42
colorBrightGreen = 43
colorTurquoise = 44
colorSkyblue = 45
colorPlum = 46
colorLightGrey = 47
colorRose = 48
colorTan = 49
colorLightYellow = 50
colorPaleGreen = 51
colorPaleTurquoise = 52
colorPaleBlue = 53
colorLavender = 54
colorWhite = 55

你也可以用24-bit函式ColorRGB and ColorHSB
 樓主| 發表於 10-2-11 21:40 | 顯示全部樓層
謝謝!
有顏色表比較好認。

我還是不知道為什麼我回測的金額是錯誤的,正在查手冊中。
我覺得我可能查不出來,因為我上次也看過手冊了。囧。
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-5-15 07:40

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook