文档介绍:©2010,,Nashville,:urate,pletenessofthisbook,,includingbutnotlimitedtoconsequential,incidental,special,orotherdamages."MetaTrader4,""MQL"and"expertadvisor"',includingupdates,newsandneweditions,pleasevisitourwebsiteat/.ISBN:978-0-9826459-0-oncepts7LayoutofanMQ4File14OrderPlacement20Bid,Ask&Spread20OrderTypes20TheOrderPlacementProcess21OrderSend()22CalculatingStopLoss&TakeProfit25RetrievingOrderInformation32ClosingOrders34ASimpleExpertAdvisor36AdvancedOrderPlacement42OrderModification42VerifyingStopsandPendingOrderPrices45CalculatingLotSize49OtherConsiderations52PuttingItAllTogether57WorkingwithFunctions64AddStopLossandTakeProfit73UsingIncludeFiles74UsingLibraries74ASimpleExpertAdvisor(withFunctions)ountLimitations124MessageBox()mentsAsanIdentifier131MarginCheck132SpreadCheck132MultipleOrders133GlobalVariables136CheckOrderProfit137Martingale138DebuggingYourExpertAdvisor141CustomIndicatorsandScripts146Buffers146CreatingACustomIndicator146Scripts152AppendixA154SimpleExpertAdvisor154SimpleExpertAdvisorwithPendingOrders156AppendixB160AdvancedExpertAdvisor160AdvancedExpertAdvisorwithPendingOrders166AppendixC172ExpertAdvisorwithFunctions172ExpertAdvisorwithFunctions–-the-clockhours,highleverageandlowmarginrequirements,),MetaTraderisofferedbyhundredsofforexbrokersworldwide,includingbignamessuchasGAINCapital,FXCM,AlpariandInterbankF