Join our fan page
- Published by:
- Vladimir Karputov
- Views:
- 3286
- Rating:
- Published:
- 2017.01.19 16:57
- Updated:
- 2018.06.27 13:39
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Author of the idea — Maksim Zerkalov, author of the mq5 code — barabashkakvn.
When opening a new bar, the EA analyzes the value of the previous four bars:
iHigh(3)>iHigh(4) && iOpen(1)>iOpen(2) &&
iOpen(2)>iOpen(3) && iOpen(3)>iOpen(4))
BuyOp=true;
if(iHigh(1)<iHigh(2) && iHigh(2)<iHigh(3) &&
iHigh(3)<iHigh(4) && iOpen(1)<iOpen(2) &&
iOpen(2)<iOpen(3) && iOpen(3)<iOpen(4))
SellOp=true;
When we have an open position, then the "HalfLots" variable value is checked in the
trailing block. In other words, the system checks if it is possible to partially close a profitable position. If "HalfLots==true", the position is closed partially:
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/16787
![Exp_CenterOfGravityCandle](https://c.mql5.com/i/code/expert.png)
The Exp_CenterOfGravityCandles Expert Advisor is based on signals of the CenterOfGravityCandles indicator.
![WPR_Histogram_Round_HTF](https://c.mql5.com/i/code/indicator.png)
The WPR_Histogram_Round indicator with the timeframe selection option available in the input parameters.
![Exp_TimesDirection](https://c.mql5.com/i/code/expert.png)
The Expert Advisor opens and closes positions at the predefined moments in time.
![SilverTrend_Signal_Alert](https://c.mql5.com/i/code/indicator.png)
SilverTrend semaphore signal indicator features alerts, emails and push notifications.