Asset parameters 1 - transaction costs

Spread

Simulated difference between the ask and bid price of the current asset (default taken from AssetsFix.csv when offline, current real spread when connected to a broker). The trade profit is reduced by this amount. Spread is ignored in binary trading mode (BINARY flag).

Slippage

Simulated extra slippage in seconds (default = 5), used in [Test] mode only. In Fill modes above 0, slippage is simulated by filling or closing orders not at the current price, but at a price expected after the given number of seconds. The direction and length of the next candle is used for estimating the price. For instance, with 1-minute bars and Slippage at 15, the order is filled at a price within the first quarter of the next bar. The larger the Slippage variable, the larger is the price range and thus the deviation of the fill or close price from the current price. For hitting entry, stop, or takeprofit limits, slippage is simulated by taking a price from the current tick range, regardless of the Slippage variable.
   Extra slippage has normally a negative effect on systems that go with the trend and can noticeably reduce the profit especially on short time frames. But can also be in favor of the trader in some cases, especially with counter-trend systems. It is recommended to test systems with and without slippage for determining its effect on the result. Slippage at 0 disables extra slippage, but entry, stop, or takeprofit limits still cause slippage unless Fill is also set to 0 (naive simulation mode). Setting Slippage to a negative amount simulates asymmetric slippage that is always in adverse direction. Asymmetric slippage is illegal, but some trading platforms allow the broker to automatically apply asymmetric slippage.

Commission

Broker's fee for opening and closing a trade, taken from AssetsFix.csv. Roundturn commission in units of the account currency per 10000 contracts for currencies, and per contract for all other assets. The trade profit is reduced by this amount. Ignored in binary trading mode (BINARY flag). When set in the script, it must be set individually for every traded asset. It is equivalent to an additional spread, with a size in pips given by Commission*LotAmount/10000/PIPCost for currencies and Commission*LotAmount/PIPCost for all other assets.

RollShort

RollLong

Daily rollover interest (also called 'swap') per 10000 contracts for currencies, resp. per contract for all other assets. Taken from the assets list when offline, otherwise the broker's current rollover value is used. The rollover is interest paid to or received from the broker for holding a short or long position overnight. For instance, when you hold a EUR/USD long position, you receive interest from the broker for borrowing the EUR and pay interest for lending the USD - the difference is the rollover. Negative rollover contributes to the losses, positive rollover to the profits. As you can imagine, negative rollover values are more frequent and greater than positive rollover values. For CFDs, rollover is usually trend compensating - for instance, upwards trending index CFDs get a negative RollLong for eliminating long-term trend profit. Rollover can heavily affect the performance of a strategy and cause an asymmetry between long and short trades, especially when positions are hold for several weeks.

WinPayout

LossPayout

Payout in percent of the invested Margin for binary trading (set(BINARY)). Winning trades win the invested amount plus the WinPayout, losing trades lose the invested amount minus the LossPayout. The payout variables must be set individually for every traded asset. Spread and Commission should be set to 0 for normal binary trades.

Type:

var

Remarks:

Example:

Spread = 3*PIP; // ignore broker spread, set constant spread for performance calculation 

See also:

enterLong/Short, price, Stop, Lots, Margin, PIP, asset parameters

 

► latest version online