List of functions

List of functions, block that can be used for strategy creation:

Price Data
Ask, BidSpread NEW

SpreadInPips
Open, High, Low, Close
Open Daily, High Daily, Low Daily, Close DailyHeiken Ashi Open, High, Low, Close
Indicators
Accellerator OscilatorAccumulation/Distribution
AlligatorAverage Directional Movement Index (ADX)
Average True Range (ATR)Awesome Oscilator
Bears PowerBollinger Band
Bulls PowerCommodity Channel Index (CCI)
DemarkerEnvelopes
Force IndexFractals
Gator OscillatorsIchimoku Kinko Hyo
MACDMarket Facilitation Index
MomentumMoney Flow Index
Moving AverageSimple Moving Average
Exponential Moving AverageTriple Exponential Moving Average
Moving Average of OscilatorOn Balance Volume
Parabolic SARRelative Strenght Index (RSI)
Relative Vigor IndexStandard Deviation
Stochastic OscilatorVolume
Williams % RangePrice Difference
Custom Indicators
Custom IndicatorHeiken Ashi
Highest, LowestHighest In Range, Lowest In Range NEW
Bar RangeBiggest Range, Smallest Range
Time Values
Hour, Minute, Day, Day of weekTime
TimeCurrent
Strategy Control
Market PositionOrder Position
Last OrderLast Order Today
Bars Since Order Open NEWBars Since Order Closed NEW
Pending Order ExistsOrder Opened This Bar
Order Opened This MinuteOrder Closed This Bar
Order Closed This MinuteOrders Opened Today
Open P/L (in pips)Closed P/L (in pips)
Sum of Closed P/L (in pips) NEWOpen P/L (in money) NEW
Closed P/L (in money) NEWSum of Closed P/L (in money)
Total Profits NEWTotal Losses NEW
Current Position SizeAccount Balance
Account Equity NEWOrder Opening Price
Order SLOrder PT
Symbol NEWOrder Symbol NEW
Functions
Addition, Subtraction, Multiplication, DivisionIndicator Angle
Indicator AverageMinimum, Maximum
ConvertToRealPipsConvertToPips
GetTimeIsBarOpen
Recent NEW
Other
NumberString NEW
Candle Pattern NEW
THEN Actions
Enter at Market/Limit/StopClose Position, Close All Positions
Close Position PartiallyMove PT/SL To
Do NothingAssign Variable
Send EmailSend Email Advanced NEW
Log To Journal, Log To File

Price Data

Contains all the standard price data values, such ask Ask, Bid, Open, High, Low, Close, Open Daily, etc.

Ask, Bidtop

Current Ask and Bid price

Spreadtop

Returns current spread in real pips – so if the spread is 3.5 pips, it will return value 0.00035, not 3.5

SpreadInPipstop

Returns current spread in pips – so if the spread is 3.5 pips, it will return number 3.5

Open, High, Low, Closetop

Open, High, Low and Close prices of given candle

Open Daily, High Daily, Low Daily, Close Dailytop

Daily Open, High, Low and Close prices of given day

Heiken Ashi Open, High, Low, Closetop

Heiken Ashi value for Open, High, Low and Close prices of given candle


Indicators

Contains all standard MetaTrader4 indicators, such ask Accelerator Oscillator, Accumulation/Distribution, etc.

Accellerator Oscilatortop

Accumulation/Distributiontop

Alligatortop

Average Directional Movement Index (ADX)top

Average True Range (ATR)top

Awesome Oscilatortop

Bears Powertop

Bollinger Bandtop

Bulls Powertop

Commodity Channel Index (CCI)top

Demarkertop

Envelopestop

Force Indextop

Fractalstop

Gator Oscillatorstop

Ichimoku Kinko Hyotop

MACDtop

Market Facilitation Indextop

Momentumtop

Money Flow Indextop

Moving Averagetop

Simple Moving Averagetop

Exponential Moving Averagetop

Triple Exponential Moving Averagetop

Moving Average of Oscilatortop

On Balance Volumetop

Parabolic SARtop

Relative Strenght Index (RSI)top

Relative Vigor Indextop

Standard Deviationtop

Stochastic Oscilatortop

Volumetop

Williams % Rangetop

Price Differencetop

Returns difference of two prices


Custom Indicators

Contains several build-in custom indicators and functions to get highest or lowest level, biggestor smallest range, etc.
It also contains all the new custom indicators that you defined or imported into EA Wizard.

Custom Indicatortop

Allows you to manually specify your custom indicator. It is however much simpler to use the build-in functionality of importing a custom indicator described here

Heiken Ashitop

Highest, Lowesttop

Returns highest high or lowest low of the period of bars

Highest In Range, Lowest In Rangetop

Returns highest high or lowest low of candles in given time range

Bar Rangetop

Size of bar – distance from high to low price, in real pips (value like 0.023 and not 23)

Biggest Range, Smallest Rangetop

Biggest or smallest bar range in given period of candles


Time Values

Returns time-related values

Hour, Minute, Day, Day of weektop

Return the obvious values

Timetop

Time of given candle as number (comparable with Functions->GetTime() function).
This is the time of current bar, it doesn’t contain seconds.

TimeCurrenttop

Current Time (including seconds) as number (comparable with Functions->GetTime() function).
This returns the time fo teh latest tick, it contains also seconds.


Strategy Control

Functions that give you information about opened or closed orders etc.

Market Positiontop

Returns current market position. If there are more positions open at the same time, it will return the first one.
Market position can be:
Flat – no position is open
Long – long position is open
Short – short position is open

Order Positiontop

Returns current market position for the order specified by Magic Number

Last Ordertop

Returns the type (long or short) of last active (not pending) order

Last Order Todaytop

Returns the type of last active (not pending) order today

Bars Since Order Opentop

Returns number of bars since the order was opened, for order with given Magic Number. If you’ll set Magic Number to 0, it will return number of bars since last opened order

Bars Since Order Closedtop

Returns number of bars since the order was closed, for order with given Magic Number. If you’ll set Magic Number to 0, it will return number of bars since last closed order

Pending Order Existstop

Returns true when pending (stop or limit) order with given Magic Number exists

Order Opened This Bartop

Returns true when the order given Magic Number closed at the current bar

Order Opened This Minutetop

Returns true when the order given Magic Number opened at the current minute

Order Closed This Bartop

Returns true when the order given Magic Number opened at the current bar

Order Closed This Minutetop

Returns true when the order given Magic Number closed at the current minute

Orders Opened Todaytop

Returns number of orders opened today

Open P/L (in pips)top

Returns open P/L for order with given Magic Number. If you’ll set Magic Number to 0, it will return sum of open P/L for all active orders.

Closed P/L (in pips)top

Returns last closed P/L for order with given Magic Number. It will return 0 if the order hasn’t closed yet. If Magic Number is 0, it will return closed P/L of last order.

Sum of Closed P/L (in pips)top

Returns total closed P/L in pips for the last X orders with given Magic Number. It will return 0 if the order hasn’t closed yet.
If Magic Number is 0, it will return total closed P/L of last orders.

Open P/L (in money)top

Returns open P/L for order with given Magic Number. If you’ll set Magic Number to 0, it will return sum of open P/L for all active orders.

Closed P/L (in money)top

Returns last closed P/L for order with given Magic Number. It will return 0 if the order hasn’t closed yet. If Magic Number is 0, it will return closed P/L of last order.

Sum of Closed P/L (in money)top

Returns total closed P/L in money for the last X orders with given Magic Number. It will return 0 if the order hasn’t closed yet.
If Magic Number is 0, it will return total closed P/L of last orders.

Total Profitstop

Returns number of profits in the last X trades specified by Magic Number.If Magic Number is 0, it will return number of profits of the last X orders

Total Lossestop

Returns number of losses in the last X trades specified by Magic Number.If Magic Number is 0, it will return number of losses of the last X orders

Current Position Sizetop

Returns current position size (lots) for order with given Magic Number. If you’ll set Magic Number to 0, it will return sum of position size for all active orders

Account Balancetop

Returns account balance in account currency

Account Equitytop

Returns account equity in account currency

Order Opening Pricetop

Returns opening price for order with given Magic Number

Order SLtop

Returns order Stop Loss level

Order PTtop

Returns order Profit Target level

Symboltop

Returns a text string with the name of the current financial instrument

Order Symboltop

Retuns symbol for order with given magic number


Functions

Contains build-in functions to manipulate with the values

Addition, Subtraction, Multiplication, Divisiontop

Performs the given operation of the two arguments: (Parameter1 + Parameter2) or (Parameter1 – Parameter2) or (Parameter1 * Parameter2) or (Parameter1 / Parameter2)

Indicator Angletop

A function to measure angle of indicator rise or decline. Be aware that its usability very much depends on correct setting of the Coefficient parameter!
The indicator angle that you see on the screen depends on the scale of the chart and timeframe, it is not possible to recognize this all by EA.
The good Coefficient value for all price indicators like EMA, Bollinger Bands, etc. is 0.00005 (0.005 for JPY-based pairs).
For indicators like CCI, the best value of Coefficient is around 25-50.

Indicator Averagetop

A function to compute average of any indicator. This function matches MT4 functionality of applying moving average to another indicator in the chart.

Minimum, Maximumtop

Returns minimum or maximum of the two values.

ConvertToRealPipstop

Converts value in pips into decimal value that can be used in the price functions. It automatically recognizes used currency and its number of digits.
For example value of 60 pips is converted to 0.0060 (for 4 and 5 digit currencies ike EURUSD, or to 0.60 for 2 and 3 digit currencies like USDJPY)

ConvertToPipstop

This is an oposite function to ConvertToRealPips(). It converts value from real pips (decimal number) to pips. It automatically recognizes used currency and its number of digits.
For example value of 0.0060 is converted to 60 pips.

GetTimetop

Returns time specified by Hour and Minute parameters as a number value, ready to be compared with TimeValue -> Time.
This way you can use time based conditions in your trading.
An example of condition could be GetTime(8, 30) = Time[1] – it will be true if the time at previous bar was 8:30.

IsBarOpentop

Returns true when the bar opened. This happens only once during the bar, so you can use this condition for strategies that should open the trade only once at bar open

Recenttop

Returns the most recent value of an indicator. This function can be used on indicators like ZigZag or swing indicators that output their values only every few candles.
With Recent() it will return the last indicator values in the given X candles back.


Other

Contains build-in functions to manipulate with the values

Numbertop

Use it to specify number in the condition.

Stringtop

Use it to specify string in the condition, for example for comparison with Symbol function

Candle Patterntop

Returns true if the specified candle pattern is formed on the chart at the given position.
Candle patterns supported: Doji, Hammer, Shooting Star, Dark Cloud, Piercing Line, Bearish Engulfing, Bullish Engulfing, Bearish Harami, Bullish Harami,
Bearish Harami Cross, Bullish Harami Cross


Variables

This category contains list of all the variables (Strategy Parameters) that you defined in Strategy tab.


THEN Actions

Enter at Market/Limit/Stoptop

Opens new trade at market, limit or stop price. You can configure a lot of parameters in your order, including Profit Target, Stop Loss, Trailing Stop, etc.
You must specify an unique Magic Number for every order. Magic Number can be anyrandom number, for exmaple 1, 2, 3, 100, 200, 11111, etc.

Close Position, Close All Positionstop

Closes order (specified by Magic Number) or closes all currently active orders at current market price.

Close Position Partiallytop

Partially closes order (specified by Magic Number), youcan specify how big portion of teh order should be closed.

Move PT/SL Totop

Move Stop Loss or Profit Target of specified order to a given new level. You can use this function to move SL or PTof an order depending on other conditions, like market volatility, trading signal, etc.

Do Nothingtop

Just a placeholder for empty action. It can be used for example for Signal Indicator.

Assign Variabletop

Assigns a new value to a given variable.

Send Emailtop

Sends notification email with specified Subject and Text.
Note! – it depends on MetaTrader email sending funcitonality, so you need to have correctly configured Email Options in MetaTrader (MT4: Tools -> Options -> Email Options).

Send Email Advancedtop

Sends notification email with specified Subject and Text.
Note! – it depends on MetaTrader email sending funcitonality, so you need to have correctly configured Email Options in MetaTrader (MT4: Tools -> Options -> Email Options).
The difference fron Send Email funtion is that here for the Subject and Test YOU HAVE TO add double quote ” to the beginning and end of string, for example “something to log”.
This enables you to concatenate strings and values, such as “Ask value: “+Ask

Log To Journal, Log To Filetop

Logs specified text into Strategy Tester Journal or specified file.
Note! – with this parameter you always have to use double quotes ” when specifying text. Unlike other functions in EA Wizard, this function doesn’t add double quotes to the beginning and end of text automatically.!
This enables you to concatenate text and EA variables, such as “Current Ask is: “+Ask


If you are missing some function, have any difficulty, or don’t know how to do something, don’t hesitate to Contact us.