Skip to content

EA_Base template parameters

Victor Tereschenko edited this page Jun 8, 2020 · 9 revisions

Parameters used in this template

Trading timeframe

Timeframe to trade

Entry logic, Exit logic

Whether to check entry rules every tick (Live) or on bar close. Live mode gives more false signals but takes an action more quickly. One parameter for the entry and one for the exit.

Position size

Position size. The unit is defined by the Position size type parameter

Position size type

Unit for the Position size parameter.

  • $. Position size defined in the amount of currency to be spent on the lot using the current leverage;

  • In contracts. The absolute number of contracts;

  • % of equity. $ of equity to be spent on the lot using the current leverage;

  • Risk in % of equity. Maximum affordable loss in % of equity. Calculated using the stop loss and the correct equity. After the stop loss hit you will lose around the specified % of equity.

    lot_size = (equity * lots / 100) / (stop_distance * unit_cost)

Slippage, points

Used slippage in points.

What trades should be taken

This parameter allows limiting trading to long/short only.

Logic type

This parameter allows to inverse the trading logic.

Close on opposite signal

Whether to close long trades on short signal/short on long signal.

Position Cap

Allows to limit number of trades opened at one point of time.

Max # of buy+sell positions

General limit for buy+sell positions. Used to limit number of total positions.

Max # of buy positions

General limit for buy positions.

Max # of sell positions

General limit for sell positions.

Stop loss type

Stop loss type.

  • Do not use. No stop loss;
  • Set in %. Defined in % from the entry price;
  • Set in Pips. Defined in pips;
  • Set in $. Defined in currency. When the stop loss will be hit you will loss around that amount of money.
  • Set in % of stop loss. Not used for a stop loss;
  • Set in absolite value (rate). Absolute rate defined by the user.

Stop loss value

Stop loss. The unit is defined by the Stop loss type parameter.

Trailing type

Stop loss trailing type.

  • No trailing. Disabled;
  • Use trailing in pips. The stop loss will be moved to the specified number of pips after the same amount of price movement;
  • Use trailing in % of stop. The stop loss will be moved to the specified number of % after the same amount of price movement.

Trailing step

Trailing step. The unit defined by the Trailing type parameter.

Min distance to order to activate the trailing

Distance to trigger the trailing. When set to 0 the trailing will start immideatly. This parameter allows to start trailing only in profit (when set to > 0).

Trigger type for the breakeven

Breakeven moves stop once after certain amount of profit is hit. This parameter defines breakeven type. Parameters are the same as for the Stop loss type parameter.

Trigger for the breakeven

When to trigger the stop loss move.

Breakeven target

Target level in pips for the stop loss after the breakeven level is hit.

Take profit type

Take profit type.

  • Do not use. No take profit;
  • Set in %. Defined in % from the entry price;
  • Set in Pips. Defined in pips;
  • Set in $. Defined in currency. When the take profit will be hit you will gain around that amount of money.
  • Set in % of stop loss. Ration to the stop loss. Use 1 to use 1:1 take profit:stop loss. When 2 is used the take profit will be twice as far as the stop loss, etc.;
  • Set in absolite value (rate). Absolute rate defined by the user.

Take profit value

Take profit value. The unit will be defined by the Take profit type parameter.

Magic number

Magic number of orders

Start time in hhmmss format and Stop time in hhmmss or hh:mm:ss formats

Start of the trading time and stop of the trading time. hhmmss format is used. Use the same value to all-day trading.

Weekly time

Whether to limit trading based on day of the week.

Start day

Start day for the trading

Start time in hhmmss or hh:mm:ss formats

Start time for the trading.

Stop day

Stop day for the trading.

Stop time in hhmmss or hh:mm:ss formats

Stop time for the trading.

Mandatory closing for non-trading time

When set to true all positions and orders will be deleted/closed when trading hours will end.

Clone this wiki locally