One solution would be to create a variable that increases every bar by 1;
once per bar --> barcount=barcount+1
Now you could make condition: barcount > 1 before your ea would continue the process.
One solution would be to create a variable that increases every bar by 1;
once per bar --> barcount=barcount+1
Now you could make condition: barcount > 1 before your ea would continue the process.
This can be done with some variable, but
why do you want this, may I ask?
There might be a more elegant solution
That "check profit" works better if you put a "position running" or "for each position" block before it.
Your project has a lot of repetition, there is probably some way to use only 1 logic tree for the opening
@eray-dursun
What do you mean risk is growing?
To use groups, just set a group number when buy/sell, and later you can refer to that group number. In the picture I used groupd number 1 for example.

If your tester refuses to start, there is usually some error. Check the journal
"If position", "Check profit", "Close positions"
You will succeed with these three blocks 
@migen
To build on my previous example, I would do it like this:

The 4 conditions now pass twice (for 2 timeframes) so the total "score" for buy and sell can be 8. I also added a block after the buy > sell comparison, where you can define how big the bigger "score" should be.
This doesn't exactly separate between timeframes, but I think it's close enought to your needs and you surely can modify it from there.
https://fxdreema.com/shared/h52NKD4te

How about this.
You can further define the orders by Group#.
Multiply on loss = 1.3
Multiply on profit = 1
To reduce risk, try the "Reset after how many losses" option too.
@josecortesllobat
Yes. Of course there are other kinds of errors, too.
https://fxdreema.com/shared/3PPBbuaDc
Here is a very simple martingale EA.
Its not profitable though.
If you mean to make profitable EA, stop trying martingale - thats a gambling strategy.
Your experts probably has some error, like divide by 0.
Are you 100% sure the ask price never went below the open price? Your ea works tick by tick, so even 1 tick of low ask price triggers your buy.
Remember, there is usually some slippage in the order, you don't get precisely the price you wanted (when buying the market price)
@migen
https://fxdreema.com/shared/BNcQoJLzb
This is how I would do it.. Hope you are comfortable with variables 
Oh, yeah, that connection is not very clear in my picture
I'm fairly sure you can put as many spaces as you want, if its a math operation
@drayzen oops, youre absolutely right, the IDs go in the wrong way in my example. I should sleep more 
https://fxdreema.com/shared/XYqEDtP9c
Here's the fixed blocks, but I'm sure you already got the idea.
Hello!
Maybe some loop works, like this:

It first looks for candle ID 1, and then compares it to ID 2 and then ID 2 to ID 3. If conditions are not met, ID 1 becomes ID 2 and the loop continues from there until it finds what it is looking for.
Be careful though, loop like this doesn't have any "expiration", so if it doesnt find what it looks for - your metatrader crashes. Thats why I put block # 6 there, to limit the loop.
You're welcome.
My own opinion: previous trades can't affect your future ones, they don't have any valuable information to the new trade entry.
This is also why I don't use fixed targets, I always open and close by the chart analysis and nothing else.