Join our fan page
- Published by:
- Vladimir Karputov
- Views:
- 2857
- Rating:
- Published:
- 2018.06.16 10:28
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Idea by: Dmitriy.
MQL5 code by: Vladimir Karputov.
the EA compares the opening prices (Open) of bar#0 and bar#2:
Inputs
- Stop Loss (in pips) - Stop Loss;
- Take Profit (in pips) - Take Profit;
- Trailing Stop (in pips) - trailing;
- Trailing Step (in pips) - trailing step;
- Breakeven - breakeven;
- Breakeven Profit - profit for breakeven;
- Lots (or "Lots">0 and "Risk"==0 or "Lots"==0 and "Risk">0) - position volume (for manual defining);
- Risk (or "Lots">0 and "Risk"==0 or "Lots"==0 and "Risk">0) - risk per trade as percent of free margin;
- magic number - unique identifier of the EA.
Test results in the "Every tick" mode for all symbols on D1:
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/20635

The EA uses a virtual Take Profit for closing gaining positions. Opening positions with a step. Catch the type of the last position and its price in OnTradeTransaction.

A trading system based on indicator signals Parabolic Stop and Reverse system with the possibility to set a fixed position holding time.

An assistant Expert Advisor. It moves positions to a breakeven and then enables trailing.

The Expert Advisor places pending Buy Stop and Sell Stop orders. If orders execute, the trailing stop is run for the positions.