Trabajo finalizado
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Tarea técnica
Hi everyone,
I want an EA that can trade automaticaly on a renko custom indicator that i link to this message.
It's very simple to understand:
Lot:
variable but by default 0.01.
---Buy at green closed brick with a take profit 10 pips and stoploss 20 pips,
so robot will buy at all 10 pips green brick formed.
---Sell at red closed brick with TP 10 pips and SL 20 pips also,
so robot will sell at all 10 pips red brick formed.
For example:
If i lose from a buy order, i lose 20 pips until the next brick become red and then robot put a sell order. (same if i lose from a sell order)
Just follow the color brick by brick.
The renko indicator have a white brick color to spot gaps, if a gap occurs then close the current trade and robot will wait for a new closed colored (Red or Green) brick.
And here comes the Money Management:
For example, green brick close so robot buy, TP at 10 pips SL at 20 pips, next brick is a green brick so TP is activated and a new buy is set.
then red brick so -20 pips
then green brick so -20 pips
(losing 4$ with a standart lol of 0.01)
then green brick so + 10 pips
after this winning brick, the robot will put a trade lot of 0.04
then green brick so +10 pips and recover my losing trades.
(0.4 cents X 10 pips = 4$)
after that robot keep following the color with a size lot of 0.01,
also if there is no losing trades to recover, the lot stay at 0.01.
Another simple example:
Winning is represented by a + sign and losing by a - sign.
1-
1-
1-
1+
3- (The 3 losing trades 1- 1- 1-) but 3 here is a losing trade so lot size returns to 0.01 until next winning.)
1-
1-
1+
8- (All the losing trades -1+-1+-1+-3+-1+-1=-8) 8 is also a losing trade so next trade returns to 0.01 lot.)
1+
16+ (All losing trades are recovered here) return to base lot 0.01.)
I hope it's well explained.
I'm not a Dev but i think the money management condition would be like this:
"if win and profit<basebet
then
nextbet=(profit*-1)+(basebet*2)
else
nextbet=basebet
end"
Thanks in advance for all programmers.
Have a nice day.
Linked with this order message:
The indicator and the include files (.mqh) that i want that ea fits.