SAW_system_1 - expert for MetaTrader 4




SAW_system_1 - expert for MetaTrader 4


The SAW_system_1 Expert Advisor places pending orders on the basis of the volatility for the last N days. The stop loss is always placed at the level of the opposite order, therefore, setting the stop loss value also sets the distance between orders. Stop loss and take profit and NOT calculated in points, but as a percentage of the average volatility over the specified number of days.

The orders are placed at a certain hour (terminal time), and if none of them was triggered, then they are deleted at the specified hour.

In addition, the EA is able to "reverse" the position when the first stop loss is triggered, or rather, it simply does not remove the opposite order when a position is opened by either of the orders. Also, when a position is opened, the opposite order can be placed with an increased lot to compensate losses, in case the position on second order closes in a loss.

Parameters:

  • Lot - trading lot;
  • Amount of days (for calculating volatility) - the number of days for calculation of volatility;
  • Hour installation orders (terminal time) - order placing hour (terminal time);
  • Hour removal orders (terminal time) - order deleting hour (terminal time);
  • Stop-Loss (percentage of the average volatility) - stop loss (percentage of the average volatility);
  • Take-Profit (percentage of the average volatility) - take profit (percentage of the average volatility);
  • Reverse positions - position reversal;
  • Martingale - enable Martingale;
  • Multiplier - Martingale multiplier.

The trading instrument does NOT matter, as long as optimization is performed.

Timeframe is not important either, as everything happens by the terminal time.



Recommendations:

  • The parameters should be optimized on a period not greater than one year, as greater period does not make sense.
  • Reoptimization will probably need to be performed every 3 months.
  • I had written this code long ago, so write me about all issues, I will fix them as much as possible.


Download SAW_system_1 - expert for MetaTrader 4




Related News




Latest News
Two Expected 2020 IPOs Bring Hope to Egypt’s Subdued Market
10.12.2019 05:15
(Bloomberg) -- Egypt’s ailing stock market could find a much-needed jolt of liquidity from two state-owned enterprises set to go public early next year. The long-awaited initial public offering of one of the biggest banks in the country, Banque du Caire, in particular could draw funds from outside the region, according to Hasnain Malik, head of
Read more
Gold’s Been on a Tear This Year and 2020 May See More Reward
10.12.2019 05:12
(Bloomberg) -- Gold’s impressive advance in 2019 -- aided by trade war frictions, easier monetary policy across the world’s leading economies and sustained central-bank buying -- may be set to spill into the new decade. As 2020 looms, BlackRock Inc (NYSE:BLK)., the world’s largest money manager, remains constructive on bullion as a hedge, while
Read more
Macron Braces for Second Day of Protests Against Pension Reform
10.12.2019 05:09
(Bloomberg) -- Emmanuel Macron is bracing for round-two of a clash with labor unions over his plan to upend France’s pension system, in what could become the defining moment of his presidency. Labor unions will stage a repeat of last week’s mass protests on Tuesday to load pressure the day before Macron’s government announces the final version of
Read more
Japan’s 10-Year Yield Climbs to Zero for First Time Since March
10.12.2019 05:06
(Bloomberg) -- Japan’s 10-year bond yield rose to zero for the first time in nine months amid waning global demand for debt. The nation’s benchmark yields are rising for a fourth month after the Bank of Japan slashed debt purchases and refrained from adding any more easing measures. Bonds have also fallen as optimism that the U.S. and China may
Read more
Australia cartel case against Citi, Deutsche delayed by late night witness statement
10.12.2019 05:03
SYDNEY (Reuters) - An Australian criminal cartel lawsuit against Citigroup Inc (N:C) and Deutsche Bank AG (DE:DBKGn) was postponed on Tuesday after defense lawyers complained the prosecution had given them a redacted statement for a key witness late on the previous day. Though for just one day, the delay raises the chance of pre-trial hearings
Read more