You should use two different variables. One for counting how many trades are closed per step and another one modifying the lot size accordingly. That will be far easier than using a loop.
Posts made by l'andorrà
-
RE: money managementposted in Questions & Answers
-
RE: Close Least Profitable Positionposted in Questions & Answers
Interesting. It should close just one trade only. What settings did you select on the block exactly?
-
RE: Help...Stoploss triggered Reverse EAposted in General Discussions
Can you please share the link to the project instead of uploading a photo?
-
RE: I need helpposted in Questions & Answers
This is the second thread you created for exact same question. I replied to the first one. Please don't duplicate threads.
-
RE: How can i count all trades that broke even and put it in a variable if my robot that has a single condition on multiple currencies??? any one can help with this?posted in Questions & Answers
@Rem1978 Not sure I fully understand. Do you mean knowing how many trades from all symbols are moved their SL to break even? Do you need that number specifically?
-
RE: I want 2 indicators to confirm first before orderingposted in Questions & Answers
@NamiyrD You will need variables to control that. Now you are requesting all conditions to be true at the exact same moment. You need variables controlling when one condition is active when another one already happened.
-
RE: bot test does not work on mt5 demoposted in Questions & Answers
No project is visible. Can you please confirm the link is correct?
-
RE: simple function to locate the drawdown % MAXposted in Tutorials by Users
@DragonZueloTrends No. Habría que usar otro código distinto. Ese no serviría para lo que pides.
-
RE: Muchas apertura en el mismo puntoposted in Questions & Answers
Pues me temo qe no soy la persona más indicada para dar consejos.
No soy un experto en ese campo. Para mí lo más importante es siempre disponer de buenos datos de calidad para el backtest. Yo me he llevado muchos disgustos obteniendo grandes resultados de backtest para luego fracasar en real. Si la estrategia aguanta en datos de calidad, es más probable que funcione en real. Ese es el único consejo que te puedo dar. 
-
RE: bot test does not work on mt5 demoposted in Questions & Answers
@Javad1900 Could you please share a link to the project instead?
-
RE: Muchas apertura en el mismo puntoposted in Questions & Answers
Eso definitivamente debería ayudar.
-
RE: Una sola operacion por cruceposted in Questions & Answers
Hay diversas formas de hacerlo. La más sencilla es usar una variable lógica que bloquee el lanzador de operaciones cada vez que haya un cruce activo para así evitar abrir nuevas.
-
RE: CHoCHposted in Questions & Answers
Thanks for the info. Sadly, I'm not familiar with those concepts. Probably other users can be more helpful than me.
-
RE: how to close manually opened trade by EA ??posted in Questions & Answers
Two blocks. A 'pass' block on top and a 'close trades' block below. Then use Magic number 0 every time you use it and voila!
-
RE: Algo tradingposted in Questions & Answers
Is it created with fxDreema? Is so please share the link to it.
-
RE: Cross above Horizontal Lineposted in Questions & Answers
Because you are requesting the crossing to happen at the exact same time the line is drawn. That will never happen. You need to move blocks 4 and 6 to a separate block tree and then connect them on top of each other in order to open a sell.
-
RE: doubts about the martingaleposted in Questions & Answers
@dadilula Because you need to add a pink 'once per trade' block below it as well as specifying just the last trade to be considered inside the 'for each trade' block. Like this:

-
RE: VPNposted in Questions & Answers
I'm afraid I don't fully understand what you mean. Could you please be more precise?