# Experts: VR---Overturn

Moderator
178198
2014.02.18 05:51

Author: Владимир

171
2014.11.21 04:01

Hi found that this strategy may works well if add the trailing stop, can you modified it as below:

1) Put he trailing stop on the existing order if the price reach profit = 10/15/20...etc to breakeven or +10/15/20...

2) Remain the opposite reversal order with the first order stoploss price, not the trailing stop price.

114
2015.01.14 16:28
This EA works perfectly but it needs a max number of times the lot sizes will increase before it returns to the start lot size.
5601
2015.01.15 10:22
This EA works perfectly but it needs a max number of times the lot sizes will increase before it returns to the start lot size.

Trust me, tens of millions of people have spent probably trillions of hours trying to make progressive and anti-progressive "betting systems" work on any type of market or game you can imagine. The one result in common is that it will eventually blow your account.

The great thing you can learn from this free code is that it's a no win situation. Just when you think you've got the numbers perfect, you try it out on a different time frame, a different calendar time or a different symbol and it will fall apart.

If you do want to try your variation, then all you need to do is add something like this after the Slippage variable around line 35:

`input double MaxLot=5;`

and then add something like this after the initial check in OnTick. So you would change this:

```      if(Pro>0 && TypTrade==0)Lot=StartLot; // if the Advisor works in a mode of martingale and profit greater than zero
// then the lot will equal start for a position in the same direction

if(Pro<0 && TypTrade==1)Lot=StartLot; // if the Advisor works in mode антимартингейл and profit is less than zero
```

To this:

```      if(Pro>0 && TypTrade==0)Lot=StartLot; // if the Advisor works in a mode of martingale and profit greater than zero
// then the lot will equal start for a position in the same direction

if(Pro<0 && TypTrade==1)Lot=StartLot; // if the Advisor works in mode антимартингейл and profit is less than zero
// then the lot will equal start for a position in the same direction

if (Lot>MaxLot) Lot=StartLot;
```

If you do use this really simple change, bear in mind that the last lot checked will be before the multiplier. So your MaxLot should be the Maximum lot you want, divided by the multiplier. This isn't great programming and should be done a lot more elegantly but it will serve the purpose of showing you that unfortunately, it's never going to be the holy grail.

Have fun :)

/