超基本的AmiBroker畫線教學
本帖最後由 綠茶妹 於 10-1-25 10:59 PM 編輯這篇真的很簡單,但是我想,我邊學就邊放上來,
這樣子如果我忘記了還可以上來查。
下面是很基本的畫顏色線功能,
colorBlue是藍色。
Plot(C,"Close",colorBlue,styleLine);
"Close"是這條線的名稱。
還有幾個基本顏色,如黑色、綠色等等。
colorBlack,colorGreen,colorRed,colorWhite。
除了基本色,也可以開調色盤調任意的顏色。
如果你要開調色盤可以這樣子寫。
color = ParamColor("color",colorRed);
Plot(C,"Close",color);
此時color會變成可編輯的參數。如下圖可以改色。
這是我最後選的顏色。
----------------------------------------------------------
線的形式分成好幾種。
styleLine = 1 − normal (line) chart (default)
styleHistogram = 2 − histogram chart
styleThick =4 − fat (thick)
styleDots = 8 − include dots
styleNoLine = 16 − no line
styleDashed = 32 − dashed line style
styleCandle = 64 − candlestick chart
styleBar = 128 − traditional bar chart
styleNoDraw = 256 − no draw (perform axis scaling only)
styleStaircase = 512 − staircase (square) chart
styleSwingDots = 1024 − middle dots for staircase chart
styleNoRescale = 2048 − no rescale
styleNoLabel = 4096 − no value label
stylePointAndFigure = 8192 − point and figure
(new in 4.20):
styleArea = 16384 − area chart (extra wide histogram)
styleOwnScale = 32768 − plot is using independent scaling
styleLeftAxisScale = 65536 − plot is using left axis scale (independent from right
axis)
styleNoTitle − do not display values of this plot in the chart title
styleCloud − cloud style (area between high and low arrays) − to be used with
PlotOHLC function
styleClipMinMax − clip (do not paint) area between min and max levels − note this
style is incompatible with printers and WMF (metafiles).
styleLine: 最基本的實線
styleHistogram: 長條圖?
styleThick: 粗線
styleDots:點點線?(嗯,我猜的,要實際畫畫看才知道,等一下要洗澡睡覺了,
有需要的朋友來畫畫看吧)
styleNoLine: 沒有線 (隱形?)
styleDashed: 虛線
styleCandle: K線,陰陽線,蠟燭線
styleBar: 美國線
.....
各位加減看,綠茶看的懂什麼就學什麼,然後就寫下來備忘,
沒辦法很有系統性的介紹。
還需要大家多多指導。 我補充一下顏色常數。
自定的顏色可以從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 {:4_199:}謝謝!
有顏色表比較好認。
我還是不知道為什麼我回測的金額是錯誤的,正在查手冊中。
我覺得我可能查不出來,因為我上次也看過手冊了。囧。
頁:
[1]