EAsiScript is a powerful and versatile scripting language integrated into EAsiTrader, designed to empower traders with unparalleled flexibility in creating, testing, and executing trading strategies. Whether you’re trading across single or multiple markets and timeframes, EAsiScript provides the tools needed to tailor your approach to suit any market condition.
With built-in support for AI-assisted script generation, traders can leverage artificial intelligence to help develop and optimise their strategies while maintaining full control over implementation and testing.
The 7 ‘long’ scripts and 7 ‘short’ scripts are used to open and close trades and control the SL, TP and Breakeven values for buy and sell trades. The trade’s lot size is dynamically calculated in accordance with the trader’s risk management settings and the broker’s margin requirement and lot size limits.
7 scripts for long trades, with their corresponding preset file setting name:
7 scripts for short trades, with their corresponding preset file setting name:
See EAsiTrader GUI->Settings Tab in the EAsiTrader Manual for a list of all settings that work in conjunction with the scripts.
By default, all scripts use the following settings, unless overridden by the user, or overridden by a script, e.g. the Initial SL, Lots, TP and BE scripts:
(setting name: InpTradeTool_ScriptLongEntry)
(setting name: InpTradeTool_ScriptShortEntry)
These scripts are run to determine if a new position should be opened. Use the Long Entry script to open a new long Market, Stop or Limit order position and use the Short Entry script to open a new short Market, Stop or Limit order position.
These scripts are run either every bar or every tick according to the Settings -> Auto Trade -> Refresh Mode setting. Every Bar is the default and recommended setting for most strategies. Every Tick consumes more compute time and could affect performance, especially when trading multiple markets.
A Buy Market order is opened if the result of the Long Entry script is equal to the current ask price and a Sell Market order is opened if the result of the Short Entry script is equal to the current bid price.
A Buy Stop order is opened if the result of the Long Entry script is greater than the current ask price and a Sell Stop order is opened if the result of the Short Entry script is less than the current bid price.
A Buy Limit order is opened if the result of the Long Entry script is less than the current ask price and a Sell Limit order is opened if the result of the Short Entry script is greater than the current bid price.
If the result of the entry script is zero then no action is taken.
If the Long Entry and the Short Entry scripts both return a positive result on the same tick and they are both Market order trades then no action is taken.
If the Long Entry and the Short Entry scripts both return a positive result on the same tick and they are both pending orders (i.e. stop or limit orders) then they are treated as OCO (one cancels the other) orders. The first of the two orders that is filled will automatically cancel the other.
(setting name: InpTradeTool_ScriptLongInitialStop)
(setting name: InpTradeTool_ScriptShortInitialStop)
These scripts are run once, immediately after the Entry Script has run and before the position has been opened, and are used to determine the initial stop loss (SL) value used for the new position. Use the Long Initial script to set the initial stop loss of a long position opened with the Long Entry script or use the Short Initial SL script to set the initial stop loss of a short position opened with the Short Entry script.
The Initial SL scripts are run once immediately after the Entry Script initiates a new trade, i.e. when the script returns a non-zero value.
If the script is not defined then the position’s SL is calculated by running the Long Trailing SL script for long positions or the Short Trailing SL script for short positions. If this script is not defined then the position’s SL is calculated using the Settings -> Stops ->SL setting.
If the result of the Long Initial SL script is less than the entry price returned by the Long Entry script or the result of the Short Initial SL script is greater than the entry price returned by the Short Entry script then the result is used as the SL for the new position.
If the result of the Long Initial SL script is zero or greater than or equal to the entry price returned by the Long Entry script or the result of the Short Initial SL script is less than or equal to the entry price returned by the Short Entry script then no action is taken.
(setting name: InpTradeTool_ScriptLongTrailingStop)
(setting name: InpTradeTool_ScriptShortTrailingStop)
These scripts are run after a position has been opened and used to determine a new value for the stop loss (SL). These scripts can also be run immediately after an entry script if the Initial SL script is not defined. Use the Long Trailing SL script to set or update the SL of a long position opened with the Long Entry script or use the Short Trailing SL script to set or update the SL of a short position opened with the Short Entry script.
**These scripts are run every tick on a new high for long positions and on a new low for short positions, whilst the position is open, regardless of the Settings -> Auto Trade -> Refresh Mode setting. These scripts are also run immediately after an entry script if the Initial SL script is not defined **
If the result of the Long Trailing SL script is less than the current bid price for long positions or the result of the Short Trailing SL is greater than the current ask price for short positions AND the difference between the old and new SL is greater than or equal to the Settings -> Stops -> Min Stop Move setting, then the position’s SL price is updated.
If the result of the Long Trailing SL script is zero or greater than or equal to the current bid price for long positions or the result of the Short Trailing SL script is zero or less than or equal to the current ask price for the short positions OR the difference between the current SL and new SL is less than the Settings -> Stops -> Min Stop Move setting, then the position’s SL is not changed.
(setting name: InpTradeTool_ScriptLongLots)
(setting name: InpTradeTool_ScriptShortLots)
These scripts are run once, immediately after the Initial SL Script and Trailing SL Script has run, if defined, and before the TP Scripts and are used to determine the position size for the trade in lots. Use the Long Lots script to set the lots size of a long position opened with the Long Entry script and use the Short Lots script to set the lots size of a short position opened with the Short Entry script.
**This script is run once immediately after the Initial SL script and the Trailing SL Script, if defined. If the script is not defined, or the script returns zero, the lot size is calculated in accordance with the trader’s risk management settings and the broker’s margin requirement and lot size limits. **
(setting name: InpTradeTool_ScriptLongTakeProfit)
(setting name: InpTradeTool_ScriptShortTakeProfit)
These scripts are run once, immediately after the Entry Script has run and before the position has been opened, and are used to determine the take profit (TP) value for the position. Use the Long TP script to set the TP of a long position opened with the Long Entry script and use the Short TP script to set the TP of a short position opened with the Short Entry script.
This script is run once immediately after the Entry script. If the script is not defined and the Settings -> Stops -> TP setting is enabled then the position’s TP value is calculated using the Settings -> Stops -> TP setting. If this setting is not enabled then no TP is used.
If the result of the Long TP script is greater than or equal to the entry price returned by the Long Entry script for long positions or if the result of the Short TP script is less than or equal to the entry price returned by the Short Entry script for short positions then the result is used as the TP when the position is opened.
If the result of the Long TP script is less than the current bid price for long positions opened with the Long Entry script or if the result of the Short TP script is greater than the ask price for short positions opened with the Short Entry script then no action is taken.
(setting name: InpTradeTool_ScriptLongBreakeven)
(setting name: InpTradeTool_ScriptShortBreakeven)
These scripts are run once, immediately after the Entry Script has run and before the position has been opened, and are used to determine the Breakeven value for the position. Use the Long BE script to set the Breakeven value of a long position opened with the Long Entry script and use the Short BE script to set the Breakeven value of a short position opened with the Short Entry script.
This script is run once immediately after the entry script.
If the script is not defined and the Settings -> Stops -> BE setting is enabled then the position’s BE value is calculated using the Settings -> Stops -> BE setting. If this setting is not enabled then no BE is used.
(setting name: InpTradeTool_ScriptLongExit)
(setting name: InpTradeTool_ScriptShortExit)
Use the Long Exit script to close a long position previously opened with the Long Entry script and use the Short Entry script to close a short position previously opened with the Short Entry script.
These scripts are run every tick whilst the position is open, regardless of the Settings -> Auto Trade -> Refresh Mode setting.
This section explains the logical steps EAsiScript follows to evaluate and execute trading logic. The process is divided into distinct phases for better understanding.
The workflow begins when one of the following events is triggered.
OnTick()
Event:
OnTimer()
Event:
OnTick()
.At this stage, the system prepares essential variables and performs initial validations to set up the trading environment.
CurrentAsk
to the symbol’s current Ask price.CurrentBid
to the symbol’s current Bid price.InpTradeTool_AutoTradeEnabled
setting is false, exit the workflow.InpTradeTool_LiveTrades
and InpTradeTool_SignalAlerts
settings are false for the market, exit the workflow.InpTradeTool_LongEntryScript
and InpTradeTool_ShortEntryScript
are undefined or empty, exit the workflow.InpTradeTool_AutoTradeRefreshMode
is set to EveryBar and it is not the first tick of a new bar, exit the workflow.This initialisation ensures that the system is correctly set up and that all necessary conditions are met before proceeding to evaluate trading signals or place orders.
This step ensures all trade-specific conditions are met before evaluating entry scripts or placing orders. It validates key constraints like trading hours, open position limits, and trade frequency.
InpTradeTool_StartOfDayTime
(start of trading).InpTradeTool_EndOfDayTime
(end of trading).InpTradeTool_MaxOpenPositions
(default: 1).InpTradeTool_MaxOpenPositionsSymbol
(default: 0; ignored if zero).InpTradeTool_MaxOpenPositionsAccount
(default: 0; ignored if zero).InpTradeTool_MaxTradesUnitTimeInSeconds
does not exceed the allowed maximum (default: 0; ignored if zero).InpTradeTool_MinTradeIntervalInSeconds
(default: 0; ignored if zero).This step evaluates the entry scripts to determine whether a trade should be opened and calculates the required parameters such as order type and price.
0
, no trade is required, and the workflow exits.LongEntryScript
equals the current ask price.ShortEntryScript
equals the current bid price.LongEntryScript
is greater than the current ask price.ShortEntryScript
is less than the current bid price.LongEntryScript
is less than the current ask price.ShortEntryScript
is greater than the current bid price.LongEntryScript
and ShortEntryScript
return positive results on the same tick:
This step finalizes trade placement by calculating necessary parameters such as Stop Loss (SL), Position Size (Lots) and Take Profit (TP), and executing the appropriate order type.
InpTradeTool_InitialStopValue
InpTradeTool_InitialStopValueUnits
(e.g., ATR, HH/LL Bars, Points).InpTradeTool_MaxRiskPerTradeInPercent
InpTradeTool_MaxRiskPerTradeInMoney
InpTradeTool_TakeProfitStopValue
InpTradeTool_TakeProfitStopValueUnits
(e.g., ATR, HH/LL Bars, Points).InpTradeTool_SignalAlerts
is enabled:
(setting name: InpTradeTool_UserVAR[n]=[current value];[comma separated set of values])
// [n]=variable number, 0-99
UserVARs (VAR0…VAR99) are defined in the EAsiTrader GUI, in the Settings tab under Settings -> UserVARs. These user-defined variables provide flexibility and reusability in your scripts and indicator creation strings. They allow you to replace constant numerical values, such as script parameters, with dynamic ones that can be adjusted during optimization.
Each variable is mapped in the Presets File to a InpTradeTool_UserVAR[n] setting, where [n] is the variable’s VAR number. The value of the setting is a string in two parts separated by a “;”. The first part is the variable’s current value and the second part is the variables set of all values.
Assign a value to one of the UserVAR settings, such as VAR0 = 10
.
Use the variable name (e.g., VAR0
) in your script or indicator creation string instead of a fixed number.
Example:
Create VAR0, set its value to 10 and use it in your scripts like:
Close(1) > VAR0 * Point ? Ask() : 0
Each UserVAR can be assigned a set of values, such as 10, 12, 14, 16
. During optimization, the strategy will test each combination of variable values from their respective sets.
Example:
10, 20
1, 2
VAR0 = 10, VAR1 = 1
VAR0 = 10, VAR1 = 2
VAR0 = 20, VAR1 = 1
VAR0 = 20, VAR1 = 2
If you define 3 variables, each with 10 values, the optimiser will perform 10 * 10 *10 = 1000 passes.
Dynamic Stop Loss:
Use VAR0
to set the stop loss distance in a stop Loss script, like the Long Initial SL script:
Low(1) - VAR0 * Point.
Indicator Creation String:
Replace fixed parameters with UserVARs:
NTL\MA(1,VAR0).ex5,0,1
Notes:
Operator | Description |
---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulus |
! | Not |
~ | Negate |
< | Less Than |
> | Greater Than |
<= | Less Than Or Equal To |
>= | Greater Than Or Equal To |
?: | If Then Else |
== | Is Equal To |
&& | Logical And |
|| | Logical Or |
& | Bitwise And |
| | Bitwise Or |
<< | Bit Shift Left |
>> | Bit Shift Right |
Name | Value |
---|---|
Bearish | -1 |
Bullish | 1 |
M1 | 1 |
M2 | 2 |
M3 | 3 |
M4 | 4 |
M5 | 5 |
M6 | 6 |
M10 | 10 |
M12 | 12 |
M15 | 15 |
M20 | 20 |
M30 | 30 |
H1 | 16385 |
H2 | 16386 |
H3 | 16387 |
H4 | 16388 |
H6 | 16390 |
H8 | 16392 |
H12 | 16396 |
D1 | 16408 |
W1 | 32769 |
MN1 | 49153 |
No Trend | 0 |
Pip | Symbol pip value |
Point | Symbol point value |
Function | Description |
---|---|
Abs(double x) | Returns absolute value (modulus) of x. |
Ask(double offset=0,string symbol = _Symbol) | Returns the ask price for symbol, adjusted by offset (price+price*offset). For live trading this is SYMBOL_ASK. For Tester trading this is the ask tick price plus 0.5 * broker spread (Tester->BrokerSpread). |
BE(int position) | Returns the Breakeven price for a position, or the current position if position is not specified. |
Balance(). | Returns the account’s balance. For live trading, this is the account balance in the deposit currency at the time of the function call. For Tester trading, this is the account balance value in the Tester’s context at the time of the Tester’s clock. |
BarSize(int shift=1, part=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the size of a part of a bar, in terms of its price, at offset shift, for symbol and timeframe. part can be: 0=whole bar, 1=body, 2=upper wick, 3=lower wick. |
BarTrend(int shift=1, string symbol=_Symbol, enum timeframe=_Period) | Returns the trend of a bar at offset shift for symbol and timeframe. 0=no trend (open=close), 1=bullish bar (close > open), -1=bearish bar (close < open). |
Bars(string indicator) | Returns the number of bars available for indicator. |
Bars(string symbol, enum timeframe) | Returns the number bars in the price series for symbol and timeframe. |
BearishBars(int count=0,string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bearish bars (close < open) starting from the latest closed bar for symbol and timeframe. If count = 0 , the function returns the number of consecutive bearish bars. If count > 0 , it counts up to count bearish bars (not necessarily consecutive). |
Bid(double offset=0,string symbol=_Symbol) | Returns the bid price for symbol, adjusted by offset (price+price*offset). For live trading this is SYMBOL_BID. For Tester trading this is the bid tick price minus 0.5 * broker spread (Tester->BrokerSpread). |
BodyX(int bars=0, double price=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bars, in a range starting from the latest closed bar, whose body part crosses the specified price. If price is 0 the symbol’s mid price is used. The mid price is (bid + ask) * 0.5. |
BoxBars(double lowPrice, double highPrice, int bars, string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bars in a range starting from the latest closed bar whose open and close prices are both contained within the specified price box. The count stops when the first bar having either its open or close price outside the box is encountered. |
BullishBars(int count=0,string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bullish bars (close > open) starting from the latest closed bar for symbol and timeframe. If count = 0 , the function returns the number of consecutive bullish bars. If count > 0 , it counts up to count bullish bars (not necessarily consecutive). |
Ceil(double x) | Returns integer numeric value closest from above x. |
Close(int shift=1, string symbol=_Symbol, enum timeframe=_Period) | Returns the close price of a bar at offset shift for symbol and timeframe. |
Comp(string indicator, int buf1=0, int buf2=-1, int shift1=1, int shift2=1) | Compares the buffer data for indicator at buffer buf1, shift offset shift1 with the buffer data at buffer buf2, shift offset shift2. If buf2 is -1 the Closing Price at shift offset shift2 of the current symbol and timeframe is used. Returns 0 if the data is equal, -1 if less than or 1 if greater than. |
Cross(string indicator, int buf1=0, int buf2=-1, int shift1=1, int shift2=2) | Looks for a cross in the buffer data for indicator at shift offset shift1 in at buffer buf1 and buf2 with the buffer data at shift offset shift2 in buffer buf1 and buf2. If buf2 is -1 the Closing Price at shift offset shift1 and shift2 of the current symbol and timeframe is used. Returns 0 if the data do not cross, -1 if bearish cross or 1 if bullish cross. |
DayBars() | Returns the number of bars since the start of the current day. |
Duration(int position) | Returns the duration in seconds a position has been open, or the current position if position is not specified. |
EntryPrice(int position) | Returns the entry price for a position, or the current position if position is not specified. For live trades this is the fill price. For simulated trades this is the current bid/ask price at the time the position was opened. This function returns an invalid value when called by the Initial SL Scripts, Take Profit Scripts and Breakeven Scripts. Use OrderPrice() instead. |
Equity() | Returns the account’s equity. For live trading, this is the account equity in the deposit currency (ACCOUNT_EQUITY) at the time of the function call. For Tester trading this is the current equity value in the Tester’s context at the time of the Tester’s clock. |
FibInZone(string fibIndicator, double zoneLevel1, double zoneLevel2, double price, int shift=1) | Returns true if price is inside a zone of a Fib retracement indicator. Shift is the shift offset in the Fib indicator’s buffer to the Fib retracement being tested. zoneLevel1=0-1, zoneLevel2=0-1. |
FibPrice(string fibIndicator, double fibLevel, int shift=1) | Returns the price of the Fib Level for a Fib retracement indicator. Shift is the shift offset in the Fib indicator’s buffer to the Fib retracement being tested. fibLevel=0-1. |
Floor(double x) | Returns integer numeric value closest from below x. |
FreeMargin() | Returns the account’s free margin. For live trading, this is the free margin of the account in the deposit currency (ACCOUNT_MARGIN_FREE) at the time of the function call. For Tester trading, this is the free margin value in the Tester’s context at the time of the Tester’s clock. |
HH(int bars=0, int shift=1, int mode=0,string symbol=_Symbol, enum timeframe=_Period) | Returns the highest high price for a range of bars, symbol and timeframe, starting from the bar at offset shift. |
High(int shift=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the high price of the bar at offset shift for symbol and timeframe. |
HighBars(int bars=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bars, in a range starting from the latest closed bar, whose high is higher than the high of the latest closed bar, for symbol and timeframe. If bars=0 the function returns the number of bars that have a high price lower than or equal to the high price of the latest closed bar, up to a maximum of 1000 bars. The count stops when the first bar with a higher high is encountered. |
HighD(int shift=0, string symbol=_Symbol) | Returns the daily high price for the bar at offset shift and symbol. |
Hour() | Returns the hour (0-23) of the opening time of the latest bar for the current symbol. |
Low(int bar = 0, string symbol = _Symbol, ENUM_TIMEFRAMES timeframe = _Period) | Returns the low price for symbol and timeframe at offset bar. |
IsOpen(int position) | Returns the open state of a position, or the current position if position is not specified. Returns 1 if the state of the current position is Open. |
IsPending(int position) | Returns the pending state of a position, or the current position if position is not specified. Returns 1 if the state of the current position is Pending. |
LowBars(int bars=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bars, in a range starting from the latest closed bar, whose low is lower than the low of the latest closed bar, for the specified symbol and timeframe. If bars=0 the function returns the number of bars that have a low price higher than or equal to the low price of the latest closed bar, up to a maximum of 1000 bar. The count stops when the first bar with a lower low is encountered. |
LL(int bars=0, int shift=1, int mode=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the lowest low price for a range of bars, symbol and timeframe, starting from the bar at offset shift. |
Lots(int position) | Returns the size of a position in lots, or the current position if position is not specified. This value is available immediately after a Lots script is run, if defined. |
Low(int shift=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the low price of the bar at offset shift for symbol and timeframe. |
LowBars(int bars=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the number of bars, in a range starting from the latest closed bar, whose low is lower than the low of the latest closed bar, for the specified symbol and timeframe. If bars=0 the function returns the number of bars that have a low price higher than or equal to the low price of the latest closed bar, up to a maximum of 1000 bars. The count stops when the first bar with a lower low is encountered. |
LowD(int shift=0, string symbol=_Symbol) | Returns the daily low price for the bar at offset shift and symbol. |
LowerWickX(int shift, double price, string symbol=_Symbol, enum timeframe=_Period) | Returns true if price crosses the lower wick of the bar at offset shift, for symbol and timeframe. |
Max(double x, double y) | Returns the maximum value of x and y. |
MaxLots(int slsize=0) | Returns the maximum number of lots that can be traded based on free margin (equity minus used margin). The slsize parameter represents the stop loss distance in points - when provided, the maximum risk per trade is divided by this distance to determine the maximum allowed lot size that satisfies both margin and risk management limits. |
MaxPoints(int position) | Returns the current maximum profit in points made by a position, or the current position if position is not specified. |
MaxProfit(int position) | Returns the current maximum profit in money made by a position, or the current position if position is not specified. |
Min(double x, double y) | Returns the minimum value of x and y. |
Mid(string symbol=_Symbol) | Returns the mid price for symbol. The mid price is (bid + ask) * 0.5. |
Minute() | Returns the minute (0-59) of the opening time of the latest bar for the current symbol. |
Mod(double x, double y) | Returns the real remainder after the division of x and y. |
OBOS(string indicator, int shift=1) | For indicators that support SignalFlags, this function returns the Overbought/Oversold signal flag at the bar at offset shift for indicator. 0=no signal, 1=oversold, -1=overbought. |
Open(int shift=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the open price of the bar at offset shift for symbol and timeframe. |
OrderPrice(int position) | Returns the order price for a position, or the current position if position is not specified. This function can be used immediately after an Entry script has been run. |
OrderType(int position) | Returns the order type for a position, or the current position if position is not specified. (0=Buy, 1=Sell, etc.) This function can be used immediately after an Entry script has been run. |
Pips(int position) | Returns the current profit in pips for a position, or the current position if position is not specified. |
Points(int position) | Returns the current profit in points for a position, or the current position if position is not specified. |
Positions() | Returns the number of open positions. |
PriceShift(double price, int shift=1) | Returns the number of bars since the specified price was last within a bar’s high-low range, searching back up to 1000 bars while maintaining price-relative continuity across gaps. The optional shift parameter offsets the starting point of the search. |
Profit(int position) | Returns the current profit in money for a position, or the current position if position is not specified. |
Rand() | Returns a pseudorandom value within the range of 0 to 32767. |
Range(int bars, int mode=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the difference in points between the highest high price and lowest low price for a range of bars, symbol and timeframe starting from the latest closed bar. |
Round(double x) | Returns x rounded to the nearest integer. |
SL(int position) | Returns the stop loss price for a position, or the current position if position is not specified. This value is available immediately after an Entry script is run, or after the Initial SL / Trailing SL scripts, if defined. |
SLSize(int position) | Returns the stop loss size in points for a position, or the current position if position is not specified. This value is available immediately after an Entry script is run, or after the Initial SL / Trailing SL scripts, if defined. |
Signal(string indicator, int shift=1) | For indicators that support SignalFlags, this function returns the buy/sell signal flag of the bar at offset shift for indicator. 0=no signal, 1=bullish signal, -1=bearish signal. |
Spread(int shift=1, string symbol=_Symbol, enum timeframe=_Period) | Returns the spread of the bar at offset shift for symbol and timeframe. |
Sqrt(double x) | Returns the square root of x. |
TP(int position) | Returns the TP price for a position, or the current position if position is not specified. This value is available immediately after a TP script is run, if defined. |
TickAsk(int shift=0,string symbol=_Symbol) | Returns the tick ask price for symbol at the tick offset from the latest tick. |
TickBid(int shift=0, string symbol=_Symbol) | Returns the tick bid price for symbol at the offset from the latest tick. |
TickHigest(int tickRangeInMs, string symbol=_Symbol) | Returns the highest ask tick price for symbol and time range in milliseconds counting back from the latest tick. |
TickLowest(int tickRangeInMs, string symbol = _Symbol) | Returns the lowest bid tick price for symbol and time range in milliseconds counting back from the latest tick. |
TickRange(int tickRangeInMs, string symbol = _Symbol) | Returns the difference in points between the highest ask and lowest bid for symbol and time span in milliseconds from the latest tick. |
Time(int shift=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the open time of the bar at offset shift for symbol and timeframe. |
TimeOfDay(int hour1=0,int minute1=0,int hour2=0,int minute2=0) | Returns the number of minutes past midnight for the current day. If hour1 and minute1 are provided, the function returns 0 if the current time matches hour1 and minute1, -1 if the current time is before hour1 and minute1, or 1 if the current time is after hour1 and minute1. If hour1, minute1, hour2 and minute2 are provided the function returns 0 if the current time is between the two times, -1 if the current time is before the hour1 and minute1, or 1 if the current time is after hour2 and minute2. |
TimeShift(int hour, int minute) | Returns the number of bars since the specified hour and minute of the current day. |
TotalPips() | Returns the total profit in pips for all open positions. |
TotalPoints() | Returns the total profit in points for all open positions. |
TotalProfit() | Returns the total profit in money for all open positions. |
Trend(string indicator, int shift=1) | For indicators that support SignalFlags, this function returns the trend signal flag for indicator at bar offset shift. 0=no trend, 1=bullish trend, -1=bearish trend. |
UpperWickX(int shift, double price, string symbol=_Symbol, enum timeframe=_Period) | Returns true if price crosses the upper wick of the bar at offset shift, for symbol and timeframe. |
Volume(int shift=0, string symbol=_Symbol, enum timeframe=_Period) | Returns the trade volume or tick volume (broker dependent) of the bar at offset shift for symbol and timeframe. |
Notes:
Indicators are essential for making informed trading decisions. In EAsiScript, indicators output data through buffers, which store calculated values such as signal flags or trend data. These buffers are accessed using functions like Signal()
and Trend()
.
EAsiTrader comes supplied with custom versions of 16 widely used indicators and 5 NTL custom indicators. Where applicable each indicator provides signal, trend and overbought/oversold signals from its signal data buffer, as well as access to the data from its other buffers. The EA can connect with an indicator either via the indicator’s .ex5 executable file, called a custom indicator, or via the chart that the indicator has been loaded onto, called a chart indicator.
File: \Indicators\NTL\ABH.ex5
Description: Calculates average bar height values over a specified period. Useful for analyzing market volatility and determining stop-loss or take-profit levels.
NTL\ABH([parameters,]).ex5
NTL\ABH(1,14,3).ex5,0,1
1
.14
.15
(all components).File: \Indicators\NTL\ADX.ex5
Description: Measures trend strength and direction using the Average Directional Index (ADX) and directional movement lines (-DI and +DI). Useful for identifying trending markets and generating trend-based signals.
Indicators\NTL\ADX([parameters,]).ex5
NTL\ADX(1,14).ex5,0,1,2,3
1
.14
.20
.0
.0
: ADX Crosses Threshold1
: DI Lines Cross When TrendingTrend Determination:
ADX < TrendStrengthThreshold
, then Trend = None
.+DI > -DI
, then Trend = Bullish
.-DI > +DI
, then Trend = Bearish
.Signal Determination:
ADXSignalLogicMethod
= 0
(ADX Crosses Threshold):
Bullish
and PreviousTrend = None
, then Signal = Bullish
.Bearish
and PreviousTrend = None
, then Signal = Bearish
.ADXSignalLogicMethod
= 1
(DI Lines Cross When Trending):
Bullish
and previous -DI > previous +DI, then Signal = Bullish
.Bearish
and previous +DI > previous -DI, then Signal = Bearish
.File: \Indicators\NTL\ADXW.ex5
Description: Measures trend strength and direction using the Average Directional Index (ADX) developed by Welles Wilder, along with directional movement lines (-DI and +DI). Useful for identifying trending markets and generating trend-based signals.
Indicators\NTL\ADXW([parameters,]).ex5
NTL\ADXW(1,14).ex5,0,1,2,3
1
.14
.20
.0
.0
: ADXW Crosses Threshold1
: DI Lines Cross When TrendingTrend Determination:
ADXW < TrendStrengthThreshold
, then Trend = None
.+DI > -DI
, then Trend = Bullish
.-DI > +DI
, then Trend = Bearish
.Signal Determination:
ADXWSignalLogicMethod
= 0
(ADXW Crosses Threshold):
Bullish
and PreviousTrend = None
, then Signal = Bullish
.Bearish
and PreviousTrend = None
, then Signal = Bearish
.ADXWSignalLogicMethod
= 1
(DI Lines Cross When Trending):
Bullish
and previous -DI > previous +DI, then Signal = Bullish
.Bearish
and previous +DI > previous -DI, then Signal = Bearish
.File: \Indicators\NTL\ATR.ex5
Description: Calculates the Average True Range (ATR), a measure of market volatility based on the average range between the high and low prices over a specified period.
NTL\ATR([parameters,]).ex5
NTL\ATR(1,14).ex5,0
1
.14
.File: \Indicators\NTL\AutoFib.ex5
Description: Automatically identifies Fibonacci retracement and extension levels, providing key levels of support and resistance. Fully customizable for a wide range of trading strategies.
NTL\AutoFib([parameters,]).ex5
NTL\AutoFib(1,'','0.0,0.236,0.382,0.5,0.618,0.762,1.0',10,0,4,50,0,0,1.2,20,250,150,'0.618,0.762',0,0).ex5,0,1,2,3,4,5
1
.'0,0.236,0.382,0.5,0.618,0.762,1.0'
.10
.0
(no maximum).4
.50
.0
(no maximum).0
.1.2
.20
.250
.150
.'0.618,0.762'
.0
.0
.3
(High)Trend Determination:
FibShift = 0
, then Trend = None
.FibType = 1
, then Trend = Bullish
.Bearish
.None
.File: \Indicators\NTL\BB.ex5
Description: Calculates Bollinger Bands, a volatility indicator using a moving average and standard deviations to define upper and lower bands. Useful for identifying overbought and oversold conditions as well as trend direction.
NTL\BB([parameters,]).ex5
NTL\BB(1,20,2.0).ex5,0,1,2,3
1
.20
.2.0
.Trend Determination:
Bullish
.Bearish
.OverBought
.OverSold
.File: \Indicators\NTL\HLines.ex5
Description: Identifies and analyses horizontal support and resistance lines across multiple timeframes. Customizable settings allow traders to adapt the indicator to various strategies, highlighting high-probability price levels for entries and exits.
NTL\HLines([parameters,]).ex5
NTL\HLines(1,'',800,100,'S2;R2',35,0.0,0.5,100).ex5,0,1
1
.800
.100
.'S2;R2'
.35
.0.0
.0.5
.100
.HLine Determination:
Bullish
.Bearish
.File: \Indicators\NTL\JCP.ex5
Description: Detects and categorizes Japanese candlestick patterns for market analysis and trading strategies.
NTL\JCP([parameters,]).ex5
NTL\JCP(1).ex5,0,1
1
.The following are the supported candlestick patterns with their corresponding identifiers:
By using JCP1, traders can automate the identification of these patterns, improving decision-making and aligning their strategies with market sentiment.
File: \Indicators\NTL\Keltner.ex5
Description: Calculates Keltner Channels, a volatility-based envelope indicator that uses a moving average and an average true range (ATR) to define upper and lower bands. Useful for identifying trends and overbought/oversold conditions.
NTL\Keltner([parameters,]).ex5
NTL\Keltner(1,20,1,2.25).ex5,0,1,2,3
1
.20
.1
.0
: Simple Averaging1
: Exponential Averaging2
: Smoothed Averaging3
: Linear Weighted Averaging2.25
.Trend Determination:
Bullish
.Bearish
.None
.OBOS Determination:
OverBought
.OverSold
.File: \Indicators\NTL\MA.ex5
Description: Calculates one or two moving averages using customizable periods and methods. Useful for identifying trends and generating buy/sell signals based on crossovers or price relation to the moving averages.
NTL\MA([parameters,]).ex5
NTL\MA(1,50,1,200,1).ex5,0,1,2
1
.50
.1
.0
: Simple Averaging1
: Exponential Averaging2
: Smoothed Averaging3
: Linear Weighted Averaging0
to use a single moving average.200
.1
.0
: Simple Averaging1
: Exponential Averaging2
: Smoothed Averaging3
: Linear Weighted AveragingTrend Determination:
Bullish
.Bearish
.None
.Bullish
.Bearish
.Bullish
.Bearish
.Signal Determination:
Bullish
and PreviousTrend = Bearish
, then Signal = Bullish
.Bearish
and PreviousTrend = Bullish
, then Signal = Bearish
.Associated Functions
File: \Indicators\NTL\MACD.ex5
Description: Calculates the MACD, an indicator based on the difference between fast and slow moving averages, with a signal line and histogram for trend and momentum analysis.
NTL\MACD([parameters,]).ex5
NTL\MACD(1,12,26,9).ex5,0,4
1
.12
.26
.9
.1
.0
: Histogram Crosses Zero1
: MACD Line Crosses Zero2
: Signal Line Crosses MACD LineTrend Determination:
Bullish
.Bearish
.Signal Determination:
0
(Histogram Crosses Zero):
Bullish
and PreviousHistogram < 0, then Signal = Bullish
.Bearish
and PreviousHistogram > 0, then Signal = Bearish
.1
(MACD Line Crosses Zero):
Bullish
.Bearish
.2
(Signal Line Crosses MACD Line):
Bullish
and SignalLine < MACD and PreviousSignalLine > PreviousMACD then Signal = Bearish
.Bearish
and SignalLine > MACD and PreviousSignalLine < PreviousMACD then Signal = Bullish
.Associated Functions
File: \Indicators\NTL\Markets.ex5
Description: Calculates the opening and closing times for all major financial centers like Sydney, Tokyo, Frankfurt, London, and New York. Its buffer stores market session data to track which markets are currently open and for how long they’ve been open in bars.
NTL\Markets([parameters,]).ex5
NTL\Markets(1).ex5,0
1
.Associated Functions
File: \Indicators\NTL\OSMA.ex5
Description: Calculates the difference between the MACD line and its signal line, providing a momentum oscillator for trend and signal analysis.
NTL\OsMA([parameters,]).ex5
NTL\OsMA(1,12,26,9).ex5,0,1
1
.12
.26
.9
.Trend Determination:
Bullish
.Bearish
.Signal Determination:
Bullish
and PreviousOSMA < 0, then Signal = Bullish
.Bearish
and PreviousOSMA > 0, then Signal = Bearish
.Associated Functions
File: \Indicators\NTL\PL.ex5
Description: Identifies pivot points and their corresponding support and resistance levels using various calculation methods, such as Regular, Camarilla, Woodie, and Fibonacci. Useful for determining key price levels and anticipating market movements.
NTL\PL([parameters,]).ex5
NTL\PL(1,16408,4).ex5,0
1
.0
.0
: Daily (PERIOD_D1
)1
: Weekly (PERIOD_W1
)2
: Monthly (PERIOD_MN1
)4
.0
: None1
: Regular2
: Camarilla3
: Woodie4
: FibonacciAssociated Functions
File: \Indicators\NTL\PP.ex5
Description: Analyses pivot points and their associated bar strength for multiple orders, providing insights into key price levels and market dynamics.
NTL\Indicators\PP([parameters,]).ex5
NTL\PP(1).ex5,0,1,2,3,4,5
1
.6
.Example
To read the high price of the nearest high pivot bar of order 2 use:
High(PP1(1,2,0,0xFFFFF)+1)
+1 is necessary because PP1 returns the number of bars from shift offset 1, and High() is expecting an offset starting from the latest closed bar, 1. 0xFFFFF is used to mask the lower 20 bits.
To read the low price of the nearest low pivot bar of order 2 use:
High(PP1(1,2,20,0xFFFFF)+1)
20 is used as the bit rotate value to move bits 20-39 into bits 0-19.
To read the high price of the nearest high pivot bar of order 3 use:
High(PP1(1,3,0,0xFFFFF)+1)
To read the low price of the nearest low pivot bar of order 3 use:
High(PP1(1,3,20,0xFFFFF)+1)
Associated Functions
Notes:
See Terms for an explanation of Pivot Strength and Pivot Order.
File: \Indicators\NTL\PSAR.ex5
Description: Calculates the Parabolic Stop and Reverse (PSAR) indicator, commonly used to identify trends and potential reversal points. Useful for setting stop-loss levels and identifying entry/exit signals.
NTL\PSAR([parameters,]).ex5
NTL\PSAR(1,0.02,0.2).ex5,0,1
1
.0.02
.0.2
.Trend Determination:
Bullish
.Bearish
.Signal Determination:
Bullish
and Previous High < Previous PSAR, then Signal = Bullish
.Bearish
and Previous Low > Previous PSAR, then Signal = Bearish
.Associated Functions
File: \Indicators\NTL\RSI.ex5
Description: Calculates the Relative Strength Index (RSI), a momentum oscillator that measures the speed and change of price movements. Useful for identifying overbought and oversold conditions in the market.
NTL\RSI([parameters,]).ex5
NTL\RSI(1,14,1,70,30).ex5,0,1
1
.14
.PRICE_CLOSE (1)
.70
.30
.Overbought/Oversold Determination:
Overbought
.Oversold
.0
.Associated Functions
File: \Indicators\NTL\Scalper.ex5
Description: Analyses tick-level market microstructure to detect short-term trading opportunities. Uses five core components (tick density, velocity, acceleration, direction, and MA deviation) to identify potential breakouts, reversals, and momentum shifts in real time.
NTL\Scalper([parameters,]).ex5
NTL\Scalper(1,10000,0.7,10000,0.3,0.6,10000,0.5,0.3,10000,0.7,10,1,5,0.0,5000,1,1,1,26).ex5,0,1,2,3,4,5,6
1
.10000
.0.7
.10000
.0.3
.0.6
.10000
.0.5
.0.3
.10000
.0.7
.10
.1
(EMA).0
: Simple Moving Average (SMA)1
: Exponential Moving Average (EMA)2
: Weighted Moving Average (WMA)3
: Hull Moving Average (HMA)5
.0.0
(no filter).5000
.1
(enabled).1
(enabled).1
(Density only).26
(Velocity, Direction, and MA).Signal Determination:
File: \Indicators\NTL\Stochastic.ex5
Description: Calculates the Stochastic Oscillator, a momentum indicator that compares a particular closing price to a range of prices over a specific period. Useful for identifying overbought and oversold conditions and potential trend reversals.
NTL\Stoch([parameters,]).ex5
NTL\Stochastic(1,5,3,3,80,20).ex5,0,1,2
1
.5
.3
.3
.80
.20
.Overbought/Oversold Determination:
Overbought
.Oversold
.0
.Associated Functions
File: \Indicators\NTL\ST.ex5
Description: Calculates the Super Trend, a trend-following indicator that helps identify bullish or bearish market trends. Useful for confirming entry and exit points.
NTL\ST([parameters,]).ex5
NTL\ST(1,13,1.5).ex5,0,1
1
.13
.1.5
.Trend Determination:
_trendBuffer
).Bullish
and PreviousTrend = Bearish
, then Signal = Bullish
.Bearish
and PreviousTrend = Bullish
, then Signal = Bearish
.None
.Associated Functions
File: \Indicators\NTL\TLines.ex5
Description: Automatically detects and analyses trendlines based on pivot points and other customizable parameters. Useful for identifying support, resistance, and market trends across multiple timeframes.
NTL\TLines([parameters,]).ex5
NTL\TLines(1,10,2,5,400,20,800,0.4,0.2,100,0).ex5,0,1,2,3,4
1
.10
.2
.5
.400
.20
.800
.0.4
.0.2
.100
.0
.0
: Bar1
: Pivot1
= trendline replaced by a closer, stronger line).1
= trendline replaced by a closer, stronger line).Trend Determination:
Bullish
= Ascending trendline.Bearish
= Descending trendline.Signal Determination:
Bearish
.Bullish
.Associated Functions
File: \Indicators\NTL\TSI.ex5
Description: Measures trend direction and momentum using the True Strength Index (TSI). Useful for identifying overbought and oversold conditions and generating trend and reversal signals.
NTL\TSI([parameters,]).ex5
NTL\TSI(1,13,21,8,25,-25,1).ex5,0,1,2
1
.13
.21
.8
.25
.-25
.1
.0
: Zero Line Cross1
: Signal Line CrossTrend Determination:
Bullish
.Bearish
.Bullish
and TSI >= OverboughtLevel, then OBOS = Overbought
.Bearish
and TSI <= OversoldLevel, then OBOS = Oversold
.Signal Determination:
0
(Zero Line Cross):
Bullish
and PreviousTrend = Bearish
, then Signal = Bullish
.Bearish
and PreviousTrend = Bullish
, then Signal = Bearish
.1
(Signal Line Cross):
Bullish
.Bearish
.Associated Functions
Each indicator listed above has its own script function to read the data from one of its buffers at the specified shift offset from the latest bar in a price history series.
Indicator(shift,buffer,ror,mask)
0
: Latest bar (unfinished).1
: Latest closed bar (finished).2
: Two bars ago, and so on.0
(no rotation).0xFFFF
masks the lower 16 bits.ABH1(1,2)
Returns the average upper wick height (buffer 2
) of the latest closed bar (shift 1
).
JCP1(1,0,0,0xFFFF)
Returns the Japanese Candle Pattern Type (lower 16 bits of buffer 0
) at the latest closed bar (shift 1
).
JCP1(1,0,16,0xF)
Returns the Japanese Candle Pattern Width In Bars (bits 16-19
of buffer 0
) at the latest closed bar (shift 1
).
16-19
to positions 0-3
for easier access.0xF
to capture only the lowest 4 bits.For indicators that support SignalFlags, consider using built-in functions like Signal()
, Trend()
, and OBOS()
for convenience.
Example:
Signal('MA1') == Bullish ? Ask() : 0
Signal():
Automatically retrieves the SignalFlag
from the appropriate buffer for the specified indicator.
Example:
Long Entry Script: Signal('MA1') == Bullish ? Ask() : 0
Retrieves the SignalFlag
value from MA1
’s buffer and executes a buy trade if the flag is Bullish
.
Trend():
Retrieves the TrendFlag
from the appropriate buffer.
Example:
Trend('MA1') == Bullish ? Ask() : 0
Checks if the moving average trend is bullish before placing a trade.
Leverage both SignalFlag
and TrendFlag
for more robust strategies:
Long Entry Script: Trend('MA1') == Bullish && Signal('RSI1') == Bullish ? Ask() : 0
This script ensures both the Moving Average and RSI indicators confirm a bullish trend before entering a trade.
Indicator List
The Indicator List box lists both the custom indicators and chart indicators for the current profile, that the EA can have access to. The list is refreshed when: the EA is first loaded; when a profile is loaded; or when the symbol or timeframe of the chart is changed. The EA assigns unique names to each indicator, so that two of the same indicator, with different settings, can be used, e.g. MA1, MA2
To conserve resources the EA connects with only the indicators that have been enabled for use by ticking the check box alongside the indicator’s name. Enabled indicators have a “+” as the first character of their creation string.
To use an indicator in a script you must first enable the indicator in the Indicator List.
Indicator Creation Strings define how an indicator is configured and instantiated in EAsiTrader. They specify the indicator file, parameters, including optional symbol and timeframe settings, and the indicator’s buffer numbers that data can be read from. This allows traders to integrate custom indicators dynamically into their strategies.
The standard format for an indicator creation string is as follows:
[Folder\]{Indicator}([Symbol:Timeframe,]EA_Flag[,args...]).ex5[,buffers]
The format is structured as follows:
.ex5
extension.Symbol
and Timeframe
are optional.
Symbol:Timeframe
specifies both a custom symbol and timeframe.:Timeframe
uses the current symbol but overrides the timeframe.Symbol:
uses the specified symbol but keeps the current timeframe.1
or 0
) indicating the indicator was created by an EA. Use 1 when creating an NTL indicator.Note: In an EAsiTrader preset file, indicator creation string settings that are prefixed with “+” indicate that the indicator is enabled and can be used in a script. In the GUI, enabling an indicator automatically adds the “+” to its creation string.
These examples demonstrate how to dynamically configure indicators for different symbols, timeframes, and strategies.
Moving Average (MA1) for the Primary Market:
NTL\MA(1,14,0).ex5
1
(true).14
(Moving Average period).0
(Simple Moving Average).Moving Average (MA1) for GBPUSD on H1 Timeframe:
NTL\MA(GBPUSD:H1,1,20,1).ex5
GBPUSD
.H1
.1
(true).20
(Moving Average period).1
(Exponential Moving Average).Relative Strength Index (RSI1) for EURUSD on M5 Timeframe:
NTL\RSI(EURUSD:M5,1,14).ex5
EURUSD
.M5
.1
(true).14
(RSI period).Bollinger Bands (BB1) for USDJPY on D1 Timeframe:
NTL\BB(USDJPY:D1,1,20,2.0).ex5
USDJPY
.D1
.1
(true).20
(Bollinger Bands period).2.0
.VAR0
can replace fixed parameters to allow dynamic optimization during testing.Indicators that support SignalFlags provide three built-in functions for accessing specific SignalFlag bits from the indicator’s SignalFlags data buffer:
These functions offer a convenient and straightforward way to retrieve flag values directly. Alternatively, the same SignalFlag bits can be accessed manually by reading from the indicator’s SignalFlags data buffer using the indicator’s function, as described in Reading Indicator Buffer Data.
The Signal Flags data buffer, available in indicators that support it, provides critical trading information to EAsiScript via one of the indicator’s buffers, typically the last one (the highest indexed buffer). Traders can combine signals from multiple indicators to form their trading strategies.
The signal data in the buffer corresponds to the time of the opening bar for its respective shift offset. For example, signal data at shift offset 1
in the indicator’s Signal Flags data buffer provides signals at the time of the opening of the latest closed bar. A shift value of 0
relates to the latest unfinished bar. Refer to Terms->Shift for additional details.
Bits 0–11 (0xFFF): Trend Bar Offset
0
: Trend change occurred on the latest bar.1
: Trend change occurred on bar 1, and so on.Bits 12–23 (0xFFF000): Signal Bar Offset
0
: Signal occurred on the latest bar.1
: Signal occurred on bar 1, and so on.Bits 24–35 (0xFFF000000): Overbought/Oversold Bar Offset
0
: Overbought/Oversold change occurred on the latest bar.1
: Overbought/Oversold change occurred on bar 1, and so on.Bits 36–42 (0x7F000000000): SignalFlag Bits
1 = Bearish Trend
1 = Bullish Trend
1 = Bearish Signal
1 = Bullish Signal
1 = Overbought Signal
1 = Oversold Signal
Bits 43–47 (0x15): Signal Data ID
0x15
) identifying the Signal Data format.Bits 48–49:
To use your own indicators in EAsiTrader scripts follow these instructions:
The indicator’s name, in this case MyInd1, will now appear at the end of the indicator’s List. You can now use your indicator in your scripts. For example, MyInd1(1, 0) would return the data at shift offset 1, the latest closed bar, in buffer 0.
During Live Trading the EA internal clock is set to the value of the terminal’s TimeTradeServer.
This applies during live trading, when scripts are executed on live price data, i.e. as a result of the EA’s OnTick event when new tick prices are received.
When running the Tester or during a scheduled optimisation the EA simulates the process of live trading as closely as possible using the bid and ask values from the price series’ raw tick data. Each tick price is time stamped so the exact time of the price update, subject to the broker’s infrastructure and the network latency, is known.
As the Tester runs, it processes each tick price one at a time within the specified date range. As it does so, it sets its own internal clock to the timestamp of the tick price.
This applies during tester trading, when scripts are executed on historical price data, i.e. as a result of running Tester, or during a scheduled optimisation.
See the Learn EAsiScript User Guide.
Visit the EAsiScript Presets for examples you can download and use in EAsiTrader.
This section defines key concepts and terms used in EAsiTrader to ensure a clear understanding of its features and functionality.
The strength of a bar is determined by counting the number of preceding bars (to its immediate left) that have a higher low (for low bar strength) or a lower high (for high bar strength). The count stops when the first bar with a higher low (for low bar strength) or a lower high (for high bar strength) is encountered.
Ordering pivots ranks price highs and lows based on their significance. The higher the order, the more significant the price compared to lower-ordered pivots.
The offset in bars from the latest bar. A shift value of zero means the latest bar, or latest unfinished bar. The EA always considers the latest bar to be unfinished (regardless of whether it is or not), i.e. only the open price is unchanging, unlike the high, low and close prices which can change.
A shift value of one means the bar before the latest bar, i.e. the latest finished bar, where the open, high, low and close prices will not change.
All functions, except Open(), Time(), Hour() and Minute() are blocked from accessing the latest bar, i.e. using a shift offset of 0. If 0 is used as a shift offset it is changed to one. The largest shift value is equal to the current total number of bars in the price series minus one.
Average Bar Height. The ABH values are read from the ABH indicator. The Period of the ABH is determined by the indicator.
Rev:15.4.2025 15:25