Is there an xml file available for using Notepad++ for coding with AFL?
@burger if you search Google you'll find it for the previous version of AmiBroker (I got a version that included functions up to version 6.0), and need some tweaking to work correctly, but IMHO today the AFL editor is more than adequate with code folding, syntax highlighting, autocomplete and parameters info (that I find very useful )
I agree with @beppe regarding the quality of the AFL Editor built into AmiBroker. Two reasons that I still use Notepad++ on occasion are:
- NP++ has a File Compare plug-in which makes it easy to see what's changed between two versions of an AFL file
- Ability to create a file association between AFL and NP++ so that when I double-click an AFL file in Windows Explorer, open it from email, etc. I can see the file in an editor without first opening AB, going to the AFL editor, and then finding the file through the Open File dialog.
Thank you for the replies beppe & mradtke.
I thought there was one out there at one time.
plus Code Snippets that are user-extensible and the debugger.
Would be nice to drag an drop files into the formula editor from explorer.
Also would be nice if the formula editor could be registered as default editor for .afl extensions, so a double click from explorer would bring it up.
I just came across this and found the solution in the memberszone: http://www.amibroker.com/members/library/detail.php?id=1414
I got it working with my Notepad++ v7.8.6 (64-bit) version.
Maybe it helps someone else in the future.
Updated NPP AFL Highlighter
All Normal functions in Blue
Matrix Functions in Purple
Gfx and GUI Function in Pink
Comments Light Yellow Background
Keywords are in Green
Controlling structures like if, while case function etc are in Red
I have tried to cover most of the functions key words, let me know if any thing is left.
<NotepadPlus>
<UserLang name="AFL" ext="afl" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02((EOL)) 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2">/*</Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2">*/</Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">! % &amp; " " ( ) , . : ; ? { } [ ] ^ | + - &lt; = &gt; != ! = > < >= <= == ++ -- = * / *= /= %= += -= &= |=</Keywords>
<Keywords name="Operators2">!= ! = > < >= <= == ++ -- = * / *= /= %= += -= &= |=</Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">AND False NOT Null OR True Avg BarCount Buy
BuyPrice C Close Column0 Column0Format Column0Name Column1 Column1Format
Column1Name Column2 Column2Format Column2Name Column3 Column3Format Column3Name
Column4 Column4Format Column4Name Column5 Column5Format Column5Name Column6
Column6Format Column6Name Column7 Column7Format Column7Name Column8
Column8Format Column8Name Column9 Column9Format Column9Name Cover CoverPrice
Exclude Filter Graph0 Graph0BarColor Graph0Color Graph0High Graph0Low Graph0Name
Graph0Open Graph0Style Graph1 Graph1BarColor Graph1Color Graph1High Graph1Low
Graph1Name Graph1Open Graph1Style Graph2 Graph2BarColor Graph2Color Graph2High
Graph2Low Graph2Name Graph2Open Graph2Style Graph3 Graph3BarColor Graph3Color
Graph3High Graph3Low Graph3Name Graph3Open Graph3Style Graph4 Graph4BarColor
Graph4Color Graph4High Graph4Low Graph4Name Graph4Open Graph4Style Graph5
Graph5BarColor Graph5Color Graph5High Graph5Low Graph5Name Graph5Open
Graph5Style Graph6 Graph6BarColor Graph6Color Graph6High Graph6Low Graph6Name
Graph6Open Graph6Style Graph7 Graph7BarColor Graph7Color Graph7High Graph7Low
Graph7Name Graph7Open Graph7Style Graph8 Graph8BarColor Graph8Color Graph8High
Graph8Low Graph8Name Graph8Open Graph8Style Graph9 Graph9BarColor Graph9Color
Graph9High Graph9Low Graph9Name Graph9Open Graph9Style GraphXSpace GraphZOrder H
High L Low MarginDeposit MaxGraph NumColumns O OI Open OpenInt PointValue
PositionScore PositionSize RoundLotSize Sell SellPrice Short ShortPrice TickSize
Title V Volume actionBacktest actionCommentary actionExplore actionIndicator
actionOptimize actionPortfolio actionScan chartShowArrows chartShowDates
colorAqua colorBlack colorBlue colorBlueGrey colorBrightGreen colorBrown
colorCustom1 colorCustom10 colorCustom11 colorCustom12 colorCustom13
colorCustom14 colorCustom15 colorCustom16 colorCustom2 colorCustom3 colorCustom4
colorCustom5 colorCustom6 colorCustom7 colorCustom8 colorCycle colorDarkBlue
colorDarkGreen colorDarkGrey colorDarkOliveGreen colorDarkRed colorDarkTeal
colorDarkYellow colorDefault colorGold colorGreen colorGrey40 colorGrey50
colorIndigo colorLavender colorLightBlue colorLightGrey colorLightOrange
colorLightYellow colorLime colorOrange colorPaleBlue colorPaleGreen
colorPaleTurquoise colorPink colorPlum colorRed colorRose colorSeaGreen
colorSkyblue colorTan colorTeal colorTurquoise colorViolet colorWhite
colorYellow compressHigh compressLast compressLow compressOpen compressVolume
expandFirst expandLast expandPoint in15Minute in1Minute in5Minute inDaily
inHourly inMonthly inWeekly maskHistogramscoreNoRotate shapeCircle shapeDigit0
shapeDigit1 shapeDigit2 shapeDigit3 shapeDigit4 shapeDigit5 shapeDigit6
shapeDigit7 shapeDigit8 shapeDigit9 shapeDownArrow shapeDownTriangle
shapeHollowCircle shapeHollowDownArrow shapeHollowDownTriangle
shapeHollowSmallCircle shapeHollowSmallDownTriangle shapeHollowSmallSquare
shapeHollowSmallUpTriangle shapeHollowSquare shapeHollowStar shapeHollowUpArrow
shapeHollowUpTriangle shapeNone shapePositionAbove shapeSmallCircle
shapeSmallDownTriangle shapeSmallSquare shapeSmallUpTriangle shapeSquare
shapeStar shapeUpArrow shapeUpTriangle styleArea styleBar styleCandle styleDots
styleHistogram styleLeftAxisScale styleLine styleNoDraw styleNoLabel styleNoLine
styleNoRescale styleNoTitle styleOwnScale stylePointAndFigure styleStaircase
styleSwingDots styleThick </Keywords>
<Keywords name="Keywords2">abs AccDist acos AddColumn AddMultiTextColumn AddRankColumn AddRow AddSummaryRows
AddTextColumn
AddToComposite
ADLine
AdvIssues
AdvVolume
ADX
AlertIf
AlmostEqual
AMA
AMA2
ApplyStop
Asc
asin
atan
atan2
ATR
BarIndex
BarsSince
BarsSinceCompare
BBandBot
BBandTop
BeginValue
CategoryAddSymbol
CategoryCreate
CategoryFind
CategoryGetName
CategoryGetSymbols
CategoryRemoveSymbol
CategorySetName
CCI
ceil
Chaikin
Chr
ClipboardGet
ClipboardSet
ColorBlend
ColorHSB
ColorRGB
Correlation
cos
cosh
CreateObject
CreateStaticObject
Cross
Cum
CumProd
Date
DateNum
DateTime
DateTimeAdd
DateTimeConvert
DateTimeDiff
DateTimeFormat
DateTimeToStr
Day
DayOfWeek
DayOfYear
DaysSince1900
DecIssues
DecVolume
DEMA
EMA
EnableRotationalTrading
EnableScript
EnableTextOutput
EncodeColor
EndValue
Equity
erf
Error
EXP
ExRem
ExRemSpan
fclose
fdelete
fdir
feof
FFT
fgetcwd
fgets
fgetstatus
FindIndex
FIR
FirstVisibleValue
Flip
floor
fmkdir
fopen
Foreign
fputs
frac
frmdir
FullName
GapDown
GapUp
GetAsyncKeyState
GetBacktesterObject
GetBaseIndex
GetCategorySymbols
GetChartBkColor
GetChartID
GetCursorMouseButtons
GetCursorXPosition
GetCursorYPosition
GetDatabaseName
GetExtraData
GetExtraDataForeign
GetFnData
GetFnDataForeign
GetFormulaPath
GetLastOSError
GetObject
GetOption
GetPerformanceCounter
GetPlaybackDateTime
GetPriceStyle
GetRTData
GetRTDataForeign
GetScriptObject
GetTradingInterface
GicsID
GroupID
HHV
HHVBars
Highest
HighestBars
HighestSince
HighestSinceBars
HighestVisibleValue
HMA
Hold
Hour
IcbID
IIf
IIR
IndustryID
InGICS
InICB
Inside
Int
InternetClose
InternetGetStatusCode
InternetOpenURL
InternetPostRequest
InternetReadString
InternetSetAgent
InternetSetHeaders
InternetSetOption
Interval
inverf
InWatchList
InWatchListName
IsContinuous
IsEmpty
IsFavorite
IsFinite
IsIndex
IsNan
IsNull
IsTrue
Kurtosis
LastValue
LastVisibleValue
LineArray
LinearReg
LinRegIntercept
LinRegSlope
LLV
LLVBars
log
log10
Lookup
Lowest
LowestBars
LowestSince
LowestSinceBars
LowestVisibleValue
MA
MACD
MarketID
Max
MDI
Median
MFI
MicroSec
MilliSec
Min
Minute
Month
mtRandom
mtRandomA
Name
NormDist
NoteGet
NoteSet
Now
NullCount
NumToStr
NVI
Nz
OBV
Optimize
OptimizerSetEngine
OptimizerSetOption
OscP
OscV
Outside
Param
ParamColor
ParamDate
ParamField
ParamList
ParamStr
ParamStyle
ParamTime
ParamToggle
ParamTrigger
PDI
Peak
PeakBars
Percentile
PercentRank
PlaySound
Plot
PlotForeign
PlotGrid
PlotOHLC
PlotShapes
PlotText
PlotTextSetFont
PlotVAPOverlay
PlotVAPOverlayA
PopupWindow
Prec
Prefs
printf
Prod
ProdSince
PVI
Random
Ref
RelStrength
Remap
RequestMouseMoveRefresh
RequestTimedRefresh
RestorePriceArrays
Reverse
RMI
ROC
Round
RSI
RWI
RWIHi
RWILo
SafeDivide
SAR
Say
Second
SectorID
SelectedValue
SendEmail
SetBacktestMode
SetBarFillColor
SetBarsRequired
SetChartBkColor
SetChartBkGradientFill
SetChartOptions
SetCustomBacktestProc
SetForeign
SetFormulaName
SetGradientFill
SetOption
SetPositionSize
SetSortColumns
SetStopPrecedence
SetTradeDelays
ShellExecute
sign
Signal
sin
sinh
Skewness
Sort
SparseCompress
SparseExpand
sqrt
StaticVarAdd
StaticVarCompareExchange
StaticVarCount
StaticVarGenerateRanks
StaticVarGet
StaticVarGetRankedSymbols
StaticVarGetText
StaticVarInfo
StaticVarRemove
StaticVarSet
StaticVarSetText
Status
StdErr
StDev
StochD
StochK
StrCount
StrExtract
StrFind
StrFormat
StrLeft
StrLen
StrMatch
StrMid
StrReplace
StrRight
StrSort
StrToDateTime
StrToLower
StrToNum
StrToUpper
StrTrim
Study
Sum
SumSince
tan
tanh
TEMA
ThreadSleep
TimeFrameCompress
TimeFrameExpand
TimeFrameGetPrice
TimeFrameMode
TimeFrameRestore
TimeFrameSet
TimeNum
Trin
TRIX
Trough
TroughBars
TSF
Ultimate
UncIssues
UncVolume
ValueWhen
VarGet
VarGetText
VarSet
VarSetText
Version
VoiceCount
VoiceSelect
VoiceSetRate
VoiceSetVolume
VoiceWaitUntilDone
Wilders
WMA
WriteIf
WriteVal
XYChartAddPoint
XYChartSetAxis
Year
ZIG
</Keywords>
<Keywords name="Keywords3">#include #include_once #pragma do else for
function global if local procedure return while
static local global continue 
default case break switch typeof</Keywords>
<Keywords name="Keywords4">_DEFAULT_NAME
_DT
_exit
_N
_PARAM_VALUES
_SECTION_BEGIN
_SECTION_END
_SECTION_NAME
_TRACE
_TRACEF
</Keywords>
<Keywords name="Keywords5">GfxMoveTo GfxLineTo GfxSetPixel GfxTextOut GfxSelectPen GfxSelectSolidBrush GfxSelectFont GfxRectangle GfxRoundRect GfxPie GfxEllipse GfxCircle GfxChord GfxArc GfxPolygon GfxPolyline GfxSetTextColor GfxSetTextAlign GfxSetBkColor GfxSetBkMode GfxGradientRect GfxDrawText GfxSetOverlayMode GfxSetCoordsMode GfxSetZOrder GfxGetTextWidth GuiButton GuiCheckBox GuiDateTime GuiEdit GuiEnable 
GuiGetCheck GuiGetEvent GuiGetText GuiGetValue 
GuiRadio GuiSendKeyEvents GuiSetCheck 
GuiSetColors 
GuiSetFont 
GuiSetRange 
GuiSetText 
GuiSetValue 
GuiSetVisible 
GuiSlider GuiToggle</Keywords>
<Keywords name="Keywords6">MxCopy MxDet MxFromString MxGetBlock MxGetSize MxIdentity MxInverse MxSetBlock 
MxSolve MxSort MxSortRows MxSum MxToString
MxTranspose Matrix PriceVolDistribution</Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFB7" fontName="@Malgun Gothic" fontStyle="1" fontSize="10" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="804000" bgColor="FFFFB7" fontName="@Arial Unicode MS" fontStyle="1" fontSize="10" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="004000" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="008040" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="11" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="0" fontSize="11" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="FF0000" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="11" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="004000" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="FF00FF" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="0" fontSize="11" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="800000" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="800080" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="11" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="008040" bgColor="FFFFFF" fontName="@Arial Unicode MS" fontStyle="1" fontSize="12" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
I have made AFL Syntax highlighter for Notepad++
BUT.... STILL ....
The default AFL Editor of Amibroker takes care of all.