Skip to content

Instantly share code, notes, and snippets.

@white5168
Created September 25, 2016 15:57
Show Gist options
  • Save white5168/d706d1e5208867c6b57f3d3dd891c5fd to your computer and use it in GitHub Desktop.
Save white5168/d706d1e5208867c6b57f3d3dd891c5fd to your computer and use it in GitHub Desktop.
/**
* Nov 28 2015
* Copyright (C) 20015 iInfo.
* Author�GAmin.
* URL�Ghttp://white5168.blogspot.tw/
* @license
* This file is part of iInfo.
*/
SyntaxHighlighter.brushes.MC = function()
{
// Copyright 2015 Amin
var keywords = ' if then else begin end once and or switch case default for inputs ' +
' variables while var next this bar market Date date Time marketposition ' +
' buy Sell Sellshort buytocover at stop input close open low high Entryprice ' +
' exitprice barssinceentry True False Inputs vars Input var Vars Buy sellshort ' +
' plot1 plot2 plot3 plot4 plot5 plot6 plot7 plot8 Data2 Data3 Data4 Data5 Data6 Data7 ' +
' data2 data3 data4 data5 data6 data7 DefineDLLFunc Long lpstr void int InStr ' +
' GetSymbolName array Array RGB datetojulian computerdatetime StringToDate ' +
' JulianToDate round avglist GetAppInfo Spaces aiLeftDispDateTime currentbar ' +
' StrToNum StringSimple StringArrayRef ' +
/*指標使用*/
' i_marketposition ';
var functions =
' dayofmonth dayofweek ' +
' value1 value2 value3 value4 value5 Value1 Value2 Value3 Value4 Value5 ' +
/*色彩*/
' legacycolortorgb rgbtolegacycolor rgb getrvalue getgvalue getbvalue red green ' +
' gradientcolor ' +
/*指標畫線*/
' Plot default PlotPaintBar PlotPB NoPlot SetPlotWidth SetPlotColor ' +
' SetPlotBGColor getbackgroundcolor getplotwidth getplotcolor getplotbgcolor ' +
/* 趨勢線 */
' tl_new tl_setcolor tl_setextleft tl_setextright ' +
/*文字*/
' text_new text_new_s text_self text_new_self_s text_delete text_setlocation ' +
' text_setlocation_s text_setstring text_setcolor text_setbgcolor ' +
' text_setfontname text_setsize text_setstyle text_setborder text_setattribute ' +
' text_getactive text_getfirst text_getnext text_getdate text_gettime ' +
' text_gettime_s text_getvalue text_getstring text_getcolor text_getbgcolor ' +
' text_getfontname text_getsize text_gethstyle text_gethvstyle get_getborder ' +
' text_getattribute ' +
/*箭頭*/
' arw_new arw_new_s arw_new_self arw_new_self_s arw_delete arw_setlocation ' +
' arw_setlocation_s arw_setcolor arw_setsize arw_setstyle arw_settext '+
' arw_settextcolor arw_settextbgcolor arw_settextfontname arw_settextsize ' +
' arw_settextattribute arw_getactive arw_getfirst arw_getnext arw_getdate ' +
' arw_gettime arw_gettime_s arw_getval arw_getdirection arw_getcolor arw_getsize ' +
' arw_getstyle arw_gettextcolor arw_gettextbgcolor arw_gettextfontname ' +
/*警示*/
' alert alertenabled checkalert cancel alert PlaySound ' +
/*輸出*/
' messagelog print newline cleardebug FileAppend FileDelete abort raiseruntimeerror ' +
/*數字*/
' NumToStr Average iff ' +
/*其他*/
' lowest highest Highest Lowest ' +
/* ADE */
' MapSN.New MapSN.Put ADE.PutBarInfo MapSN.Get ADE.GetBarInfo ADE.BarInterval ADE.BarID ' +
/* 函數指標 */
' ADX ATR ' +
/* 陣列 */
' array_getmaxindex ';
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
{ regex: /^{#.}$/gm, css: 'preprocessor' },
{ regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions' },
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
];
};
SyntaxHighlighter.brushes.MC.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.MC.aliases = ['mc', 'pl'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment