MQL4 Book  Appendixes   List of Programs

List of Programs

Expert Advisors:

Name Description with the link to the section
create.mq4 Example of a commented programming code
simple.mq4 Example of a simple EA, execution of special functions
possible.mq4 Example of a correct program structure
incorrect.mq4 Example of an incorrect program structure
userfunction.mq4 Simple example of a user-defined function applicaton
onelevel.mq4 Example of if-else operator application
twolevel.mq4 Example of if-else operator application
twoleveloptim.mq4 Example of if-else operator application
compoundcondition.mq4 Example of if-else operator application
pricealert.mq4 Example of switch operator application
predefined.mq4 Updating a value of a predefined variable
countticks.mq4 Example of global variable application (tick counter)
staticvar.mq4 Example of static variable application (tick counter)
externvar.mq4 Example of external programs application
globalvar.mq4 Example of GlobalVariable application
stringarray.mq4 Example of string array application
extremumprice.mq4 Usage of values of time-series array elements
newbar.mq4 Detecting the fact of a new bar appearance (time-series array)
modifystoploss.mq4 StopLoss market orders modification
callindicator.mq4 Calling a technical indicator function from an EA
historybars.mq4 Calling iMA() technical indicator function from an EA
callstohastic.mq4 Calling iStochastic() technical indicator function from an EA
tradingexpert.mq4 Simple EA. Structure, strategy, algorithm.
shared.mq4 EA that calculates trading criteria on the basis of a custom indicator.
comment.mq4 Displaying a text in the upper left corner of a security window
dialogue.mq4 EA supporting a dialog with a user
grafobjects.mq4 EA that uses OBJ_LABEL graphical object
moveobjects.mq4 EA that manages the position of a graphical objects
charts.mq4 EA that manages graphical objects in subwindows of a security window
strings.mq4 EA that manages graphical objects for candlestick coloring
timebars.mq4 EA that displays a tick coming time and bar opening time
bigbars.mq4 EA for searching a bar that is not lower than a specified height
timeevents.mq4 EA that performs some action at a specified time
createfile.mq4 EA for creating news timetable file
matrix.mq4 EA for matrix transpose
сheck.mq4 Rights limitation when using programs that are distributed on a commercial basis
usualexpert.mq4 Usual EA that uses include files

Scripts:

Name Description with the link to the section
pifagor.mq4 Example of a program without any user-defined function
gipo.mq4 Example of user-defined function application
fibonacci.mq4 Example of while cycle operator application
sumtotal.mq4 Example of for cycle operator application
rectangle.mq4 Example of break operator application
area.mq4 Example of break operator application
sheep.mq4 Example of continue operator application
othersheep.mq4 Example of continue operator application
barnumber.mq4 Example of switch operator application
callfunction.mq4 Example of user-defined function application
countiter.mq4 Intertick cycles counter
arrayalert.mq4 Example of arrays initialization
simpleopen.mq4 Simple script for opening order
confined.mq4 Script with simple error analysis
improved.mq4 Script can work in any security window
mistaken.mq4 Script with the incorrect open price
conditions.mq4 Script for defining an order price
openbuy.mq4 Script for opening the market order Buy
openbuystop.mq4 Script for opening BuyStop pending order
closeorder.mq4 Script for closing one of the market orders
deleteorder.mq4 Script for deleting one of the pending orders
closeby.mq4 Script for closing of opposite orders
modifyorderprice.mq4 Script for modifying pending order
timetablenews.mq4 Script for reading data from a file and displaying graphical objects
deleteall.mq4 Script that deletes all global variables of the client terminal

Indicators:

Name
Description with the link to the section
userindicator.mq4 Simple custom indicator (High and Low lines)
averagevalue.mq4 Simple custom indicator (High and Low averaging)
separatewindow.mq4 Custom indicator in a separate window
displacement.mq4 Vertical and horizontal shifting of custom indicator lines
roc.mq4 Custom indicator ROC
rocseparate.mq4 Custom indicator ROC in a separate window
indicatorstyle.mq4 Indicator showing the High line
linelevel.mq4 Indicator showing the difference between high and low
Inform.mq4 Indicator that creates an empty subwindow in a security window

Include Files:

Name Description with the link to the section
Variables.mqh Include file that contains global variables declaration
Check.mqh Function that limits usage rights
Terminal.mqh Order accounting function
Inform.mqh Function for displaying a message in a subwindow created by the Inform.mq4 indicator
Events.mqh Events tracing function
Lot.mqh Function for defining the amount of lots
Criterion.mqh Function for trade criterion defining
Trade.mqh Controlling trade function
Close_All.mqh Function for closing all market orders of a specified type
Open_Ord.mqh Function for opening one market oder of a specified type
Tral_Stop.mqh Function for modifying all market orders of a specified type
Errors.mqh Function for error processing