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

Experts

VR Overturn - expert for MetaTrader 5

VOLDEMAR | English Русский 中文 Español Deutsch 日本語 Português

Published by:
Vladimir Karputov
Views:
993
Rating:
votes: 17
Published:
2018.01.22 09:51

Author of the idea: Vladimir Pastushak , author of the mq5 code: barabashkakvn.

Many Expert Advisor have been created based on the idea of the martingale.

This Expert Advisor allows testing classical martingale operating principles, as well as the anti-martingale technique.

The Expert Advisor code is simple and well-commented.


Trading principle with Martingale

  • If closed by Take Profit → open the starting lot in the same direction;
  • If closed by Stop Loss → open the increased lot in the opposite direction.


Trading principle with Anti-Martingale

  • If closed by Take Profit, open the increased lot in the same direction;
  • If closed by Stop Loss, open the starting lot in the opposite direction.


The idea of the Martingale system

Trading starts with a preset minimum lot.

If a trade is closed with a stop loss, further lot should be increased so that if a trade is closed with take profit, it would cover all previous stop losses in this series with a small additional profit. For example: 0,01-0,02-0,04-0,08-0,016-0,032-0,064 etc.

If the sequence is observed, the profit can be equal to the profit of a trade with the minimum lot.

If a trade is closed with take profit, the trader restarts with the minimum lot.

The martingale system does not provide a trader with advantage, but only allows re-distributing the profit. The trader rarely fixes loss, but it can be large. Profit is taken often, but it is small.


The idea of the Anti-Martingale system

Unlike the martingale system, in which lot is increased in case of stop loss, the opposite idea is used in the anti-martingale system: lot is increased in case of profit.

Trading begins with a minimum lot. If a trade is close with profit, the next trade lot is increased two or more times. In case of stop loss, the trader should return to the starting lot.

When trading based on the anti-martingale system, you should clearly define lot increase limits, after which you should return to the initial lot. For example you can set a maximum of three lot increases in a row: 0.01, 0.02, 0.05.


Input Parameters

  • start position: Buy or Sell - the direction of the first position;
  • type of trade: Martingale or AntiMartingale - trading type;
  • set the base lot - initial position volume;
  • set the value of stop loss;
  • set the value of TakeProfit;
  • set the value of the multiplier lots - position volume multiplier;
  • set the value MagicNumber - Expert Advisor ID;
  • all magic; true → all MagicNumber - enable/disable management of other magic numbers.

Be careful when using this Expert Advisor. Here is a typical development of situation:

VR Overturn #1

VR Overturn #2

and an unexpected fiasco:

VR Overturn #3

Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/19442

Fractal_Levels Fractal_Levels

The channel is drawn based on fractals.

StochValues StochValues

The indicator shows a text block with the values ​​of the user defined Stochastic Oscillator period for each timeframe.

Bollinger Bands RSI Bollinger Bands RSI

The Expert Advisor is based on the signals of indicators iBands (Bollinger Bands, BB) and iRSI (Relative Strength Index, RSI).

Vortex Oscillator Vortex Oscillator

This version of the Vortex indicator shows the difference between the VI+ and VI- lines as a histogram oscillating around the zero line.