本帖最後由 綠茶妹 於 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: 美國線 
..... 
 
 
各位加減看,綠茶看的懂什麼就學什麼,然後就寫下來備忘, 
沒辦法很有系統性的介紹。 
還需要大家多多指導。 |