AFL Editor.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:10k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    AFL Editor
  4. //  Author/Uploader: Geoff Mulhall 
  5. //  E-mail:          gmulhall@urban.net.au
  6. //  Date/Time Added: 2003-01-01 04:18:09
  7. //  Origin:          
  8. //  Keywords:        
  9. //  Level:           advanced
  10. //  Flags:           commentary
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=247
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=247
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  A excellent (free) programmers editor called ConTEXT is available from
  17. //
  18. //  http://www.fixedsys.com/context/
  19. //
  20. //  For a large AFL programming task this is very useful since ConTEXT can be
  21. //  made AFL sensitive by copying the attached file to c:program
  22. //  filescontexthighlighters.
  23. //
  24. //  Keywords, functions are then highlighted just as they are from within Ami
  25. //  but with the added advantage of having a fully functional editor at your
  26. //  disposal.
  27. //
  28. //------------------------------------------------------------------------------
  29. //////////////////////////////////////////////////////////////////////////////
  30. //
  31. // Amibroker Formula Language 
  32. //
  33. //////////////////////////////////////////////////////////////////////////////
  34. //////////////////////////////////////////////////////////////////////////////
  35. // language name
  36. Language:               AFL
  37. //////////////////////////////////////////////////////////////////////////////
  38. // default file filter
  39. // note: if more than one extension is associated, eg:
  40. // C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp
  41. Filter:                 AFL files (*.afl)|*.afl
  42. //////////////////////////////////////////////////////////////////////////////
  43. // help file which will be invokend when F1 is pressed
  44. HelpFile:
  45. //////////////////////////////////////////////////////////////////////////////
  46. // language case sensitivity
  47. //                      0  - no
  48. //                      1  - yes
  49. CaseSensitive:          0
  50. //////////////////////////////////////////////////////////////////////////////
  51. // comment type: LineComment - comment to the end of line
  52. // BlockCommentBeg - block comment begin, it could be
  53. // multiline
  54. // BlockCommentEnd - block comment end
  55. LineComment:            //
  56. BlockCommentBeg:        /*
  57. BlockCommentEnd:        */
  58. //////////////////////////////////////////////////////////////////////////////
  59. // identifier characters
  60. // note: characters shouldn't be delimited, except arrays
  61. // array of chars could be defined as from_char..to_char
  62. IdentifierBegChars:     a..z A..Z 
  63. IdentifierChars:        a..z A..Z _ 0..9 
  64. //////////////////////////////////////////////////////////////////////////////
  65. // numeric constants begin characters
  66. // note: characters shouldn't be delimited, except arrays
  67. // array of chars could be defined as from_char..to_char
  68. // number always starts with 0..9 except when NumConstBeg
  69. // defines other
  70. NumConstBegChars:       0..9 
  71. //////////////////////////////////////////////////////////////////////////////
  72. // numeric constants characters
  73. // note: characters shouldn't be delimited, except arrays
  74. // array of chars could be defined as from_char..to_char
  75. // number always starts with 0..9 except when NumConstBeg
  76. // defines other
  77. NumConstChars:          0..9 A..Z . -
  78. //////////////////////////////////////////////////////////////////////////////
  79. // escape character
  80. EscapeChar:
  81. //////////////////////////////////////////////////////////////////////////////
  82. // keyword table
  83. // note: delimited with spaces, lines could be wrapped
  84. // you may divide keywords into two groups which can be
  85. // highlighted differently
  86. // reserved words
  87. KeyWords1:
  88. open o
  89. close c
  90. high h
  91. low l
  92. volume v
  93. openint oi
  94. average a
  95. // functions
  96. KeyWords2:
  97. ACCDIST
  98. ADDCOLUMN
  99. ADLINE
  100. ADDTEXTCOLUMN
  101. ADDTOCOMPOSITE
  102. ADVISSUES
  103. ADVVOLUME
  104. ADX
  105. ALERTIF
  106. AMA
  107. AMA2
  108. APPLYSTOP
  109. ATAN
  110. ATR
  111. BARSSINCE
  112. BBANDBOT
  113. BBANDTOP
  114. CEIL
  115. CHAIKIN
  116. CCI
  117. CORRELATION
  118. COS
  119. CREATEOBJECT
  120. CREATESTATICOBJECT
  121. CROSS
  122. CUM
  123. DATE
  124. DATENUM
  125. DAY
  126. DAYOFWEEK
  127. DECISSUES
  128. DECVOLUME
  129. DEMA
  130. EMA
  131. ENABLESCRIPT
  132. ENABLETEXTOUTPUT
  133. ENCODECOLOR
  134. EQUITY
  135. EXP
  136. EXREM
  137. EXREMSPAN
  138. FLIP
  139. FLOOR
  140. FRAC
  141. FOREIGN
  142. FULLNAME
  143. GAPDOWN
  144. GAPUP
  145. GETBASEINDEX
  146. GETEXTRADATA
  147. GETSCRIPTOBJECT
  148. GROUPID
  149. HHV
  150. HHVBARS
  151. HIGHEST
  152. HIGHESTBARS
  153. HIGHESTSINCE
  154. HIGHESTSINCEBARS
  155. HOLD
  156. HOUR
  157. IIF
  158. INDUSTRYID
  159. INSIDE
  160. INT
  161. INTERVAL
  162. INWATCHLIST
  163. ISEMPTY
  164. ISTRUE
  165. LASTVALUE
  166. LINEARREG
  167. LINREGINTERCEPT
  168. LINREGSLOPE
  169. LLV
  170. LLVBARS
  171. LOG
  172. LOG10
  173. LOWEST
  174. LOWESTBARS
  175. LOWESTSINCE
  176. LOWESTSINCEBARS
  177. MA
  178. MACD
  179. MARKETID
  180. MAX
  181. MDI
  182. MIN
  183. MINUTE
  184. MFI
  185. MONTH
  186. NAME
  187. NVI
  188. OBV
  189. OPTIMIZE
  190. OSCP
  191. OSCV
  192. OUTSIDE
  193. PEAK
  194. PEAKBARS
  195. PDI
  196. PLOT
  197. PLOTFOREIGN
  198. PLOTOHLC
  199. PVI
  200. PREC
  201. PREFS
  202. RANDOM
  203. REF
  204. RELSTRENGTH
  205. RMI
  206. RSI
  207. RSIa
  208. ROC
  209. ROUND
  210. RWI
  211. RWIHI
  212. RWILO
  213. SAR
  214. SECOND
  215. SECTORID
  216. SELECTEDVALUE
  217. SETBARSREQUIRED
  218. SETTRADEDELAYS
  219. SIGNAL
  220. SIN
  221. SQRT
  222. STATUS
  223. STDERR
  224. STDEV
  225. STOCHD
  226. STOCHK
  227. STRLEFT
  228. STRLEN
  229. STRMID
  230. STRRIGHT
  231. STUDY
  232. SUM
  233. TEMA
  234. TIMENUM
  235. TRIN
  236. TRIX
  237. TROUGH
  238. TROUGHBARS
  239. TSF
  240. ULTIMATE
  241. UNCISSUES
  242. UNCVOLUME
  243. VALUEWHEN
  244. VERSION
  245. WILDERS
  246. WMA
  247. WRITEIF
  248. WRITEVAL
  249. YEAR
  250. ZIG
  251. //Reserved variable names
  252. KeyWords3:
  253. buy
  254. sell
  255. short
  256. cover
  257. buyprice
  258. sellprice
  259. shortprice
  260. coverprice
  261. title
  262. maxgraph
  263. graph0 graph1 graph2 graph3 graph4 graph5 graph6 graph7 graph8 graph9
  264. graph0name graph1name graph2name graph3name graph4name graph5name graph6name graph7name graph8name graph9name
  265. graph0color graph1color graph2color graph3color graph4color graph5color graph6color graph7color graph8color graph9color
  266. graph0barcolor graph1barcolor graph2barcolor graph3barcolor graph4barcolor graph5barcolor graph6barcolor graph7barcolor graph8barcolor graph9barcolor
  267. graph0style graph1style graph2style graph3style graph4style graph5style graph6style graph7style graph8style graph9style
  268. colorBlack
  269. colorBrown
  270. colorDarkOliveGreen
  271. colorDarkGreen
  272. colorDarkTeal
  273. colorDarkBlue
  274. colorIndigo
  275. colorDarkGrey
  276. colorDarkRed
  277. colorOrange
  278. colorDarkYellow
  279. colorGreen
  280. colorTeal
  281. colorBlue
  282. colorBlueGrey
  283. colorGrey
  284. colorRed
  285. colorLightOrange
  286. colorLime
  287. colorSeaGreen
  288. colorAqua
  289. colorLightBlue
  290. colorViolet
  291. colorGrey
  292. colorPink
  293. colorGold
  294. colorYellow
  295. colorBrightGreen
  296. colorTurquoise
  297. colorSkyblue
  298. colorPlum
  299. colorLightGrey
  300. colorRose
  301. colorTan
  302. colorLightYellow
  303. colorPaleGreen
  304. colorPaleTurquoise
  305. colorPaleBlue
  306. colorLavender
  307. colorWhite
  308. styleLine
  309. styleHistogram
  310. styleThick
  311. styleDots
  312. styleNoLine
  313. styleLog
  314. styleCandle
  315. styleBar
  316. styleNoDraw
  317. styleStaircase
  318. styleSwingDots
  319. styleNoRescale
  320. styleNoLabel
  321. stylePointAndFigure
  322. styleArea
  323. styleOwnScale
  324. styleLeftAxisScale
  325. graphxspace
  326. graphzorder
  327. roundlotsize
  328. ticksize
  329. pointvalue
  330. margindeposit
  331. positionsize
  332. numcolumns
  333. filter
  334. column0 column1 column2 column3 column4 column5 column6 column7 column8 column9
  335. column0format column1format column2format column3format column4format column5format column6format column7format column8format column9format
  336. column0name column1name column2name column3name column4name column5name column6name column7name column8name column9name
  337. //////////////////////////////////////////////////////////////////////////////
  338. // string delimiter: StringBegChar - string begin char
  339. // StringEndChar - string end char
  340. // MultilineStrings - enables multiline strings, as perl
  341. // has it
  342. StringBegChar:          "
  343. StringEndChar:          "
  344. MultilineStrings:       0
  345. //////////////////////////////////////////////////////////////////////////////
  346. // use preprocessor: 0 - no
  347. // 1 - yes
  348. // note: if yes, '#' and statements after it will be
  349. // highlighted with Preprocessor defined colors
  350. UsePreprocessor:        0
  351. //////////////////////////////////////////////////////////////////////////////
  352. // highlight line: 0 - no
  353. // 1 - yes
  354. // note: if yes, current line will be highlighted
  355. CurrLineHighlighted:    0
  356. //////////////////////////////////////////////////////////////////////////////
  357. // colors
  358. // note:                first value is foreground, second is background color
  359. //                        and third (optional) represents font attribute:
  360. //                        B - bold
  361. //                        I - italic
  362. //                        U - underline
  363. //                        S - strike out
  364. //                        attributes can be combined: eg. B or BI
  365. //                      as value, it could be used any standard windows color:
  366. //                        clBlack, clMaroon, clGreen, clOlive, clNavy,
  367. //                        clPurple, clTeal, clGray, clSilver, clRed, clLime,
  368. //                        clYellow, clBlue, clFuchsia, clAqua, clLtGray,
  369. //                        clDkGray, clWhite, clScrollBar, clBackground,
  370. //                        clActiveCaption, clInactiveCaption, clMenu, clWindow,
  371. //                        clWindowFrame, clMenuText, clWindowText, clCaptionText,
  372. //                        clActiveBorder, clInactiveBorder, clAppWorkSpace,
  373. //                        clHighlight, clHighlightText, clBtnFace, clBtnShadow,
  374. //                        clGrayText, clBtnText, clInactiveCaptionText,
  375. //                        clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText,
  376. //                        clInfoBk
  377. //                      as value, it could be used hex numeric constant too:
  378. //                        $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00
  379. SpaceCol:               clWindowText clWindow
  380. Keyword1Col:            clBlack clWindow B
  381. Keyword2Col:            clBlue clWindow
  382. Keyword3Col:            clNavy clWindow B
  383. IdentifierCol:          clWindowText clWindow
  384. CommentCol:             clGreen clWindow
  385. NumberCol:              clRed clWindow
  386. StringCol:              clFuchsia clWindow
  387. SymbolCol:              clGray clWindow
  388. PreprocessorCol:        clBlue clWindow
  389. SelectionCol:           clWhite clNavy
  390. CurrentLineCol:         clBlack clYellow