Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal


TradeProtector-1.1 - Automatic Stop Loss and proprotional Trailing Stop (updated version) - expert for MetaTrader 4

Marek | English Español Português 日本語 Deutsch

votes: 4
2009.10.06 06:40
2014.04.21 14:54

Updated version of the:

List of fixes:

- Added SYMBOL (currency pair) checking. Version 1.0 was processing all orders, no matter what currency pairs was there. Currently this EA is only processing orders of the same symbol.

If you want to use it for - let's say EURGBP and EURUSD - attach trade_protector-1.1 to the charts of the respective pairs.

- Fixed minor calculation problem for trailing stops on SELL orders (the spread value was unnecessarily added in the trailing stop value calculation formula).

Changes/Fixes in version 1.2:

- changed algorithm: if there is no SL, EA sets nInitialSL (pips) from the current price, then nTrailingStop is used as normal trailing stop until nPropSLThreshold profit (in pips) is reached. From that point proportional SL is used: (Buy/Sell)

SL = OrderOpenPrice() +/- dPropSLRatio(Bid/Ask - OrderOpenPrice()) -/+ spread

- 3 logging level are now meaningful: 0 - no logging, 1 - (default) only events (change SL) are logged, 2 - additional log file for diagnostic

The settable parameters are:
extern int logging=1;
//logging=0,1,2 - logging level
extern int nInitialSL=15;
// inital SL
extern int nTrailingStop=35;
//nTrailingStop [pips] - initial trailing stop. It will be used until your trade will reach profit = nPropSLThreshold. If you don't want trailing stop, set to a big value (bigger then nInitialSL + nPropSLThreshold)
extern int nPropSLThreshold=12;
//nPropSLThreshold [pips] - after reaching this profit proportional trailing stop will be used
extern double dPropSLRatio=0.35;
//dPropSLRatio [decimal] - multiplying factor ( PropSL = Profit * dPropSLRatio - Spred )
extern int nUseEscape=0;
//nUseEscape [ 1 or 0 ] - escape misplaced trades as soon as they reach some minimal profit
extern int nEscapeLevel=0;
//nEscapeLevel [pips] - lose size after which we want our trade to terminate
//as soon as it will reach next high
extern int nEscapeTP=35;
//nEscapeTP [pips] - take profit level in pips (you can set to negative value
//- then it will be a lose that you would be happy to get,
//in the case your trade reached some impressive negative pips value)
extern int nSleep=0;
//delay after new bar
extern int nSlip = 2;
//maximum price slip allowed

Yet another MA Angle counting Yet another MA Angle counting

An alternative version for counting MA Angle.

ImpulseOsMA ImpulseOsMA

Индикатор MACD, совмещённый с гистограммой MACD, усовершенствованный для использования импульсной торговой системы, предложенной А. Элдером.

GG-RiverFlow GG-RiverFlow

This indicator informs you about the depth of the trend.

v35260_Colored v35260_Colored

Продолжение темы "..взгляд по другому...", на этот раз работаем с Haiken Ashi.