Schau, wie man Roboter kostenlos herunterladen kann
Finden Sie uns auf Telegram!
und werden Sie Mitglied unserer Fangruppe
Interessantes Skript?
Veröffentliche einen Link auf das Skript, damit die anderen ihn auch nutzen können
Hat Ihnen das Skript gefallen?
Bewerten Sie es im Terminal MetaTrader 5
Skripte

Bracket Order with Correlation Adjusted Position Size - Skript für den MetaTrader 4

Ansichten:
867
Veröffentlicht:
2020.02.11 12:45
Aktualisiert:
2020.02.12 17:21
Benötigen Sie einen Roboter oder Indikator, der auf diesem Code basiert? Bestellen Sie ihn im Freelance-Bereich Zum Freelance

These scripts calculate the correlation coefficient to all other open positions in other symbols and adjusts the position size by a well tested formula.

In addition to that, It will also consider if you have full position size or not. In order to memorize the initial stoploss, it will save the initial stop loss in the order comment. If there's orders opened without the script it will take the average of all stoplosses and entryprices, weighted to lotsize.


It is very useful if you have a system with standardized stops, based on volatility (ATR, Standard Deviation, Basis Points, or even Pips for similar underlyings such as EURUSD and GBPUSD).

The advantage is simply, that you will never oversize again due to a correlation added risk


Settings:

  • Stop Multiplier (1.0 = unchanged) [1.0]: If you want to have a stop twice the size as the 1x Standard Deviation, with settings below, then you use 2.0. If you want half the standard deviation 0.5 etc.
  • Lotsize Multiplier [1.0]: If you want to risk more than the stated Risk as Riskpercentage or Riskamount (see below), then change this to a multiple that you like. 2.0 for twice the risk, e.g. 5% --> 10%
  • Risk to Reward Multiplier (1x Target) [2.0]: This will set the target as a multiple of your stoploss distance. The standard setting is a 1:2 Risk-to-Reward target
  • Standard Deviation Period for Stoploss [30]: The Period for the Smoothed 1x Standard Deviation, which is the base for the stoploss distance calculation. 30 Periods f.e. mean that it will take the standard deviation of close prices of the last 30 candles on the chart
  • Risk in Percentage ON/OFF [ON]: If this is activated with "ON", then it will take the Riskpercentage of Accountbalance, specified below, as the money at risk for your trade, when it is fully stopped out. It will always take the exact risk or less, never more than specified.
  • Riskpercentage of AccountBalance [5.0]: Risk in Percentage of Accountbalance for each Trade. 5.0 means 5% of $1,000 f.e. is $50 risk per trade.
  • Riskamount if Riskpercentage OFF [50.0]: If Riskpercentage is turned "OFF", then this is the exact amount of risk in your account currency. 50.0 is $50 risk f.e.
  • Magic Number [213891]: The script will use the magic number to target previously opened trades by the script (one of the scripts, so numbers should be same) to know the initial stoploss distance for correlation "relevance" calculation.

    Daily/Weekly HL Daily/Weekly HL

    Previous day&week High/Low

    RSI with BB RSI with BB

    RSI with Bollinger Bands calculated on it

    SpreadWatch SpreadWatch

    This indicator watches and displays the biggest spread the pair generated. It is recommended to run at least 5 days, from Monday to Friday, to get a big picture of the broker's spread.

    PricerEA PricerEA

    PricerEA is a utility to help any trader to place pending orders (stop or limit) at a specific price.