Saturday, January 31, 2009

Documentation MQL II

4. Reserved words
In the MetaQuotes Language II, there are several groups of reserved words.

1. Logic and the relative operations (logical and relational operations).
AND, NOT, OR.
crosses over, crosses above, crosses under, crosses below.

2. Teams language MQL II (commands).
Array, Begin, Break, Case, Continue, Default, Define, Downto, Else, End, Exit, For, If, Input, Otherwise, Switch, Then, To, Variable, While.
Reserved words, defining a command of language, also called keywords (keywords).

3. Built-in functions (built-in functions).
Abs, AccName, AccountName, Alert, ArcCos, ArcSin, ArcTan, Ceil, CloseOrder, Comment, Cos, CurTime, Day, DayOfWeek, DelArrow, DeleteOrder, DelGlobalVariable, DelObject, Exp, FileClose, FileDelete, FileOpen, FileReadNumber, FileReadString, FileSeek, FileSize, FileTell, FileWrite, Floor, GetGlobalVariable, GetIndexValue, GetIndexValue2, GetTickCount, Highest, Hour, iAC, iAD, iADX, iADXEx, iAlligator, iAO, iATR, iBands, iBandsEx, iBearsPower, iBullsPower, iBWMFI, iCCI, iCCIEx, iCustom, iDeMarker, iEnvelopes, iForce, iFractals, iGator, iIchimoku, iMA, iMAEx, iMACD, iMACDEx, iMFI, iMom, iMomEx, iOBV, iOsMA, iRSI, iRSIEx, iRVI, iSAR, iSTO, iWPR, IsDemo, IsFileEnded, IsFileLineEnded, IsGlobalVariable, IsIndirect, IsTesting, IsTradeAllowed, LastTradeTime, Log, Lowest, MarketInfo, Max, Min, Minute, Mod, ModifyOrder, Month, MoveObject, Normalize, NumberToStr, Ord, OrderValue, Period, Pow, Print, PrintTrade, Return, Rand, Round, Seconds, ServerAddress, SetArrow, SetDebugMode, SetGlobalVariable, SetIndexValue, SetIndexValue2, SetLoopCount, SetObjectText, SetOrder, SetText, Sin, Sqrt, Srand, StrToTime, Symbol, Tan, TimeDay, TimeDayOfWeek, TimeHour, TimeMinute, TimeMonth, TimeSeconds, TimeToStr, TimeToStrEx, TimeYear, UserFunction, Year.

4. Predefined user variables (user defined variables).
Lots, StopLoss, TakeProfit, TrailingStop.

5. Predefined variables Trade Terminal (predefined variables).
AccNum, AccountNumber, Ask, Balance, Bars, Bid, Close, Credit, Equity, FreeMargin, High, Low, Margin, Open, Point, PriceAsk, PriceBid, PriceHigh, PriceLow, PriceTime, Time, TotalProfit, TotalTrades, Volume.

6. Predefined settings built-in functions (macros).
MODE_CLOSE, MODE_DETAILS, MODE_EMA, MODE_FILE, MODE_FIRST, MODE_GATORJAW, MODE_GATORLIPS, MODE_GATORTEETH, MODE_HIGH, MODE_KIJUNSEN, MODE_LWMA, MODE_LOW, MODE_LOWER, MODE_MAIN, MODE_MINUSDI, MODE_OPEN, MODE_PLUSDI, MODE_SECOND, MODE_SENKOUSPAN, MODE_SENKOUSPANA, MODE_SENKOUSPANB, MODE_SIGNAL, MODE_SMA, MODE_SMMA, MODE_STOPLOSS, MODE_TAKEPROFIT, MODE_TENKANSEN, MODE_TIME, MODE_UPPER, MODE_VALUES, MODE_VOLUME, OBJ_FIBO, OBJ_HLINE, OBJ_SYMBOL, OBJ_TEXT, OBJ_TRENDLINE, OBJ_VLINE, OP_BUY, OP_BUYLIMIT, OP_BUYSTOP, OP_SELL, OP_SELLLIMIT, OP_SELLSTOP, PRICE_CLOSE, PRICE_HIGH, PRICE_LOW, PRICE_MEDIAN, PRICE_OPEN, PRICE_TYPICAL, PRICE_WEIGHTED, SEEK_CUR, SEEK_END, SEEK_SET, STYLE_SOLID, STYLE_DASH, STYLE_DOT, STYLE_DASHDOT, STYLE_DASHDOTDOT, SYMBOL_ARROWDOWN, SYMBOL_ARROWUP, SYMBOL_CHECKSIGN, SYMBOL_STOPSIGN, SYMBOL_THUMBSDOWN, SYMBOL_THUMBSUP, TIME_DATE, TIME_MINUTES, TIME_SECONDS, VAL_CLOSEPRICE, VAL_CLOSETIME, VAL_COMMENT, VAL_COMMISSION, VAL_LOTS, AL_OPENPRICE, VAL_OPENTIME, VAL_PROFIT, VAL_STOPLOSS, VAL_SWAP, VAL_SYMBOL, VAL_TAKEPROFIT, VAL_TICKET, VAL_TYPE.
In fact, these words are reserved macros, that is, the parser substitutes instead of the word values. Macros have been introduced for the convenience of the user while writing call options. And instead of numerical values for certain functions can be more convenient and mnemonichnye predefined words. The same goes for the names of colors.

7. Colors (colors).
AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenrod, DarkGray, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, DimGray, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, Goldenrod, Gray, Green, GreenYellow, Honeydew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenrod, LightGreen, LightGrey, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSteelBlue, LightYellow, Lime, LimeGreen, Linen, Magenta, Maroon, MediumAquamarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenrod, PaleGreen, PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, Red, RosyBrown, RoyalBlue, SaddleBrown, Salmon, SandyBrown, SeaGreen, Seashell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen.
All reserved words are case insensitive, ie, can be written as a small or big letters.

4.1. Predefined custom variables
It is often necessary to change a written expert some parameters affecting his work. In order not to every time to correct code expert, manually editing the important variables, like the MetaQuotes system was delivered to the table of properties (in the editor MetaEditor menu Files - Properties ... - bookmark Processing) expert 4 parameters:
Lots - the number of lots
StopLoss - level stoplossa in paragraphs
TakeProfit - level teykprofita in paragraphs
TrailingStop - standard trailing stop in paragraphs
The initial values of these variables can be entered via the spreadsheet program features expert. Either of these values can be changed in a special dialog box settings (settings tab), caused by pressing F7, or through the menu Charts - Expert Advisors - Properties. Because of these variables can not be changed.


To be continued.
By company
MetaQuotes Software Corp.
www.metaquotes.ru

No comments: