Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

Multicurrency hedge example EA (overlay hedge) - expert for MetaTrader 4

[Deleted]
Views:
29491
Rating:
(15)
Published:
2017.09.18 10:20
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The Expert Advisor looks for correlations of the Market Watch list symbols, calculates Average True Range ratios for every hedging combination and assigns different magic numbers for them. Then the subsequent operations can be easily carried out with the prepared data. For precision, statistics like correlation and ATR ratio are recalculated every day.

The Expert Advisor can work with all the currency pairs from the Market Watch list on a single chart simultaneously, as well as it does not depend on the incoming ticks from particular symbol. For the purpose of showing the principle of action, hedging technique was implemented based on overlay chart indicator presented here https://www.mql5.com/en/code/7933.


Inputs

  • TakeProfitByPoints - Set it to 'true' if you want profit/loss to be calculated in points.
  • TakeProfitPoints - Take Profit value (in points).
  • TakeProfitByUsd - Set it to 'true' if you want profit/loss to be calculated in USD.
  • TakeProfitUsd - Take Profit value (in USD).
  • Retries - Number of retries for trying to close an order.
  • AtrTimeFrame - Timeframe for Average True Range calculation.
  • AtrBarsBack - Number of bars for Average True Range calculation.
  • CorrelationTimeFrame - Timeframe for correlation calculation.
  • CorrelationBarsBack - Number of bars for correlation calculation.
  • OverlayThreshold - Overlay threshold (in points).
  • MaxOrders - Number of maximum open orders allowed.
  • MaxSpread - Maximum spread allowed (in points).
II (Outbreak) EA II (Outbreak) EA

Expert Advisor for pyramiding into big and fast market movements.

Open Two Pending Orders Open Two Pending Orders

Automatic placing of Buy Stop pending order and Sell Stop pending order simultaneously, Stop Losses and Take Profits on the user specified levels. As soon as the long position (BUY) is opened as ASK price crosses the levels, the remaining pending order (SELLSTOP) is deleted. Vice versa if the short position (SELL) is opened as BID price crosses the levels, the remaining pending order (BUYSTOP) is deleted. It places again both pending orders after the opened order has been closed.

S4T_DaysOfTheWeek S4T_DaysOfTheWeek

The indicator marks the days of the week with a colored histogram in the chart sub-window.

Hidden StopLoss and TakeProfit System Hidden StopLoss and TakeProfit System

A class system to represent a hidden stop loss and take profit system, combined with 4 example files showing the use of the classes.