Add lots on loss
-
Please i'm trying to build an EA that the first 20 trades respectively has a manually inputed lot size in the EA setting if theres a loss...
Example:
1st trade Lot 0.10
if first trade loses (Hits SL)
2nd trade Lot 0.14
If second trade loses (Hits SL)
3rd trade Lot 0.10
If second trade loses (Hits SL)
4th trade Lot 0.14So on till the 20th trade...Then starts with the initial 0.10 after the 20th losing trade...
-
Anyone please????!!!
-
Do you mean that you will manually specify the lot size for the first 20 trades and then the 21st and later should be using the exact same lot size until the end of time?
-
@l-andorrà Yes sir...I need the lots of the first 20 trades inputed manually BUT when the 20th trade hits SL it starts all over again...From the initial lot size...
-
@Ben-Romewel Then you need to create a variable to store the value of the '21st' trade this way:

Notice that those blocks are in the 'on trade' tab. The condition block will identify when the 20th trade was having the last manually selected lot size (I called it 'last lot size'). Then the next 'modify variables' block will store the value of the 1st manually selected lot size (I called it 'initial lot size'). Once the info is stored you need to use that variable on both 'buy/sell now blocks.
-
okay sir...but i need the EA to open a trades in the opposite direction immediately the first hits an SL so and so and so till the 21st...but with an imputable LOT size...
-
@l-andorrà okay sir...but i need the EA to open a trades in the opposite direction immediately the first hits an SL instantly so and so and so till the 21st...but with an imputable LOT size....
-
Then you can simply connect a buy/sell now block immediately below the 'modify variables' block in my example. You will have to create two block trees: one for buys only that will open a sell and another one for sells only that will open a buy.
-
@l-andorrà okay sir but please for better understanding i need an example please...
-
@Ben-Romewel You have to do this:
- Create two separate structures as per my example.
- One structure will be buys only and the other one for sells only.
- Connect a 'sell now' block below the 'modify variables' block of the buys only structure.
- Connect a 'buy now' accordingly to the other structure.
- Use the 'lot size' variable in both 'buy/sell now' blocks.
-
@l-andorrà please I need an example sir...
-
And that's what I provided.
-
@l-andorrà Alright sir...this is what I've started with...https://fxdreema.com/shared/zz4EwT7eb
-
The modify variables block is empty.
-
@l-andorrà alright sir, but please what variables am I to input??